home · contact · privacy
Plugin: Fix bug in thing type detection of play_use.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 5 Mar 2016 14:19:46 +0000 (15:19 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 5 Mar 2016 14:19:46 +0000 (15:19 +0100)
plugins/server/PleaseTheIslandGod.py

index 770ce51aa76d488d285270eefcde6261d54b543e..4a884ed37883ab5cf11294d1d204376e1a9cf654 100644 (file)
@@ -375,7 +375,7 @@ def play_use_attempt_hook(t, tt):
                 wood_id = tid
                 break
         if wood_id == None:
-            log("You CAN'T use a " + world_db["ThingTypes"][type]["TT_NAME"]
+            log("You CAN'T use a " + tt["TT_NAME"]
                 + " without some wood in your inventory.")
             return False
         return True
@@ -387,7 +387,7 @@ def play_use_attempt_hook(t, tt):
     elif tt["TT_TOOL"] == "wood":
         log("To use wood, you NEED a carpentry tool.")
         return False
-    elif type == world_db["SLIPPERS"]:
+    elif tt == world_db["ThingTypes"][world_db["SLIPPERS"]]:
         return True
 
 def play_pickup_attempt_hook(t):