Changeset 172:f7f29f1d434b


Ignore:
Timestamp:
Sep 3, 2009, 11:03:39 PM (11 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@173
Message:

Don't allow occupied buildings to be sold (dialog can probably be dropped once buildings show their number of occupants).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/gameboard.py

    r170 r172  
    328328        tbl.tr()
    329329        tbl.td(gui.Spacer(100, 0))
    330         tbl.td(close_button)
     330        tbl.td(close_button, align=1)
    331331
    332332        self.disp.open(tbl)
     
    438438        building = self.get_building(tile_pos)
    439439        if building is None:
     440            return
     441        if list(building.occupants()):
     442            warning = gui.Button("Occupied buildings may not be sold.")
     443            self.open_dialog(warning)
    440444            return
    441445        self.add_cash(building.sell_price())
Note: See TracChangeset for help on using the changeset viewer.