Ok I will test this tonight and merge if ok. in the diff here on Launchpad there are some differing indentations? are they intentional?
Anyhow I have marked them in the diff comments Diff comments: > > === modified file 'src/logic/map_objects/tribes/building.cc' > --- src/logic/map_objects/tribes/building.cc 2018-11-19 21:38:03 +0000 > +++ src/logic/map_objects/tribes/building.cc 2018-11-23 08:20:28 +0000 > @@ -59,7 +59,9 @@ > const EditorGameBase& egbase) > : MapObjectDescr(init_type, table.get_string("name"), init_descname, > table), > egbase_(egbase), > - buildable_(false), > + buildable_(table.has_key("buildcost")), > + can_be_dismantled_(table.has_key("return_on_dismantle") || > table.has_key("return_on_dismantle_on_enhanced")), > + destructible_(table.has_key("destructible") ? > table.get_bool("destructible") : true), different indentation. Intentional? > size_(BaseImmovable::SMALL), > mine_(false), > port_(false), > > === modified file 'src/logic/map_objects/tribes/building.h' > --- src/logic/map_objects/tribes/building.h 2018-09-25 06:32:35 +0000 > +++ src/logic/map_objects/tribes/building.h 2018-11-23 08:20:28 +0000 > @@ -73,6 +73,9 @@ > bool is_buildable() const { > return buildable_; > } > + bool can_be_dismantled() const { is this indentation intentional > + return can_be_dismantled_; > + } > bool is_destructible() const { > return destructible_; > } > @@ -172,8 +175,9 @@ > const EditorGameBase& egbase_; > > private: > - bool buildable_; // the player can build this himself > - bool destructible_; // the player can destruct this himself > + const bool buildable_; // the player can build this himself > + const bool can_be_dismantled_; // the player can dismantle this building same here > + const bool destructible_; // the player can destruct this himself > Buildcost buildcost_; > Buildcost return_dismantle_; // Returned wares on dismantle > Buildcost enhance_cost_; // cost for enhancing -- https://code.launchpad.net/~widelands-dev/widelands/empire04_unused_key_return_on_dismantle/+merge/358273 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/empire04_unused_key_return_on_dismantle. _______________________________________________ Mailing list: https://launchpad.net/~widelands-dev Post to : widelands-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~widelands-dev More help : https://help.launchpad.net/ListHelp