Implement and document state-changes messages in YAML.

Examples at the lamp and grate.  This is a way to pull strings out of
arbitrary_messages and make them part of the object definition.
This commit is contained in:
Eric S. Raymond 2017-06-28 16:14:23 -04:00
parent aca6d79087
commit 1ed8126912
5 changed files with 135 additions and 105 deletions

5
misc.c
View file

@ -166,7 +166,7 @@ void pspeak(vocab_t msg, enum speaktype mode, int skip, ...)
vspeak(objects[msg].inventory, ap);
break;
case look:
vspeak(objects[msg].longs[skip], ap);
vspeak(objects[msg].descriptions[skip], ap);
break;
case hear:
vspeak(objects[msg].sounds[skip], ap);
@ -174,6 +174,9 @@ void pspeak(vocab_t msg, enum speaktype mode, int skip, ...)
case study:
vspeak(objects[msg].texts[skip], ap);
break;
case change:
vspeak(objects[msg].changes[skip], ap);
break;
}
va_end(ap);
}