Code: Select all
game.players[1].surface.always_day = true
game.surfaces[1].always_day = true
Everything was fine up to 1.1, after updating to 2.0 there was a problem.
Is there a conflict with "daytime"?
Code: Select all
game.players[1].surface.always_day = true
game.surfaces[1].always_day = true
function OnInit()
game.players[1].always_day = true
end
function OnTick(event)
if (game.tick % 600) == 0 then
game.players[1].surface.daytime = 0.5
end
game.players[1].print(game.players[1].always_day)
end
script.on_event(defines.events.on_tick, OnTick)
script.on_init(OnInit)
script.on_load(OnInit)