changeset 515:6c21ba7de1e6

Better signal fire interaction.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 09 Apr 2011 23:28:12 +0200
parents dbf99f763060
children 9a1f8925d227
files skaapsteker/sprites/items.py
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/sprites/items.py	Sat Apr 09 23:22:15 2011 +0200
+++ b/skaapsteker/sprites/items.py	Sat Apr 09 23:28:12 2011 +0200
@@ -124,7 +124,6 @@
     image_file = 'props/oil.png'
 
 
-# TODO: Finish this thing's behaviour
 class SignalFire(Item):
     image_file = 'props/signal_fire/signal_fire_unlit.png'
 
@@ -146,18 +145,25 @@
         if self._me.litness == 'set':
             if player.has_item('kindling'):
                 notify("You put the kindling in the signal fire.")
+                self._me.litness = 'kindled'
             elif player.has_item('oil'):
                 notify("You pour the oil on the signal fire.")
+                self._me.litness = 'oiled'
             else:
+                notify("This signal fire needs some oil and kindling before it can be lit.")
                 return
             player.discard_item()
-            self._me.litness = 'kindled'
-        elif self._me.litness == 'kindled':
+
+        elif self._me.litness in ['oiled', 'kindled']:
             if player.has_item('kindling'):
                 notify("You put the kindling on the signal fire and light it.")
             elif player.has_item('oil'):
                 notify("You pour the oil on the signal fire and light it.")
             else:
+                if self._me.litness == 'oiled':
+                    notify("This fire still needs some kindling before it can be lit.")
+                else:
+                    notify("This fire still needs some oil before it can be lit.")
                 return
             player.discard_item()
             self._me.litness = 'burning'