Note–this code was not tested to compile, etc., but I hope it gives the general idea.
Don’t you want to push
a button on the laser instead?
If so, see code below.
[spoiler]the button is a thing. the button is part of the laser.
understand “laser button” and as button.
does the player mean pushing the laser button: it is very likely.
instead of pushing the laser:
say “Maybe you want to push the button on the laser? The laser gun is too bulky to move.”[/spoiler]
Otherwise, here’s my guess. But it seems awkward.
[spoiler]moving is an action applying to one thing.
understand the command “move [something]” as something new. understand “move [something]” as moving.
carry out moving:
if the noun is not the laser:
try pushing the noun instead;
say “Which way do you want to move the laser?” instead;
moving to is an action applying to one thing and one direction.
understand the command “move [something] [direction]” as something new. understand “move [something] [direction]” as moving.
carry out moving (a - a thing) to (b - a direction):
if noun is not the laser:
say “Pick it up instead.” instead;
if nowhere is second noun of the location of the player:
try going b instead;
move player b;
move laser b;[/spoiler]
If you make a grammar line that has a token that’s more specific than [something], the more specific grammar takes precedence. But because “move” is a synonym for “push”, you also need to remove that definition and re-understand it as normal pushing (and, if you need it, pushing between rooms).
[code]The city is a room. An apartment is a kind of thing. The home is an apartment. It is in the city. The park is in the city.
Apartment-moving is an action applying to one visible thing.
Understand the command “move” as something new.
Understand “move [something]” as pushing.
Understand “move [something] [direction]” as pushing it to.
Understand “move [apartment]” as apartment-moving.
say “You move [the noun].”
Test me with “actions on/push park/move park/push home/move home”.[/code]