OPX//77
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

  • table
    • ok: true
    • hour, minute, second, secondsOfDay: number
    • weather, weatherPreset: string
    • timeFrozen, weatherFrozen: boolean
    • revision, weatherRevision: number
    • latencyCompensationMs: number
  • or { ok = false, error }
    • not_synchronized: no snapshot yet.
    • environment_unavailable: no environment natives on this client.
Example
local now = weather.State()
if now.ok then print(('%02d:%02d %s'):format(now.hour, now.minute, now.weather)) end

On this page