comparison gamelib/gameboard.py @ 305:32149b1d9fd2

Capitalised all equipment names.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 05 Sep 2009 17:36:36 +0000
parents e12d99215b74
children bf1df0902883
comparison
equal deleted inserted replaced
304:67021d0920dc 305:32149b1d9fd2
352 if not self.day: 352 if not self.day:
353 return 353 return
354 self.selected_tool = tool 354 self.selected_tool = tool
355 if self.animal_to_place: 355 if self.animal_to_place:
356 # Clear any highlights 356 # Clear any highlights
357 self.animal_to_place.unequip_by_name("spotlight") 357 self.animal_to_place.unequip_by_name("Spotlight")
358 self.select_animal_to_place(None) 358 self.select_animal_to_place(None)
359 sprite_curs = None 359 sprite_curs = None
360 if buildings.is_building(tool): 360 if buildings.is_building(tool):
361 sprite_curs = sprite_cursor.SpriteCursor(tool.IMAGE, self.tv, tool.BUY_PRICE) 361 sprite_curs = sprite_cursor.SpriteCursor(tool.IMAGE, self.tv, tool.BUY_PRICE)
362 elif equipment.is_equipment(tool): 362 elif equipment.is_equipment(tool):
487 if building and building.NAME in buildings.HENHOUSES: 487 if building and building.NAME in buildings.HENHOUSES:
488 self.open_building_dialog(building, do_sell) 488 self.open_building_dialog(building, do_sell)
489 489
490 def select_animal_to_place(self, animal): 490 def select_animal_to_place(self, animal):
491 if self.animal_to_place: 491 if self.animal_to_place:
492 self.animal_to_place.unequip_by_name("spotlight") 492 self.animal_to_place.unequip_by_name("Spotlight")
493 self.animal_to_place = animal 493 self.animal_to_place = animal
494 if self.animal_to_place: 494 if self.animal_to_place:
495 self.animal_to_place.equip(equipment.Spotlight()) 495 self.animal_to_place.equip(equipment.Spotlight())
496 496
497 def place_animal(self, tile_pos): 497 def place_animal(self, tile_pos):
523 else: 523 else:
524 self.open_building_dialog(building) 524 self.open_building_dialog(building)
525 return 525 return
526 if self.tv.get(tile_pos) == self.GRASSLAND: 526 if self.tv.get(tile_pos) == self.GRASSLAND:
527 if self.animal_to_place is not None: 527 if self.animal_to_place is not None:
528 self.animal_to_place.unequip_by_name("nest") 528 self.animal_to_place.unequip_by_name("Nest")
529 self.relocate_animal(self.animal_to_place, tile_pos=tile_pos) 529 self.relocate_animal(self.animal_to_place, tile_pos=tile_pos)
530 self.eggs -= self.animal_to_place.get_num_eggs() 530 self.eggs -= self.animal_to_place.get_num_eggs()
531 self.animal_to_place.remove_eggs() 531 self.animal_to_place.remove_eggs()
532 self.toolbar.update_egg_counter(self.eggs) 532 self.toolbar.update_egg_counter(self.eggs)
533 533