Skip to main content
Version: 1.2.0

Class WorldClock

Namespace: OblivionMP.SDK.Serverside.Systems
Assembly: OblivionMP.SDK.Serverside.dll

Advances the world's clock while at least one player is in game. The clock component is the source of truth, so writing to it from elsewhere, such as a time skip, carries on from where it was set. On a fresh server, the time starts at 6:00 on Morndas, 27th of Last Seed, 3E 433.

[Service]
public sealed class WorldClock : IDisposable

Inheritance​

object ← WorldClock

Implements​

IDisposable

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks​

Want to implement your own global time logic? Disable this service using IServices and create your own. It needs to properly advance GameDay and TimeOfDayMinutes properties of the GameTime mixin.

Constructors​

WorldClock(IEntities, IServerEvents)​

Advances the world's clock while at least one player is in game. The clock component is the source of truth, so writing to it from elsewhere, such as a time skip, carries on from where it was set. On a fresh server, the time starts at 6:00 on Morndas, 27th of Last Seed, 3E 433.

public WorldClock(IEntities entities, IServerEvents serverEvents)

Parameters​

entities IEntities

serverEvents IServerEvents

Remarks​

Want to implement your own global time logic? Disable this service using IServices and create your own. It needs to properly advance GameDay and TimeOfDayMinutes properties of the GameTime mixin.

Properties​

Enabled​

public bool Enabled { get; }

Property Value​

bool

Methods​

NowGameHours()​

Game hours since the game started.

public float NowGameHours()

Returns​

float