~widelands-dev/widelands/io-dependency-fix

« back to all changes in this revision

Viewing changes to src/logic/map_objects/tribes/building.h

Merged lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle:
Make dismantle button independent of buildable/enhanced. This fixes missing Dismantle buttons in Empire scenario 4. Cleaned up Buildcost code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        bool is_buildable() const {
74
74
                return buildable_;
75
75
        }
 
76
        bool can_be_dismantled() const {
 
77
                return can_be_dismantled_;
 
78
        }
76
79
        bool is_destructible() const {
77
80
                return destructible_;
78
81
        }
172
175
        const EditorGameBase& egbase_;
173
176
 
174
177
private:
175
 
        bool buildable_;     // the player can build this himself
176
 
        bool destructible_;  // the player can destruct this himself
 
178
        const bool buildable_;          // the player can build this himself
 
179
        const bool can_be_dismantled_;  // the player can dismantle this building
 
180
        const bool destructible_;       // the player can destruct this himself
177
181
        Buildcost buildcost_;
178
182
        Buildcost return_dismantle_;  // Returned wares on dismantle
179
183
        Buildcost enhance_cost_;      // cost for enhancing