Skip to content

Lease

Parts of the game only one plugin can drive at a time. The best placed claimer holds each: game plugin, then engine plugin, then the rest, then the later loaded. Act on a part only while holding it.

A plugin’s claim on a part. Gone with the plugin.

held(): boolean
release(): void

Any thread.

Gives the part up for good, to the next best. Fine to call twice. Any thread.

Who holds what, for any plugin.

Get it with Api.leases().

holder(part: Wraith.Lease.Part | Wraith.Lease.PartName): Wraith.Lease.Holder

Any thread.

Uses Lease.Part, Lease.Holder.

What can go wrong, besides Cancelled, Unsupported and Gone.

Code Error
1 Failed

True when the plugin gets the part, false when a better placed one takes it. Not for its own release. Any thread, outside Wraith’s locks, so it can call back in.

Wraith.Lease.Changed

The parts there are leases on, each claimed from its own area.

An enum of u8.

Value Name
0 ticks Threads.claimTicks
1 speed Game.claimSpeed
2 camera FreeCamera.claim
3 posing Posing.claim
4 view Display.claimView

A struct, 0x18 bytes, aligned to 8.

Offset Field Type
0x0 held bool Someone does. Otherwise Wraith does what it can itself.
0x1 mine bool It’s the plugin asking.
0x8 plugin string The plugin’s id, or empty.
held: boolean
mine: boolean
plugin: string

Made with ♥ by Asgard