>LOOK
Below Decks
This had to have been a mine locker. There is a door forward and a passage above
your head.
A number of spherical mines with spikes sticking out of them litter the room.
These mines must have once been used to blockade shipping lanes. Most of them
are tethered together on the deck, but one is floating up near the hole in the
ceiling.
>EXAMINE MAGNET
The portable electromagnet has a switch which is currently off.
>PUT MAGNET ON MINE
The portable electromagnet is now touching the loose mine.
>DROP MINE
It's stuck to the magnet.
That's because the mine is moved into the magnet when you put the magnet on it. Usually, objects are only moved into the magnet when the magnet on but this is an exception. The magnet's container routine doesn't check for that exception, though:
<ROUTINE MAGNET-F ("OPTIONAL" (RARG <>) "AUX" F N OBJ)
<COND (<EQUAL? .RARG ,M-CONT>
<COND (<AND <VERB? TAKE WEAR>
<NOT <PRSO? ,MINE>>
,MAGNET-ON>
<TELL "The magnet's stronger than you are." CR>)
(<VERB? DROP THROW>
<TELL "It's stuck to the magnet." CR>)>)
I don't suggest changing the behavior of the mine and magnet, but perhaps a different failure message than "It's stuck to the magnet." would be appropriate?
That's because the mine is moved into the magnet when you put the magnet on it. Usually, objects are only moved into the magnet when the magnet on but this is an exception. The magnet's container routine doesn't check for that exception, though:
I don't suggest changing the behavior of the mine and magnet, but perhaps a different failure message than "It's stuck to the magnet." would be appropriate?