- [NEW] Ajuda en la consola de PoolOS

- [FIX] Si no se te la bolsa i s'intenta pillar una part, no ha de petar el joc
- Algún gràfic més.
- Més habitacions
This commit is contained in:
2024-09-24 09:24:47 +02:00
parent 6dc59af774
commit eb86874244
8 changed files with 562 additions and 14 deletions

View File

@@ -134,9 +134,10 @@ namespace console
#define CMD_EXIT 4
#define CMD_SHOW 5
#define CMD_HIDE 6
#define NUM_CMDS 7
#define CMD_HELP 7
#define NUM_CMDS 8
const char *command_text[NUM_CMDS] = { "GIVE", "DROP", "GOTO", "MOVE", "EXIT", "SHOW", "HIDE" };
const char *command_text[NUM_CMDS] = { "GIVE", "DROP", "GOTO", "MOVE", "EXIT", "SHOW", "HIDE", "HELP" };
#define PARAM_UNKNOWN -1
#define PARAM_RUN 0
@@ -282,6 +283,40 @@ namespace console
debug::disable(value);
}
break;
case CMD_HELP:
if (!tokens[1]) {
strcpy(msg, "GIVE DROP GOTO MOVE EXIT SHOW HIDE HELP");
} else {
int command = getCommand();
switch (command)
{
case CMD_UNKNOWN:
strcpy(msg, "Unknown command, cannot help.");
break;
case CMD_GIVE:
strcpy(msg, "RUN GOD JUMP LIVE SHOES GLOVES PANTS BAG FILTER PUMP TIMER SALT PIPE ELBOW");
break;
case CMD_DROP:
strcpy(msg, "RUN GOD JUMP LIVE SHOES GLOVES PANTS BAG FILTER PUMP TIMER SALT PIPE ELBOW");
break;
case CMD_GOTO:
strcpy(msg, "PARAM: Number of room to go.");
break;
case CMD_MOVE:
strcpy(msg, "PARAMS: Axis Number. Exemple: MOVE X 16, MOVE Z 4...");
break;
case CMD_EXIT:
strcpy(msg, "Exits the game.");
break;
case CMD_SHOW:
strcpy(msg, "NOTHING ACTOR-POS");
break;
case CMD_HIDE:
strcpy(msg, "NOTHING ACTOR-POS");
break;
}
}
}
cmd_size=0;
cmd[cmd_size] = '\0';