Skip to content

Class ScriptOwner

Namespace: Apogee.Scripting
Assembly: Apogee.Scripting.dll

Whose code is running: the base game or one mod. Everything an owner's scripts allocate is counted in the owner's memory category of the VM, and its calls get the owner's time budget, so one mod cannot use up the memory or the frame of the others.

public sealed class ScriptOwner

Inheritance

object ← ScriptOwner

Inherited Members

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

Properties

Category

The memory category (1 to 255) of this owner's objects; the base game's is 0.

public int Category { get; }

Property Value

int

Id

public string Id { get; }

Property Value

string

IsMod

True for a mod. Mods cannot use classes marked ModsBlocked, and (with packages, later) are confined to their own files.

public bool IsMod { get; }

Property Value

bool

MemoryLimit

A soft limit in bytes (0: none): going over it is a memory error in this owner's code, at its next call or loop iteration.

public long MemoryLimit { get; }

Property Value

long

MemoryUsed

Bytes the owner's objects take now.

public long MemoryUsed { get; }

Property Value

long

TimeBudgetMilliseconds

The time one call of this owner's code may take, in milliseconds (0: the VM's default).

public int TimeBudgetMilliseconds { get; }

Property Value

int

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.