changeset 228:ce1e85768f7b

Flavour interactions for mess hall
author Neil Muller <neil@dip.sun.ac.za>
date Thu, 26 Aug 2010 23:11:32 +0200
parents be4ac4418aa2
children 1e970e759ac0
files gamelib/scenes/cryo.py gamelib/scenes/machine.py gamelib/scenes/mess.py
diffstat 3 files changed, 32 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/cryo.py	Thu Aug 26 23:00:20 2010 +0200
+++ b/gamelib/scenes/cryo.py	Thu Aug 26 23:11:32 2010 +0200
@@ -172,6 +172,12 @@
     def is_interactive(self):
         return self.get_data('fixed')
 
+    def get_description(self):
+        if self.get_data('fixed'):
+            return "These pipes carry cooling fluid to the cryo units."
+        else:
+            return "There used to be a pipe carrying cooling fuild here"
+
 
 class CryoPipe(CloneableItem):
     "After emptying the full can."
--- a/gamelib/scenes/machine.py	Thu Aug 26 23:00:20 2010 +0200
+++ b/gamelib/scenes/machine.py	Thu Aug 26 23:11:32 2010 +0200
@@ -131,7 +131,7 @@
     "Titanium machete, formerly a leg."
 
     INVENTORY_IMAGE = "triangle.png"
-    CURSOR = CursorSprite('titanium_femur_cursor.png', 47, 3)
+    CURSOR = CursorSprite('titanium_femur_cursor.png', 20, 3)
 
 
 SCENES = [Machine]
--- a/gamelib/scenes/mess.py	Thu Aug 26 23:00:20 2010 +0200
+++ b/gamelib/scenes/mess.py	Thu Aug 26 23:11:32 2010 +0200
@@ -3,6 +3,7 @@
 from random import choice
 
 from gamelib.state import Scene, Item, CloneableItem, Thing, InteractImage, InteractNoImage, Result
+from gamelib.statehelpers import GenericDescThing
 from gamelib.cursor import CursorSprite
 
 
@@ -20,6 +21,24 @@
         self.add_thing(CansOnShelf())
         self.add_thing(Tubes())
         self.add_thing(ToMap())
+        # Flavour items
+        # extra cans on shelf
+        self.add_thing(GenericDescThing('mess.cans', 1,
+            "A large collection of rusted, useless cans",
+            (
+                (154, 335, 89, 106),
+                (152, 435, 63, 66),
+                )))
+        self.add_thing(GenericDescThing('mess.broccoli', 2,
+            "An impressively overgrown broccoli.",
+            (
+                (503, 89, 245, 282),
+                (320, 324, 229, 142),
+                )))
+        self.add_thing(GenericDescThing('mess.cans', 2,
+            "Empty plastic containers. They used to hold dish washer soap",
+            ((565, 399, 62, 95),)))
+
 
 
 class BaseCan(CloneableItem):
@@ -126,6 +145,9 @@
         "fixed": False,
         }
 
+    def get_description(self):
+        return "The brocolli seems to have become entangled with something"
+
     def interact_with_machete(self, item):
         if self.get_data("status") == "blocked":
             self.set_data("status", "broken")
@@ -179,6 +201,9 @@
 
     INITIAL = "door"
 
+    def get_description(self):
+        return "A doorway leads out to the rest of the ship"
+
     def interact_without(self):
         """Go to map."""
         self.state.set_current_scene("map")