X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=sidebyside;f=src%2Fserver%2Fgod_commands.c;h=b0aa86aabf2d6e927065d486d7cd92ecb543107a;hb=61b38ae95ae11a82b7101c7475301cdd471e8ed5;hp=8bde74235a29e721e7c2afd3dcda2ac7713cafcf;hpb=13a59c560b0d5b89e02660a63d5e6307540b13f6;p=plomrogue
diff --git a/src/server/god_commands.c b/src/server/god_commands.c
index 8bde742..b0aa86a 100644
--- a/src/server/god_commands.c
+++ b/src/server/god_commands.c
@@ -81,7 +81,7 @@ static uint8_t parse_thingtype_manipulation(char * tok0, char * tok1)
err_line(1, "No thing type defined to manipulate yet.");
return 1;
}
- uint8_t id;
+ int16_t id;
if ( parse_val(tok0,tok1,s[S_CMD_TT_CONSUM],'8',(char *) &tt->consumable)
|| parse_val(tok0,tok1,s[S_CMD_TT_HP],'8',(char *) &tt->lifepoints)
|| parse_val(tok0,tok1,s[S_CMD_TT_STARTN],'8',(char *) &tt->start_n)
@@ -96,7 +96,7 @@ static uint8_t parse_thingtype_manipulation(char * tok0, char * tok1)
}
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], 'i', (char *) &id))
{
tt = get_thing_type(id);
if (!tt)
@@ -135,7 +135,7 @@ static uint8_t parse_thingaction_manipulation(char * tok0, char * tok1)
err_line(1, "No thing action defined to manipulate yet.");
return 1;
}
- uint8_t id;
+ int16_t id;
if (parse_val(tok0, tok1, s[S_CMD_TA_EFFORT],'8',(char *)&ta->effort));
else if (parse_val(tok0, tok1, s[S_CMD_TA_NAME], 's', (char *)&ta->name))
{
@@ -157,13 +157,8 @@ static uint8_t parse_thingaction_manipulation(char * tok0, char * tok1)
}
}
}
- else if (parse_val(tok0, tok1, s[S_CMD_THINGACTION], '8', (char *) &id))
+ else if (parse_val(tok0, tok1, s[S_CMD_TA_ID], '8', (char *) &id))
{
- if (!id)
- {
- err_line(1, "Value must be >= 1 and <= 255.");
- return 1;
- }
ta = get_thing_action(id);
if (!ta)
{
@@ -290,15 +285,15 @@ static uint8_t parse_thing_manipulation(char * tok0, char * tok1)
err_line(1, "No thing defined to manipulate yet.");
return 1;
}
- uint8_t id;
- if ( parse_thing_type(tok0, tok1, t)
+ int16_t id;
+ if ( parse_thing_type(tok0, tok1, t)
|| parse_thing_command(tok0, tok1, t)
|| parse_val(tok0,tok1, s[S_CMD_T_ARGUMENT], '8', (char *)&t->arg)
|| parse_val(tok0,tok1, s[S_CMD_T_PROGRESS], '8', (char *)&t->progress)
|| 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.";