Mercurial > boomslang
comparison gamelib/scenes/map.py @ 360:452230d78541
Use make_jim_dialog everywhere
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 16:51:40 +0200 |
parents | bfb6c682b4fb |
children | 41ee3fc71404 |
comparison
equal
deleted
inserted
replaced
359:6b94f549443b | 360:452230d78541 |
---|---|
9 | 9 |
10 from gamelib.state import Scene, Item, Thing, Result | 10 from gamelib.state import Scene, Item, Thing, Result |
11 from gamelib.scenes.game_constants import PLAYER_ID | 11 from gamelib.scenes.game_constants import PLAYER_ID |
12 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, | 12 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, |
13 InteractRectUnion, InteractImage, | 13 InteractRectUnion, InteractImage, |
14 InteractAnimated, GenericDescThing) | 14 InteractAnimated, GenericDescThing, |
15 make_jim_dialog) | |
15 | 16 |
16 | 17 |
17 class Map(Scene): | 18 class Map(Scene): |
18 | 19 |
19 FOLDER = "map" | 20 FOLDER = "map" |
36 def enter(self): | 37 def enter(self): |
37 for door_thing in self.things.values(): | 38 for door_thing in self.things.values(): |
38 door_thing.check_dest() | 39 door_thing.check_dest() |
39 if self.get_data('implant'): | 40 if self.get_data('implant'): |
40 self.set_data('implant', False) | 41 self.set_data('implant', False) |
41 return (Result( | 42 ai1 = make_jim_dialog( |
42 "JIM says: 'Under the terms of the emergency conscription " | 43 "Under the terms of the emergency conscription " |
43 "act, I have downloaded the ship's schematics to your " | 44 "act, I have downloaded the ship's schematics to your " |
44 "neural implant to help you navigate around the ship. " | 45 "neural implant to help you navigate around the ship. " |
45 "Please report to the bridge.'", style="JIM"), | 46 "Please report to the bridge.", self.state) |
46 Result( | 47 if ai1: |
47 "JIM continues: 'Prisoner %s. You are classed " | 48 return ai1, make_jim_dialog("Prisoner %s. You are classed " |
48 "as a class 1 felon. Obtaining access to the ship's schematics " | 49 "as a class 1 felon. Obtaining access to the ship's schematics " |
49 "constitutes a level 2 offence and carries a minimal penalty " | 50 "constitutes a level 2 offence and carries a minimal penalty " |
50 "of an additional 3 years on your sentence.'" % PLAYER_ID, | 51 "of an additional 3 years on your sentence.'" % PLAYER_ID, self.state) |
51 style="JIM")) | |
52 | 52 |
53 | 53 |
54 class DoorThing(Thing): | 54 class DoorThing(Thing): |
55 | 55 |
56 # name of destination | 56 # name of destination |