Add "then" condition string builder type

Better for some sentences
This commit is contained in:
toaster 2024-04-10 17:24:45 +01:00
parent 9383551cc3
commit 0c782767be
4 changed files with 7 additions and 2 deletions

View file

@ -4876,7 +4876,7 @@ static void Command_cxdiag_f(void)
continue;
}
if (cn->type == UC_AND || cn->type == UC_COMMA)
if (cn->type == UC_AND || cn->type == UC_THEN || cn->type == UC_COMMA)
{
if (firstpass)
;

View file

@ -2983,6 +2983,7 @@ static void readcondition(UINT16 set, UINT32 id, char *word2)
}
}
else if ((offset=0) || fastcmp(params[0], "AND")
|| (++offset && fastcmp(params[0], "THEN"))
|| (++offset && fastcmp(params[0], "COMMA")))
{
//PARAMCHECK(1);

View file

@ -1638,6 +1638,7 @@ boolean M_CheckCondition(condition_t *cn, player_t *player)
// Just for string building
case UC_AND:
case UC_THEN:
case UC_COMMA:
case UC_DESCRIPTIONOVERRIDE:
return true;
@ -2008,7 +2009,7 @@ static boolean M_CheckConditionSet(conditionset_t *c, player_t *player)
continue;
// Skip entries that are JUST for string building
if (cn->type == UC_AND || cn->type == UC_COMMA || cn->type == UC_DESCRIPTIONOVERRIDE)
if (cn->type == UC_AND || cn->type == UC_THEN || cn->type == UC_COMMA || cn->type == UC_DESCRIPTIONOVERRIDE)
continue;
lastID = cn->id;
@ -2524,6 +2525,8 @@ static const char *M_GetConditionString(condition_t *cn)
case UC_AND:
return "&";
case UC_THEN:
return "then";
case UC_COMMA:
return ",";
case UC_DESCRIPTIONOVERRIDE:

View file

@ -76,6 +76,7 @@ typedef enum
// Just for string building
UC_AND,
UC_THEN,
UC_COMMA,
UC_DESCRIPTIONOVERRIDE,