From 160e1660559e70c53ab2fcfc8af6461f539c647d Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sat, 5 Mar 2016 15:19:46 +0100
Subject: [PATCH] Plugin: Fix bug in thing type detection of play_use.

---
 plugins/server/PleaseTheIslandGod.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/server/PleaseTheIslandGod.py b/plugins/server/PleaseTheIslandGod.py
index 770ce51..4a884ed 100644
--- a/plugins/server/PleaseTheIslandGod.py
+++ b/plugins/server/PleaseTheIslandGod.py
@@ -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):
-- 
2.30.2