MAP_LENGTH 64
PLAYER_TYPE 0
-THING_ACTION 1
+TA_ID 1
TA_EFFORT 1
TA_NAME wait
-THING_ACTION 2
+TA_ID 2
TA_EFFORT 5
TA_NAME move
-THING_ACTION 3
+TA_ID 3
TA_EFFORT 15
TA_NAME pick_up
-THING_ACTION 4
+TA_ID 4
TA_EFFORT 5
TA_NAME drop
-THING_ACTION 5
+TA_ID 5
TA_EFFORT 45
TA_NAME use
-THING_TYPE 0
+TT_ID 0
TT_START_NUMBER 1
TT_LIFEPOINTS 5
TT_SYMBOL @
TT_NAME HUMAN
TT_CONSUMABLE 0
-THING_TYPE 1
+TT_ID 1
TT_START_NUMBER 27
TT_LIFEPOINTS 1
TT_SYMBOL a
TT_NAME ANT
TT_CONSUMABLE 0
-THING_TYPE 2
+TT_ID 2
TT_START_NUMBER 9
TT_LIFEPOINTS 3
TT_SYMBOL z
TT_NAME ZOMBIE
TT_CONSUMABLE 0
-THING_TYPE 3
+TT_ID 3
TT_START_NUMBER 3
TT_LIFEPOINTS 9
TT_SYMBOL S
TT_NAME SHOGGOTH
TT_CONSUMABLE 0
-THING_TYPE 4
+TT_ID 4
TT_START_NUMBER 9
TT_LIFEPOINTS 0
TT_SYMBOL #
TT_NAME DIRT
TT_CONSUMABLE 0
-THING_TYPE 5
+TT_ID 5
TT_START_NUMBER 9
TT_LIFEPOINTS 0
TT_SYMBOL %
TT_NAME SKELETON
TT_CONSUMABLE 0
-THING_TYPE 6
+TT_ID 6
TT_START_NUMBER 1
TT_LIFEPOINTS 0
TT_SYMBOL m
TT_NAME 'MAGIC MEAT'
TT_CONSUMABLE 3
-THING_TYPE 0
+TT_ID 0
TT_CORPSE_ID 5
-THING_TYPE 1
+TT_ID 1
TT_CORPSE_ID 4
-THING_TYPE 2
+TT_ID 2
TT_CORPSE_ID 5
-THING_TYPE 3
+TT_ID 3
TT_CORPSE_ID 6
-THING_TYPE 4
+TT_ID 4
TT_CORPSE_ID 4
-THING_TYPE 5
+TT_ID 5
TT_CORPSE_ID 4
-THING_TYPE 6
+TT_ID 6
TT_CORPSE_ID 4
}
tt->corpse_id = id;
}
- else if (parse_val(tok0, tok1, s[S_CMD_THINGTYPE], '8', (char *) &id))
+ else if (parse_val(tok0, tok1, s[S_CMD_TT_ID], '8', (char *) &id))
{
tt = get_thing_type(id);
if (!tt)
}
}
}
- else if (parse_val(tok0, tok1, s[S_CMD_THINGACTION], 'i', (char *) &id))
+ else if (parse_val(tok0, tok1, s[S_CMD_TA_ID], '8', (char *) &id))
{
ta = get_thing_action(id);
if (!ta)
|| parse_val(tok0,tok1, s[S_CMD_T_HP], '8', (char *) &t->lifepoints)
|| parse_position(tok0, tok1, t)
|| parse_carry(tok0, tok1, t));
- else if (parse_val(tok0, tok1, s[S_CMD_THING], 'i', (char *) &id))
+ else if (parse_val(tok0, tok1, s[S_CMD_T_ID], 'i', (char *) &id))
{
t = get_thing(world.things, id, 1);
char * err = "No thing type found to initialize new thing.";
s[S_PATH_IN] = "server/in";
s[S_PATH_RECORD] = "record";
s[S_PATH_SAVE] = "savefile";
- s[S_CMD_MAKE_WORLD] = "MAKE_WORLD";
- s[S_CMD_WORLD_ACTIVE] = "WORLD_ACTIVE";
- s[S_CMD_SEED_MAP] = "SEED_MAP";
- s[S_CMD_SEED_RAND] = "SEED_RANDOMNESS";
- s[S_CMD_TURN] = "TURN";
- s[S_CMD_THING] = "THING";
+ s[S_FCN_SPRINTF] = "sprintf";
+ s[S_CMD_TA_ID] = "TA_ID";
+ s[S_CMD_TA_EFFORT] = "TA_EFFORT";
+ s[S_CMD_TA_NAME] = "TA_NAME";
+ s[S_CMD_TT_ID] = "TT_ID";
+ s[S_CMD_TT_CONSUM] = "TT_CONSUMABLE";
+ s[S_CMD_TT_STARTN] = "TT_START_NUMBER";
+ s[S_CMD_TT_HP] = "TT_LIFEPOINTS";
+ s[S_CMD_TT_SYMB] = "TT_SYMBOL";
+ s[S_CMD_TT_NAME] = "TT_NAME";
+ s[S_CMD_TT_CORPS] = "TT_CORPSE_ID";
+ s[S_CMD_T_ID] = "T_ID";
s[S_CMD_T_TYPE] = "T_TYPE";
s[S_CMD_T_POSY] = "T_POSY";
s[S_CMD_T_POSX] = "T_POSX";
s[S_CMD_PICKUP] = "pick_up";
s[S_CMD_DROP] = "drop";
s[S_CMD_USE] = "use";
- s[S_FCN_SPRINTF] = "sprintf";
- s[S_CMD_THINGTYPE] = "THING_TYPE";
- s[S_CMD_TT_CONSUM] = "TT_CONSUMABLE";
- s[S_CMD_TT_STARTN] = "TT_START_NUMBER";
- s[S_CMD_TT_HP] = "TT_LIFEPOINTS";
- s[S_CMD_TT_SYMB] = "TT_SYMBOL";
- s[S_CMD_TT_NAME] = "TT_NAME";
- s[S_CMD_TT_CORPS] = "TT_CORPSE_ID";
- s[S_CMD_THINGACTION] = "THING_ACTION";
- s[S_CMD_TA_EFFORT] = "TA_EFFORT";
- s[S_CMD_TA_NAME] = "TA_NAME";
+ s[S_CMD_MAKE_WORLD] = "MAKE_WORLD";
+ s[S_CMD_WORLD_ACTIVE] = "WORLD_ACTIVE";
+ s[S_CMD_SEED_MAP] = "SEED_MAP";
+ s[S_CMD_SEED_RAND] = "SEED_RANDOMNESS";
+ s[S_CMD_TURN] = "TURN";
s[S_CMD_MAPLENGTH] = "MAP_LENGTH";
s[S_CMD_PLAYTYPE] = "PLAYER_TYPE";
}
S_PATH_IN,
S_PATH_RECORD,
S_PATH_SAVE,
- S_CMD_MAKE_WORLD,
- S_CMD_WORLD_ACTIVE,
- S_CMD_SEED_MAP,
- S_CMD_SEED_RAND,
- S_CMD_TURN,
- S_CMD_THING,
+ S_FCN_SPRINTF,
+ S_CMD_TA_ID,
+ S_CMD_TA_EFFORT,
+ S_CMD_TA_NAME,
+ S_CMD_TT_ID,
+ S_CMD_TT_CONSUM,
+ S_CMD_TT_STARTN,
+ S_CMD_TT_HP,
+ S_CMD_TT_SYMB,
+ S_CMD_TT_NAME,
+ S_CMD_TT_CORPS,
+ S_CMD_T_ID,
S_CMD_T_TYPE,
S_CMD_T_POSY,
S_CMD_T_POSX,
S_CMD_PICKUP,
S_CMD_DROP,
S_CMD_USE,
- S_FCN_SPRINTF,
- S_CMD_THINGTYPE,
- S_CMD_TT_CONSUM,
- S_CMD_TT_STARTN,
- S_CMD_TT_HP,
- S_CMD_TT_SYMB,
- S_CMD_TT_NAME,
- S_CMD_TT_CORPS,
- S_CMD_THINGACTION,
- S_CMD_TA_EFFORT,
- S_CMD_TA_NAME,
+ S_CMD_MAKE_WORLD,
+ S_CMD_WORLD_ACTIVE,
+ S_CMD_SEED_MAP,
+ S_CMD_SEED_RAND,
+ S_CMD_TURN,
S_CMD_MAPLENGTH,
S_CMD_PLAYTYPE
};
{
write_thing(file, o);
}
- write_key_value(file, s[S_CMD_THING], t->id);
+ write_key_value(file, s[S_CMD_T_ID], t->id);
write_key_value(file, s[S_CMD_T_TYPE], t->type);
write_key_value(file, s[S_CMD_T_POSY], t->pos.y);
write_key_value(file, s[S_CMD_T_POSX], t->pos.x);
struct ThingAction * ta;
for (ta = world.thing_actions; ta; ta = ta->next)
{
- write_key_value(file, s[S_CMD_THINGACTION], ta->id);
+ write_key_value(file, s[S_CMD_TA_ID], ta->id);
write_key_value(file, s[S_CMD_TA_EFFORT], ta->effort);
write_key_string(file, s[S_CMD_TA_NAME], ta->name);
try_fputc('\n', file, __func__);
struct ThingType * tt;
for (tt = world.thing_types; tt; tt = tt->next)
{
- write_key_value(file, s[S_CMD_THINGTYPE], tt->id);
+ write_key_value(file, s[S_CMD_TT_ID], tt->id);
write_key_value(file, s[S_CMD_TT_STARTN], tt->start_n);
write_key_value(file, s[S_CMD_TT_HP], tt->lifepoints);
int test = fprintf(file, "%s %c\n", s[S_CMD_TT_SYMB], tt->char_on_map);
}
for (tt = world.thing_types; tt; tt = tt->next)
{
- write_key_value(file, s[S_CMD_THINGTYPE], tt->id);
+ write_key_value(file, s[S_CMD_TT_ID], tt->id);
write_key_value(file, s[S_CMD_TT_CORPS], tt->corpse_id);
}
try_fputc('\n', file, __func__);