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(): booleanrelease(): voidheld(): booleanrelease()bool Held()void Release()bool held() constvoid release() constpub fn held(&self) -> boolpub fn release(&self)fn held(self: Wraith.Lease) boolfn release(self: Wraith.Lease) voidbool Wraith_Lease_held(Wraith_Lease self)void Wraith_Lease_release(Wraith_Lease self)Any thread.
release
Section titled “release”Gives the part up for good, to the next best. Fine to call twice. Any thread.
Leases
Section titled “Leases”Who holds what, for any plugin.
Get it with Api.leases().
holder(part: Wraith.Lease.Part | Wraith.Lease.PartName): Wraith.Lease.Holderholder(part: Wraith.Lease.Part|Wraith.Lease.PartName): Wraith.Lease.HolderWraith.Lease.Holder Holder(Wraith.Lease.Part part)Wraith::Lease_Holder holder(Wraith::Lease_Part part) constpub fn holder(&self, part: wraith::LeasePart) -> wraith::LeaseHolderfn holder(self: Wraith.Leases, part: Wraith.Lease.Part) Wraith.Lease.HolderWraith_Lease_Holder Wraith_Leases_holder(Wraith_Leases self, Wraith_Lease_Part part)holder
Section titled “holder”Any thread.
Uses Lease.Part, Lease.Holder.
LeaseError
Section titled “LeaseError”What can go wrong, besides Cancelled, Unsupported and Gone.
| Code | Error | |
|---|---|---|
| 1 | Failed |
Lease.Changed
Section titled “Lease.Changed”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.ChangedWraith.Lease.ChangedWraith.Lease.ChangedWraith::Lease_Changedwraith::LeaseChangedWraith.Lease.ChangedWraith_Lease_ChangedLease.Part
Section titled “Lease.Part”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 |
Lease.Holder
Section titled “Lease.Holder”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: booleanmine: booleanplugin: stringheld: booleanmine: booleanplugin: stringbool Heldbool Minestring Pluginbool heldbool minesal::String pluginpub held: boolpub mine: boolpub plugin: salamander::Strheld: boolmine: boolplugin: []const u8bool heldbool minesal_string pluginwraith.io · Mods on the Hub · Get Wraith
Made with ♥ by Asgard
