mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-30 04:30:58 +02:00
Add day/night cycle options (#360)
* Add day/night cycle options * txt to markdown and fix formatting errors
This commit is contained in:
parent
5beaee7144
commit
654216f149
6
map_gen/day_night_cycles/bright.lua
Normal file
6
map_gen/day_night_cycles/bright.lua
Normal file
@ -0,0 +1,6 @@
|
||||
-- 10 minute cycle, 4m of full light, 4m light to dark, 6s full dark, 2m dark to light
|
||||
game.player.surface.ticks_per_day = 36000
|
||||
game.player.surface.dusk = 0.2
|
||||
game.player.surface.evening = 0.59
|
||||
game.player.surface.morning = 0.6
|
||||
game.player.surface.dawn = 0.8
|
11
map_gen/day_night_cycles/day_night_cycle.lua
Normal file
11
map_gen/day_night_cycles/day_night_cycle.lua
Normal file
@ -0,0 +1,11 @@
|
||||
local Event = require "utils.event"
|
||||
|
||||
-- Uncomment the desired day/night cycle
|
||||
|
||||
-- requires
|
||||
-- requires
|
||||
|
||||
local function init()
|
||||
end
|
||||
|
||||
Event.on_init(init)
|
6
map_gen/day_night_cycles/double_length_cycle.lua
Normal file
6
map_gen/day_night_cycles/double_length_cycle.lua
Normal file
@ -0,0 +1,6 @@
|
||||
-- ~14 minute cycle, 6m56s of full light, 2m46s light to dark, 1m24s full dark, 2m46s dark to light
|
||||
game.player.surface.ticks_per_day = 50000
|
||||
game.player.surface.dusk = 0.25
|
||||
game.player.surface.evening = 0.45
|
||||
game.player.surface.morning = 0.55
|
||||
game.player.surface.dawn = 0.75
|
6
map_gen/day_night_cycles/gloomy.lua
Normal file
6
map_gen/day_night_cycles/gloomy.lua
Normal file
@ -0,0 +1,6 @@
|
||||
-- 10 minute cycle, 6s of full light, 2m light to dark, 4m full dark, 4m dark to light
|
||||
game.player.surface.ticks_per_day = 36000
|
||||
game.player.surface.dusk = 0
|
||||
game.player.surface.evening = 0.2
|
||||
game.player.surface.morning = 0.6
|
||||
game.player.surface.dawn = 0.99
|
6
map_gen/day_night_cycles/half_length_cycle.lua
Normal file
6
map_gen/day_night_cycles/half_length_cycle.lua
Normal file
@ -0,0 +1,6 @@
|
||||
-- ~3.5 minute cycle, 1m44s of full light, 42s light to dark, 21s full dark, 42s dark to light
|
||||
game.player.surface.ticks_per_day = 12500
|
||||
game.player.surface.dusk = 0.25
|
||||
game.player.surface.evening = 0.45
|
||||
game.player.surface.morning = 0.55
|
||||
game.player.surface.dawn = 0.75
|
@ -0,0 +1,6 @@
|
||||
-- 20 minute cycle, 9m of full light, 1m light to dark, 9m full dark, 1m dark to light
|
||||
game.player.surface.ticks_per_day = 72000
|
||||
game.player.surface.dusk = 0.225
|
||||
game.player.surface.evening = 0.275
|
||||
game.player.surface.morning = 0.725
|
||||
game.player.surface.dawn = 0.775
|
20
map_gen/day_night_cycles/readme.md
Normal file
20
map_gen/day_night_cycles/readme.md
Normal file
@ -0,0 +1,20 @@
|
||||
In terms of daylight during the day/night cycle:
|
||||
|
||||
when dusk begins the light decreases until
|
||||
evening (aka nighttime) which is full darkness until
|
||||
morning which increases the light level until
|
||||
dawn (aka daytime) which is full brightness until dusk
|
||||
|
||||
Defaults as follows:
|
||||
ticks_per_day=25000 (approx 6 mins 56.4 secs)
|
||||
dusk=0.25, evening=0.45, morning=0.55, dawn=0.75
|
||||
|
||||
If you keep your numbers < 1 , it's the percentage
|
||||
of the total ticks at which the phase of day will change
|
||||
Not sure what happens if you go > 1
|
||||
|
||||
When setting these variables, the command will fail if it changes
|
||||
the *order* of the phases. Ex: morning must be > evening but < dawn
|
||||
|
||||
Lastly, the map starts at time tick 0 so if you want to start during full
|
||||
daylight you want a dusk > 0
|
7
map_gen/day_night_cycles/vanilla.lua
Normal file
7
map_gen/day_night_cycles/vanilla.lua
Normal file
@ -0,0 +1,7 @@
|
||||
-- vanilla day/night cycle, mostly just here as reference
|
||||
-- ~7 minute cycle, 3m28s of full light, 1m23s light to dark, 42s full dark, 1m23s dark to light
|
||||
game.player.surface.ticks_per_day = 25000
|
||||
game.player.surface.dusk = 0.25
|
||||
game.player.surface.evening = 0.45
|
||||
game.player.surface.morning = 0.55
|
||||
game.player.surface.dawn = 0.75
|
Loading…
x
Reference in New Issue
Block a user