Table of Contents

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

ObjectId uint
Kind PluginObjectChangeKind

Properties

ChangedFields

The normalized fields affected by this notification.

public PluginObjectChangeFields ChangedFields { get; init; }

Property Value

PluginObjectChangeFields

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

PluginWorldObject?

Kind

public PluginObjectChangeKind Kind { get; init; }

Property Value

PluginObjectChangeKind

ObjectId

public uint ObjectId { get; init; }

Property Value

uint

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

long

Methods

FieldsFor(PluginObjectChangeKind)

Maps a coarse change kind to its affected fields.

public static PluginObjectChangeFields FieldsFor(PluginObjectChangeKind kind)

Parameters

kind PluginObjectChangeKind

Returns

PluginObjectChangeFields

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

handledRevision long

Returns

bool