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

Method init

src/Basescape/CraftsState.cpp:130–142  ·  view source on GitHub ↗

* The soldier names can change * after going into other screens. */

Source from the content-addressed store, hash-verified

128 * after going into other screens.
129 */
130void CraftsState::init()
131{
132 State::init();
133 _lstCrafts->clearList();
134 for (std::vector<Craft*>::iterator i = _base->getCrafts()->begin(); i != _base->getCrafts()->end(); ++i)
135 {
136 std::wostringstream ss, ss2, ss3;
137 ss << (*i)->getNumWeapons() << "/" << (*i)->getRules()->getWeapons();
138 ss2 << (*i)->getNumSoldiers();
139 ss3 << (*i)->getNumVehicles();
140 _lstCrafts->addRow(5, (*i)->getName(_game->getLanguage()).c_str(), tr((*i)->getStatus()).c_str(), ss.str().c_str(), ss2.str().c_str(), ss3.str().c_str());
141 }
142}
143
144/**
145 * Returns to the previous screen.

Callers

nothing calls this directly

Calls 12

initFunction · 0.85
clearListMethod · 0.80
getNumWeaponsMethod · 0.80
getNumSoldiersMethod · 0.80
getNumVehiclesMethod · 0.80
addRowMethod · 0.80
getLanguageMethod · 0.80
getCraftsMethod · 0.45
getWeaponsMethod · 0.45
getRulesMethod · 0.45
getNameMethod · 0.45
getStatusMethod · 0.45

Tested by

no test coverage detected