Platypus Bugs

From IFWiki

Geting 'Up'

Because of the ordering of the rules in Last.h the command "get up" doesn't work. The parser thinks that you are trying to 'get' the direction object 'up'. To fix this, the order of the grammar rules for 'get' has to be fixed. The following patch (unified diff format) provides the fix:

diff -ru platypus-0.4+/library/Last.h platypus-mine/library/Last.h
--- platypus-0.4+/library/Last.h        2005-05-04 21:20:02.000000000 -0400
+++ platypus-mine/library/Last.h        2005-05-04 21:23:52.000000000 -0400
@@ -160,8 +160,8 @@
                 * multiinside 'from' 'under' noun       -> TakeFromUnder
                 * multiinside 'out' 'from' 'under' noun -> TakeFromUnder
                 * 'inventory'                           -> Inv;
-Verb 'get'      * multi                                 -> Take
-                * 'out'/'off'/'up'                      -> Exit
+Verb 'get'      * 'out'/'off'/'up'                      -> Exit
+                * multi                                 -> Take
                 * 'in'/'into' noun                      -> EnterIn
                 * 'on'/'onto' noun                      -> EnterOn
                 * 'under'/'beneath' noun                -> EnterUnder

Technically this prevents you from picking up any objects named "out", "off", or "up"... But I think that's not particularly likely to come up. (No pun intended.)

Benabik 20:44, 4 May 2005 (Central Daylight Time)

Toyshop... OF EVIL: the_pin hums too much

Technically, this is not an error in the library, but toyshop.inf is distributed with it as an example. After you pull the pin out of the grenade, the_pin.each_turn is called twice. I traced it down to the fact that the pin is in scope twice: once for being in your inventory and once because of grenade.add_to_scope. The following patch (unified diff format) provides the fix:

diff -ru platypus-0.4+/examples/toyevil.inf platypus-mine/examples/toyevil.inf
--- platypus-0.4+/examples/toyevil.inf  2005-05-04 21:19:40.000000000 -0400
+++ platypus-mine/examples/toyevil.inf  2005-05-04 21:22:20.000000000 -0400
@@ -265,7 +265,10 @@
 Object -> grenade "nasty-looking hand grenade"
   with name 'grenade',
     adjective 'hand' 'nasty' 'nasty-looking',
-    add_to_scope the_pin,
+    add_to_scope [;
+        if (the_pin in self)
+            PlaceInScope(the_pin)
+    ],
     description "Not recommended for children under 90.",
     describe [;
         if (self hasnt moved)

Benabik 20:44, 4 May 2005 (Central Daylight Time)