MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / btnOkClick

Method btnOkClick

src/Basescape/SelectStartFacilityState.cpp:84–94  ·  view source on GitHub ↗

* Resets the base building. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

82 * @param action Pointer to an action.
83 */
84void SelectStartFacilityState::btnOkClick(Action *)
85{
86 for (std::vector<BaseFacility*>::iterator i = _base->getFacilities()->begin(); i != _base->getFacilities()->end(); ++i)
87 {
88 delete *i;
89 }
90 _base->getFacilities()->clear();
91 _game->popState();
92 _game->popState();
93 _game->pushState(new PlaceLiftState(_game, _base, _globe, true));
94}
95
96/**
97 * Places the selected facility.

Callers

nothing calls this directly

Calls 4

getFacilitiesMethod · 0.80
pushStateMethod · 0.80
clearMethod · 0.45
popStateMethod · 0.45

Tested by

no test coverage detected