Invalid NaN/Inf repairspeed with random pathfinder
Select random pathfinder on this commit: https://github.com/ZeroK-RTS/Zero-K/commit/47e698742d6abf34c11332ced7f6b42c2247b623
It causes unitdefs to load with NaN/Inf repairspeed. Removing all repair speed manipulation from _posts does not help. Assigning local bla = math.random() < 0.5 also triggered the bug.
math.random exists but returns nil in modrules. Engine ticket https://github.com/beyond-all-reason/RecoilEngine/issues/2433
So modrules crash upon random() < 0.5 due to comparing number with a nil.
Modrules crash isn't fatal so it just discards everything and loads defaults. Engine ticket https://github.com/beyond-all-reason/RecoilEngine/issues/1702
One of the defaults is that repair energy cost multiplier is 0. This causes NaN or +inf (depending on whether the other number was 0 or not) via div0 here: https://github.com/ZeroK-RTS/Zero-K/blob/9fbbbb9e469586d205a60867b691fd8ca6380ae3/gamedata/unitdefs_post.lua#L613-L621