Esempio n. 1
0
RESET_DATA    *resetRead        (STORAGE_SET *set) {
  RESET_DATA *reset = malloc(sizeof(RESET_DATA));
  reset->type     = read_int(set, "type");
  reset->times    = read_int(set, "times");
  reset->chance   = read_int(set, "chance");
  reset->max      = read_int(set, "max");
  reset->room_max = read_int(set, "room_max");
  reset->on       = gen_read_list(read_list(set, "on"),   resetRead);
  reset->in       = gen_read_list(read_list(set, "in"),   resetRead);
  reset->then     = gen_read_list(read_list(set, "then"), resetRead);
  reset->arg = newBuffer(1);
  bufferCat(reset->arg, read_string(set, "arg"));
  return reset;
}
Esempio n. 2
0
RESET_LIST *resetListRead(STORAGE_SET *set) {
  RESET_LIST *list = calloc(1, sizeof(RESET_LIST));
  list->resets = gen_read_list(read_list(set, "resets"), resetRead);
  return list;
}
Esempio n. 3
0
TRIGGER_AUX_DATA *triggerAuxDataRead(STORAGE_SET *set) {
  TRIGGER_AUX_DATA *data = malloc(sizeof(TRIGGER_AUX_DATA));
  data->triggers = gen_read_list(read_list(set, "triggers"), read_one_trigger);
  data->pyform   = NULL;
  return data;
}