Struct ScriptVariables
Namespace: OblivionMP.SDK.Common.Archetypes.Mixins
Assembly: OblivionMP.SDK.Common.dll
The variables of a world object's script and how many random rolls the script made.
[ArchetypeMixin(Replication.ServerAuthoritative)]
public readonly struct ScriptVariables : IArchetypeMixin, IArchetypeQueryable, IEntityShape
Implements
IArchetypeMixin, IArchetypeQueryable, IEntityShape
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
RollIndex
How many random rolls the script made, so every client continues the same sequence.
public uint RollIndex { get; set; }
Property Value
VariablesCount
public int VariablesCount { get; }
Property Value
Methods
AddVariables(in ScriptVariable)
[Changes("ScriptVariables.Field.Variables")]
public void AddVariables(in ScriptVariable value)
Parameters
value ScriptVariable
As<T>()
public T As<T>() where T : struct, IArchetypeQueryable
Returns
T
Type Parameters
T
ClearVariables()
[Changes("ScriptVariables.Field.Variables")]
public void ClearVariables()
ContainsVariables(in ScriptVariable)
public bool ContainsVariables(in ScriptVariable value)
Parameters
value ScriptVariable
Returns
GetVariables()
public NativeList<ScriptVariable>.ReadOnly GetVariables()
Returns
NativeList<ScriptVariable>.ReadOnly
GetVariables(int)
public ScriptVariable GetVariables(int index)
Parameters
index int
Returns
ScriptVariable
InsertVariables(int, in ScriptVariable)
[Changes("ScriptVariables.Field.Variables")]
public void InsertVariables(int index, in ScriptVariable value)
Parameters
index int
value ScriptVariable
Is<T>()
public bool Is<T>() where T : struct, IArchetypeQueryable
Returns
Type Parameters
T
Keep()
This entity, which it already is: a loop over this shape hands over the shape itself.
public ScriptVariables Keep()
Returns
Remarks
Here so taking something out of a loop reads the same whichever way the loop walks. Whether a shape is walked by chunk follows from what it includes, which the call site cannot see and which changes when an include does.
RemoveAtVariables(int)
[Changes("ScriptVariables.Field.Variables")]
public ScriptVariable RemoveAtVariables(int index)
Parameters
index int
Returns
ScriptVariable
SetVariables(in NativeList<ScriptVariable>)
[Changes("ScriptVariables.Field.Variables")]
public void SetVariables(in NativeList<ScriptVariable> value)
Parameters
value NativeList<ScriptVariable>
SetVariables(int, in ScriptVariable)
[Changes("ScriptVariables.Field.Variables")]
public void SetVariables(int index, in ScriptVariable value)
Parameters
index int
value ScriptVariable
TryAs<T>(out T)
public bool TryAs<T>(out T archetype) where T : struct, IArchetypeQueryable
Parameters
archetype T
Returns
Type Parameters
T