diff skaapsteker/sprites/items.py @ 388:de71c3fa5626

Tea notification stuff.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 09 Apr 2011 16:09:32 +0200
parents 87246b84a851
children 135cbb99511f
line wrap: on
line diff
--- a/skaapsteker/sprites/items.py	Sat Apr 09 16:07:19 2011 +0200
+++ b/skaapsteker/sprites/items.py	Sat Apr 09 16:09:32 2011 +0200
@@ -2,6 +2,10 @@
 from .base import Item
 
 
+def notify(text):
+    engine.OpenNotification.post(text=text)
+
+
 class BreakableItem(Item):
     whole_image_file = None
     broken_image_file = None
@@ -74,17 +78,18 @@
         if player.has_item('tealeaf'):
             self._me.brewed = True
             player.discard_item()
-            engine.OpenNotification.post(text="A nice cup of tea is brewing.")
+            notify("A nice cup of tea is brewing.")
             return
         if player.has_item('teacup'):
             if self._me.brewed:
                 player.discard_item()
                 player.take_item_by_name('teacupfull')
                 self._me.brewed = False
+                notify("You have tea now.")
             else:
-                print "Sadly, the teapot is empty."
+                notify("Sadly, the teapot is empty.")
             return
-        engine.OpenNotification.post(text="A proper tea ceremony requires a cup.")
+        notify("A proper tea ceremony requires a cup.")