1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00
RedMew/on_tick.lua

26 lines
546 B
Lua
Raw Normal View History

2017-08-10 20:04:43 +02:00
function refill_well()
for _,well in pairs(global.wells) do
well.chest.insert({name = well.item, count = well.items_per_second * 15})
end
end
local function on_tick()
2017-07-25 01:20:59 +02:00
walk_on_tick()
if game.tick % 60 == 0 then
poll_on_second()
walk_distance_on_second()
if game.tick % 1200 == 0 then
player_list_on_12_seconds()
end
if game.tick % 180 == 0 then
fish_market_on_180_ticks()
2017-08-10 20:04:43 +02:00
if game.tick % 900 == 0 then
refill_well()
end
end
end
end
2017-08-10 20:04:43 +02:00
Event.register(defines.events.on_tick, on_tick)