* Convert integer parsing test to use normal TEST_CASEs
* Rename test name too similar to another
* Test to enforce normalized test names
* Normalize TEST_CASE names (scripted)
Partially addresses #55104.
There was a bug in MonsterGroupManager::GetResultFromGroup where
sometimes it would return a spawn but not update *quantity accordingly,
where *quantity is supposed to be the number of monsters requested,
reduced by the number actually returned. Because the quantity wasn't
updated, mapgen could get into a loop where it continued to spawn
monsters over and over again, potentially millions of times, wasting
many gigabytes of RAM. It wouldn't actually be a problem in-game,
though; I think this is because all the monsters were spawned on the
same tile, and so only one actually came into existence when the map was
loaded.
The error was a result of the complex logic related to subgroup spawns.
The whole function was very convoluted and confusing, so it's not
surprising there was an issue with it.
I rewrote the whole function. I think it's much clearer now. It should
also be more performant, because it aborts early in more cases. I think
I fixed one other corner case related to failed spawns from subgroups,
but I suspect that one wasn't being encountered in practice.
Also added a test for this issue.
This clang-tidy check looks for potentially-expensive-to-copy value
parameters which are only used as const values.
If they are only used once, in an assignment or initialization, then
their use will be converted to std::move. This can save a copy in some
cases.
Otherwise, the parameter will be converted to a const reference, which
can also save a copy in some cases.
* Event based monsters: add new field "event"
- Added new field "event to monster group entries
- If defined, use event to determine if the monster/group is spawnable
* Event based monsters: add option to control event monster spawns
* Event based monsters: add unit tests and fix spawn logic
* Event based monsters: astyle & linting corrections
* Event based monsters: added documentation
* Event based monsters: expand unit tests
Added additional tests to check spawns for event-only mongroups
* Event based monsters: fix empty check (clang-tidy)
* Event based monsters: cache all freq totals & return early