Large mod pack, but upon adding Fill4Me to it in 1.1 it prints this error to the console:
__Fill4Me__/fill4me/ammo.lua:107: stack overflow
__Fill4Me__/fill4me/ammo.lua:131: stack overflow
However, the game does continue to work and function.
The first function referenced on line 107 is:
function Ammo.damage_from_actions(actionset)
local damage = 0
for _, act in pairs(actionset) do
damage = damage + Ammo.damage_from_action(act) * act.repeat_count
end
return damage
end
This is indeed recursive, it should instead be made iterative, or at the very least prebake the values into a memoized cache. Similar for remaining functions as well. Lua is not a recursive-safe language as it uses the system stack instead of stackless functions unless using coroutines and trampolines.