diff skaapsteker/sprites/base.py @ 335:c6552e9fc2e1

Added aburage.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 09 Apr 2011 12:15:19 +0200
parents e499a10eb41f
children c8fd82ff0c71
line wrap: on
line diff
--- a/skaapsteker/sprites/base.py	Sat Apr 09 12:13:53 2011 +0200
+++ b/skaapsteker/sprites/base.py	Sat Apr 09 12:15:19 2011 +0200
@@ -225,11 +225,11 @@
 class Item(GameSprite):
     mobile = False
     gravitates = False
+    actionable = True
 
     collision_layer = NPC_LAYER
 
-    portable = True
-    actionable = True
+    debug_color = (240, 0, 240)
 
     def __init__(self, pos, **opts):
         GameSprite.__init__(self, pos, **opts)
@@ -239,13 +239,7 @@
     def setup(self, name, world):
         self.name = name
         self.world = world
-        self.item_state = getattr(self.world.items, self.name)
-
-
-    def get_debug_color(self):
-        if self.portable:
-            return (240, 0, 240)
-        return (0, 0, 240)
+        self._me = getattr(self.world.items, self.name)
 
 
     def player_action(self, player):
@@ -253,6 +247,10 @@
         player.take_item(self)
 
 
+    def remove(self):
+        self._me.level = '_limbo'
+        self.kill()
+
 
 class Geography(Sprite):
     mobile = False