opx_infinityweather
Client
Last updated on
The weather contract on the client — the projected clock and sky.
local weather = OPX.Api.Get('weather')State
The applied snapshot, with the time projected to now. A flat table, not { ok, value }.
weather.State()Returns
tableok:truehour,minute,second,secondsOfDay:numberweather,weatherPreset:stringtimeFrozen,weatherFrozen:booleanrevision,weatherRevision:numberlatencyCompensationMs:number
- or
{ ok = false, error }not_synchronized: no snapshot yet.environment_unavailable: no environment natives on this client.
local now = weather.State()
if now.ok then print(('%02d:%02d %s'):format(now.hour, now.minute, now.weather)) end