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

Method markUsed

src/Ruleset/MapBlock.cpp:137–148  ·  view source on GitHub ↗

* Decreases the remaining uses of a mapblock for this session. */

Source from the content-addressed store, hash-verified

135 * Decreases the remaining uses of a mapblock for this session.
136 */
137void MapBlock::markUsed()
138{
139 if (_maxCount == -1)
140 {
141 return;
142 }
143 _timesUsed++;
144 if (_timesUsed >= _maxCount)
145 {
146 _timesUsed = _maxCount;
147 }
148}
149
150/**
151 * Resets the remaining uses of a mapblock for this session.

Callers 1

getRandomMapBlockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected