add-VoidChestInstant

by edo0159

Makes a chest for destroying unwanted items... instantly!

Content
8 years ago
0.14
5
Cheats

g Fixed

7 years ago

I have a few fixes too. Current version is doing chest clearing of 8 slots for each chest every tick, and it is very stressful for cpu. I added a delay of 120 ticks (2 seconds) and it greatly improved performance. You might be able to use much larger value too, because even if you put stuff in it from 4 max upgraded stack inserters they will never fill 8 slot that fast, unless they're all non-stackable.

If you do these changes make sure to change version number of the mod.

global.tick = 1

script.on_configuration_changed(function(data)
if global.tick == nil then global.tick = 1 end
end)

function VoidChest_RunStep(event)
global.tick = global.tick - 1
if global.tick == 0 then
global.tick = 120
...
end
end

7 years ago

thanks for the code fragment with the 120ticks, if i use this mod alone i get weird artifacts on the map that arent really nice (yellow stripes etc)

but since i dont know lua or any other language i needed to shove this around abit ehre and there, but finally it works and now even without the artifacts, so thanks very very much :D

New response