Struct PluginObjectChange
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
One change to a world object, as reported by ObjectChanged.
public readonly record struct PluginObjectChange : IEquatable<PluginObjectChange>
- Implements
- Inherited Members
Constructors
PluginObjectChange(uint, PluginObjectChangeKind)
One change to a world object, as reported by ObjectChanged.
public PluginObjectChange(uint ObjectId, PluginObjectChangeKind Kind)
Parameters
ObjectIduintKindPluginObjectChangeKind
Properties
ChangedFields
The normalized fields affected by this notification.
public PluginObjectChangeFields ChangedFields { get; init; }
Property Value
Current
The normalized object snapshot at the time of the change, when the object is still known. This is absent for a release after the host has discarded the object.
public PluginWorldObject? Current { get; init; }
Property Value
Kind
public PluginObjectChangeKind Kind { get; init; }
Property Value
ObjectId
public uint ObjectId { get; init; }
Property Value
Revision
Monotonically increasing host revision for this session's object changes. Plugins can retain the greatest revision they have handled and ignore stale queued notifications. Zero is reserved for an unsequenced value supplied by a fixture or inert host.
public long Revision { get; init; }
Property Value
Methods
FieldsFor(PluginObjectChangeKind)
Maps a coarse change kind to its affected fields.
public static PluginObjectChangeFields FieldsFor(PluginObjectChangeKind kind)
Parameters
Returns
IsStaleComparedTo(long)
Returns true when this notification has a non-zero revision that is older than a revision the plugin has already handled.
public bool IsStaleComparedTo(long handledRevision)
Parameters
handledRevisionlong