diff --git a/technic/machines/HV/forcefield.lua b/technic/machines/HV/forcefield.lua index 29c023d..d3bc984 100644 --- a/technic/machines/HV/forcefield.lua +++ b/technic/machines/HV/forcefield.lua @@ -43,6 +43,14 @@ end) -- \___/\___/ local function update_forcefield(pos, meta, active) + + if active then + -- rate limit by chance + if math.floor(math.random()*4) ~= 0 then + return + end + end + local shape = meta:get_int("shape") local range = meta:get_int("range") local vm = VoxelManip() @@ -374,4 +382,3 @@ end technic.register_machine("HV", "technic:forcefield_emitter_on", technic.receiver) technic.register_machine("HV", "technic:forcefield_emitter_off", technic.receiver) - diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index 47d4fe8..ff4665e 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -251,7 +251,7 @@ end minetest.register_abm({ nodenames = {"technic:switching_station"}, label = "Switching Station", -- allows the mtt profiler to profile this abm individually - interval = 1, + interval = 1.1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) if not technic.powerctrl_state then return end @@ -524,7 +524,7 @@ end minetest.register_abm({ label = "Machines: timeout check", nodenames = {"group:technic_machine"}, - interval = 1, + interval = 1.9, chance = 3, action = function(pos, node, active_object_count, active_object_count_wider) local meta = minetest.get_meta(pos)