# HG changeset patch # User Jeremy Thurgood # Date 1302358172 -7200 # Node ID de71c3fa5626031ea5505dc15e95dea7fa0de800 # Parent 87a4a93499895564cffb1e57d715fc2d7ff7e084 Tea notification stuff. diff -r 87a4a9349989 -r de71c3fa5626 skaapsteker/sprites/items.py --- 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.")