Skip to content

Commit

Permalink
[ENHANCEMENT] Add getTime export (#69)
Browse files Browse the repository at this point in the history
* Add `getTime` export

Co-authored-by: Zerio <[email protected]>
  • Loading branch information
meta-hub and Z3rio authored Dec 17, 2022
1 parent b8915d3 commit 062d369
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,3 +317,10 @@ exports('getBlackoutState', function() return blackout end)
exports('getTimeFreezeState', function() return freezeTime end)
exports('getWeatherState', function() return CurrentWeather end)
exports('getDynamicWeather', function() return Config.DynamicWeather end)

exports('getTime', function()
local hour = math.floor(((baseTime+timeOffset)/60)%24)
local minute = math.floor((baseTime+timeOffset)%60)

return hour,minute
end)

0 comments on commit 062d369

Please sign in to comment.