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

Method getRemainingUses

src/Ruleset/MapBlock.cpp:125–132  ·  view source on GitHub ↗

* Gets either the remaining uses of the mapblock OR THE FREQUENCY! * Remaining limits the number of times a mapblock occurs. * Frequency increases the odds of a mapblock occuring. * @return int */

Source from the content-addressed store, hash-verified

123 * @return int
124 */
125int MapBlock::getRemainingUses()
126{
127 if (_maxCount == -1)
128 {
129 return _frequency;
130 }
131 return _maxCount - _timesUsed;
132}
133
134/**
135 * Decreases the remaining uses of a mapblock for this session.

Callers 1

getRandomMapBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected