comparison gamelib/scenes/mess.py @ 299:c3ff6ff879e6

Make the can Thing go away when it's empty.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 28 Aug 2010 01:16:27 +0200
parents 86e3d5dd7fa6
children 6d93e04036c9
comparison
equal deleted inserted replaced
298:44f1dcb49d3f 299:c3ff6ff879e6
114 can = FullCan("full_can") 114 can = FullCan("full_can")
115 self.state.add_item(can) 115 self.state.add_item(can)
116 self.state.add_inventory_item(can.name) 116 self.state.add_inventory_item(can.name)
117 self.set_data('cans_available', starting_cans - 1) 117 self.set_data('cans_available', starting_cans - 1)
118 self.set_interact('%icans' % (starting_cans - 1)) 118 self.set_interact('%icans' % (starting_cans - 1))
119 if starting_cans == 1:
120 self.scene.remove_thing(self)
119 return Result({ 121 return Result({
120 3: "Best before a long time in the past. Better not eat these.", 122 3: "Best before a long time in the past. Better not eat these.",
121 2: "Mmmm. Nutritious bacteria stew.", 123 2: "Mmmm. Nutritious bacteria stew.",
122 1: "Candied silkworms. Who stocked this place?!", 124 1: "Candied silkworms. Who stocked this place?!",
123 }[starting_cans]) 125 }[starting_cans])