Skip to content

Commit

Permalink
Merge pull request #7 from Randolio/patch-1
Browse files Browse the repository at this point in the history
Extra time commands.
  • Loading branch information
FjamZoo authored Nov 21, 2023
2 parents b187d47 + 696b1db commit 6e777b0
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion server/time.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,46 @@ if not useRealTime then
}
end)

lib.addCommand('noon', {
help = 'Set the current time to noon (12:00)',
restricted = 'group.admin',
}, function(_, _)
globalState.currentTime = {
hour = 12,
minute = 0,
}
end)

lib.addCommand('morning', {
help = 'Set the current time to morning (9:00)',
restricted = 'group.admin',
}, function(_, _)
globalState.currentTime = {
hour = 9,
minute = 0,
}
end)

lib.addCommand('evening', {
help = 'Set the current time to evening (18:00)',
restricted = 'group.admin',
}, function(_, _)
globalState.currentTime = {
hour = 18,
minute = 0,
}
end)

lib.addCommand('night', {
help = 'Set the current time to night (23:00)',
restricted = 'group.admin',
}, function(_, _)
globalState.currentTime = {
hour = 23,
minute = 0,
}
end)

lib.addCommand('timescale', {
help = ('Set milliseconds per game second (default %s)'):format(currentScale),
restricted = 'group.admin',
Expand Down Expand Up @@ -123,4 +163,4 @@ if not useRealTime then

globalState.freezeTime = newFreeze
end)
end
end

0 comments on commit 6e777b0

Please sign in to comment.