using 2 verbs on one object

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!

A check rule cannot cover two different verbs. However, for this case – two actions that you want identical outcomes for – you could reduce repetition:

Check pushing:
	instead try pulling the noun.

Okay, thanks, glad I’m not missing something! I should have mentioned I actually want occasionally different stuff, so now that I think about it, I could just say

[code]An object can be pull-is-push. an object is usually not pull-is-push.

check pulling a pull-is-push object: try pushing the noun instead.[/code]

So I feel a bit silly not thinking of this before, but maybe it’ll help someone down the line.

Yes, that kind of limited check-and-divert rule is more commonly useful. I do that a lot.