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

Method viewClick

src/Basescape/PlaceLiftState.cpp:83–97  ·  view source on GitHub ↗

* Processes clicking on facilities. * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

81 * @param action Pointer to an action.
82 */
83void PlaceLiftState::viewClick(Action *)
84{
85 BaseFacility *fac = new BaseFacility(_game->getRuleset()->getBaseFacility("STR_ACCESS_LIFT"), _base);
86 fac->setX(_view->getGridX());
87 fac->setY(_view->getGridY());
88 _base->getFacilities()->push_back(fac);
89 _game->popState();
90 BasescapeState *bState = new BasescapeState(_game, _base, _globe);
91 _game->getSavedGame()->setSelectedBase(_game->getSavedGame()->getBases()->size() - 1);
92 _game->pushState(bState);
93 if (_first)
94 {
95 _game->pushState(new SelectStartFacilityState(_game, _base, bState, _globe));
96 }
97}
98
99}

Callers

nothing calls this directly

Calls 12

getBaseFacilityMethod · 0.80
getGridXMethod · 0.80
getGridYMethod · 0.80
getFacilitiesMethod · 0.80
getSavedGameMethod · 0.80
getBasesMethod · 0.80
pushStateMethod · 0.80
getRulesetMethod · 0.45
setXMethod · 0.45
setYMethod · 0.45
popStateMethod · 0.45
setSelectedBaseMethod · 0.45

Tested by

no test coverage detected