-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.lua
38 lines (36 loc) · 1.24 KB
/
mod.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
local modEnvironment = require "time_of_day"
function data()
return {
info = {
name = "Day and Night",
description = "Switch between different times of day.",
authors = {
{
name = "Pentasis",
role = 'CREATOR',
},
},
minorVersion = 0,
severityAdd = "WARNING",
severityRemove = "CRITICAL",
params = {
{
key = "timeofday",
name = "Time of day",
uiType = "BUTTON",
values = { "Morning", "Noon", "Dusk", "Night" },
defaultIndex = 1,
},
},
},
options = {},
runFn = function(settings, modParams)
local params = modParams[getCurrentModId()]
local timeValues = { "morning", "noon", "dusk", "night" }
-- local cloudValues = { "clear", "cloudy", "overcast" }
-- TODO: split up into time/weather
modEnvironment.setDayTime(timeValues[params["timeofday"] + 1])
end
-- postRunFn = function (settings, params) ...
}
end