changeset 359:6b94f549443b

JIM comments on safe opening, if able
author Neil Muller <neil@dip.sun.ac.za>
date Sat, 28 Aug 2010 16:36:38 +0200
parents 760f6a318d2e
children 452230d78541
files gamelib/scenes/crew_quarters.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/crew_quarters.py	Sat Aug 28 16:50:37 2010 +0200
+++ b/gamelib/scenes/crew_quarters.py	Sat Aug 28 16:36:38 2010 +0200
@@ -2,6 +2,8 @@
 
 from gamelib.cursor import CursorSprite
 from gamelib.state import Scene, Item, Thing, Result
+
+from gamelib.scenes.game_constants import PLAYER_ID
 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage,
                                           InteractRectUnion, InteractImage,
                                           InteractAnimated, GenericDescThing,
@@ -23,7 +25,6 @@
         self.add_thing(ToMap())
         self.add_thing(Safe())
         self.add_thing(FishbowlThing())
-        self.add_thing(Safe())
         self.add_item(Fishbowl('fishbowl'))
         self.add_item(DuctTape('duct_tape'))
         self.add_item(EscherPoster('escher_poster'))
@@ -86,10 +87,16 @@
         # TODO: Wax lyrical some more about safecracking.
         self.set_data('is_cracked', True)
         self.set_interact('full_safe')
-        return Result("Even after centuries of neglect, the tumblers slide"
+        open_result = Result("Even after centuries of neglect, the tumblers slide"
                       " almost silently into place. Turns out the combination"
                       " was '1 2 3 4 5'. An idiot must keep his luggage in"
                       " here.")
+        if self.state.scenes['bridge'].get_data('ai status') == 'online':
+            return open_result, Result("JIM says: 'Prisoner %s, you have been observed commiting a felony violation. "
+                    "This will go onto your permenant record, and your sentence may be extended by up to twenty years."
+                    % PLAYER_ID, style="JIM")
+        else:
+            return open_result
 
     def get_description(self):
         return "Ah, a vintage Knoxx & Co. model QR3. Quaint, but reasonably secure."