I have some code that works as follows.
[code]room 1 is a room. the vent is a thing in room 1.
the can’t push what’s fixed in place rule is not listed in any rulebook. the can’t pull what’s fixed in place rule is not listed in any rulebook. the can’t push scenery rule is not listed in any rulebook. the can’t push people rule is not listed in any rulebook. the can’t pull scenery rule is not listed in any rulebook. the can’t pull people rule is not listed in any rulebook. [just so the code works]
check pulling:
if noun is a person:
say “Physical force will work out poorly.” instead;
if noun is vent:
try opening vent instead;
say “(reject).” instead;
check pushing:
if noun is a person:
say “Physical force will work out poorly.” instead;
if noun is vent:
try opening vent instead;
say “(reject).” instead;[/code]
This works okay but I’m wondering if there’s a way to lump the first two ifs into one statement cleanly. I have a feeling I’m flaking and missing something simple. Any suggestions?
Thanks!