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

Method setRules

src/Savegame/Craft.cpp:269–277  ·  view source on GitHub ↗

* Changes the ruleset for the craft's type. * @param rules Pointer to ruleset. * @warning NOT TO BE USED IN NORMAL CIRCUMSTANCES. */

Source from the content-addressed store, hash-verified

267 * @warning NOT TO BE USED IN NORMAL CIRCUMSTANCES.
268 */
269void Craft::setRules(RuleCraft *rules)
270{
271 _rules = rules;
272 _weapons.clear();
273 for (int i = 0; i < _rules->getWeapons(); ++i)
274 {
275 _weapons.push_back(0);
276 }
277}
278
279/**
280 * Returns the craft's unique ID. Each craft

Callers 1

cbxCraftChangeMethod · 0.80

Calls 2

clearMethod · 0.45
getWeaponsMethod · 0.45

Tested by

no test coverage detected