Massage "{oil|water} {plant|door} into equivalent pourcommand.
Bedfore this change the command was passed in OV form, which we want to get rid of.
This commit is contained in:
parent
0468da2cdf
commit
cfa37c83a7
1 changed files with 5 additions and 3 deletions
8
main.c
8
main.c
|
@ -1123,9 +1123,11 @@ Lclearobj:
|
||||||
}
|
}
|
||||||
if ((command.word[0].id == WATER || command.word[0].id == OIL) && (command.word[1].id == PLANT || command.word[1].id == DOOR)) {
|
if ((command.word[0].id == WATER || command.word[0].id == OIL) && (command.word[1].id == PLANT || command.word[1].id == DOOR)) {
|
||||||
if (AT(command.word[1].id)) {
|
if (AT(command.word[1].id)) {
|
||||||
command.word[1].id = POUR;
|
memcpy(&command.word[1], &command.word[0],
|
||||||
command.word[1].type = ACTION;
|
sizeof(command_word_t));
|
||||||
strncpy(command.word[1].raw, "pour", LINESIZE - 1);
|
command.word[0].id = POUR;
|
||||||
|
command.word[0].type = ACTION;
|
||||||
|
strncpy(command.word[0].raw, "pour", LINESIZE - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (command.word[0].id == CAGE && command.word[1].id == BIRD && HERE(CAGE) && HERE(BIRD)) {
|
if (command.word[0].id == CAGE && command.word[1].id == BIRD && HERE(CAGE) && HERE(BIRD)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue