Skip to content

Commit

Permalink
wait 10s for startup to render flames on furnaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mazmot-is committed Apr 30, 2023
1 parent c6e9d94 commit df54564
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mod/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,12 @@ function gen_map_id()
end

-- Detects if an on-startup screenshot is requested.
script.on_event(defines.events.on_tick, function(evt)
---- script.on_event(defines.events.on_tick, function(evt)
script.on_nth_tick(600, function(evt) -- wait 10s to render flame in furnaces
log("onstartup check @" .. evt.tick)
-- Needs to run only once, so unregister immediately.
script.on_event(defines.events.on_tick, nil)
---- script.on_event(defines.events.on_tick, nil)
script.on_nth_tick(600, nil)

-- Assume player index 1 during startup.
local player = game.get_player(1)
Expand Down Expand Up @@ -348,4 +350,4 @@ commands.add_command("mapshot", "screenshot the whole map", function(evt)
params.savename = evt.parameter
end
mapshot(params)
end)
end)

0 comments on commit df54564

Please sign in to comment.