# HG changeset patch # User Stefano Rivera # Date 1283011369 -7200 # Node ID c80a1bd291d19ab71ca38f44698f575765920399 # Parent 277a7a0c2cea425528020c941a3858e3611c14d2 Only give vandalism warning once diff -r 277a7a0c2cea -r c80a1bd291d1 TODO --- a/TODO Sat Aug 28 17:50:21 2010 +0200 +++ b/TODO Sat Aug 28 18:02:49 2010 +0200 @@ -11,7 +11,3 @@ * Clean-up finding and loading of speech strings. * Move interacts out into their own module? * Fix thing.enter being called multiple times without leaving - -Artwork: - * Can Pipe - * 0/1 Fixed can + 0/1/2 fixed pipes + ductape overlay images diff -r 277a7a0c2cea -r c80a1bd291d1 gamelib/scenes/cryo.py --- a/gamelib/scenes/cryo.py Sat Aug 28 17:50:21 2010 +0200 +++ b/gamelib/scenes/cryo.py Sat Aug 28 18:02:49 2010 +0200 @@ -22,7 +22,8 @@ INITIAL_DATA = { 'accessible': True, - 'greet' : True + 'greet' : True, + 'vandalism_warn': True, } # sounds that will be played randomly as background noise @@ -156,7 +157,7 @@ INITIAL_DATA = { 'fixed': True, - } + } def interact_with_machete(self, item): if self.get_data('fixed'): @@ -165,11 +166,15 @@ self.state.add_item(pipe) self.state.add_inventory_item(pipe.name) self.set_interact("chopped") - return (Result("It takes more effort than one would expect, but " - "eventually the pipe is separated from the wall."), - make_jim_dialog("Prisoner %s. Vandalism is an offence " - "punishable by a minimum of an additional 6 months " - "to your sentence" % PLAYER_ID, self.state)) + responses = [Result("It takes more effort than one would expect, but " + "eventually the pipe is separated from the wall.")] + if self.state.current_scene.get_data('vandalism_warn'): + self.state.current_scene.set_data('vandalism_warn', False) + responses.append(make_jim_dialog( + ("Prisoner %s. Vandalism is an offence punishable by a " + "minimum of an additional 6 months to your sentence" + ) % PLAYER_ID, self.state)) + return responses def is_interactive(self): return self.get_data('fixed')