Files
Rage 376b4b9689 Added New Mods and Profiles Folders
This is a complete rebuild of the modpack, with all new mods and updates for 1.5.3 of Anomaly.
2025-01-14 05:07:53 -05:00

26 lines
722 B
Plaintext

-- BoltManager - Nitpicker's Modpack
-- Last modified: 2021.07.26
-- https://github.com/Ishmaeel/NitpickerModpack
function itms_manager.bolt_manager() -- limit bolt count in actor inventory
ResetTimeEvent("cycle", "bolt_manager", 60)
local sim = alife()
local bolt_max_num = itms_manager.ini_manager:r_float_ex("settings", "bolt_max_num") or 99
local cnt = 0
local id, sec, se_obj
local function itr(temp, obj)
sec = obj:section()
if (sec == "bolt") or (sec == "bolt_bullet") then
cnt = cnt + 1
if (cnt > bolt_max_num) then
obj:destroy_object()
end
end
end
db.actor:iterate_ruck(itr, nil)
return false
end