Mercurial > pyntnclick
comparison gamelib/scenes/machine.py @ 193:738608e90e9c
CloneableItem tweaks and a usable laser welder. zOMG!
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Wed, 25 Aug 2010 21:59:26 +0200 |
parents | 30f2308c1efc |
children | 9887c68110d8 |
comparison
equal
deleted
inserted
replaced
192:b1f4262139e7 | 193:738608e90e9c |
---|---|
13 } | 13 } |
14 | 14 |
15 def __init__(self, state): | 15 def __init__(self, state): |
16 super(Machine, self).__init__(state) | 16 super(Machine, self).__init__(state) |
17 self.add_thing(ToMap()) | 17 self.add_thing(ToMap()) |
18 self.add_thing(LaserWelder()) | |
18 | 19 |
19 def enter(self): | 20 def enter(self): |
20 return Result("The machine room is dark and forbidding.") | 21 return Result("The machine room is dark and forbidding.") |
21 | 22 |
22 | 23 |
76 }[starting_cans]) | 77 }[starting_cans]) |
77 else: | 78 else: |
78 return Result("The machine has enough cans to weld for the moment.") | 79 return Result("The machine has enough cans to weld for the moment.") |
79 | 80 |
80 def get_description(self): | 81 def get_description(self): |
81 msg = "This is a Smith and Wesson 'zOMG' class high-precision laser welder." | 82 if self.get_data('cans_in_place') == 0: |
83 return "This is a Smith and Wesson 'zOMG' class high-precision laser welder." | |
84 msg = "The laser welder looks hungry, somehow." | |
82 if self.get_data('cans_in_place') == 1: | 85 if self.get_data('cans_in_place') == 1: |
83 msg += " It currently contains an empty can." | 86 msg += " It currently contains an empty can." |
84 elif self.get_data('cans_in_place') == 2: | 87 elif self.get_data('cans_in_place') == 2: |
85 msg += " It currently contains two empty cans." | 88 msg += " It currently contains two empty cans." |
86 elif self.get_data('cans_in_place') == 3: | 89 elif self.get_data('cans_in_place') == 3: |