Component:WorldOrbSaver: Difference between revisions

From Resonite Wiki
Automated: update SyncDelegates
add info
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{UserspaceComponent}}
{{Infobox Component
{{Infobox Component
|Image=WorldOrbSaverComponent.png
|Image=WorldOrbSaverComponent.png
|Name=World Orb Saver
|Name=World Orb Saver
}}
}}
{{stub}}
The '''WorldOrbSaver''' Component handles when a user is saving a world to their inventory when saving a world in general.


== Usage ==
See [[World]] for more info about worlds.
 
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Orb|'''[[Component:WorldOrb|WorldOrb]]'''|TypeAdv0=true|
|Orb|'''[[Component:WorldOrb|WorldOrb]]'''|TypeAdv0=true| The orb to save to the user's inventory.
|saveHereItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv1=true|
|saveHereItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv1=true| The context menu item used to trigger "Save Here".
|saveToInventoryItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv2=true|
|saveToInventoryItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv2=true| The context menu item used to trigger "Save to Inventory".
|cancelItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv3=true|
|cancelItem|'''[[Component:ContextMenuItem|ContextMenuItem]]'''|TypeAdv3=true| The context menu item used to trigger "Cancel"
|menu|'''[[Component:ContextMenu|ContextMenu]]'''|TypeAdv4=true|
|menu|'''[[Component:ContextMenu|ContextMenu]]'''|TypeAdv4=true| The context menu that was opened to handle this item's menu.
|interactive|Bool|
|interactive|Bool| Whether this item is interactive or not.
|saving|Bool|
|saving|Bool| Whether this item is currently saving to the user's inventory.
}}
}}


== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|OnSaveHere:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|OnSaveHere:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Handles when the item is being "saved here".
|OnSaveToInventory:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|OnSaveToInventory:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Handles when the item is being saved to inventory.
|OnCancel:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true|
|OnCancel:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Handles when the saving of this item is being canceled.
}}
}}


== Behavior ==
== Usage ==
See [[World]] for more info about worlds.


== Examples ==
== Examples ==
See [[World]] for more info about worlds.


== See Also ==
== See Also ==
* [[World]]


[[Category:Components:Uncategorized{{#translation:}}|World Orb Saver]]
[[Category:Components:Uncategorized{{#translation:}}|World Orb Saver]]
[[Category:Components{{#translation:}}|World Orb Saver]]
[[Category:Components{{#translation:}}|World Orb Saver]]
[[Category:ComponentStubs]]

Latest revision as of 00:16, 4 May 2025

This is a userspace component — you cannot attach it anywhere but the userspace. Messing with the userspace can be fun, but it is not recommended as you risk messing your dash up if you don't know what you're doing.
Component image 
File:WorldOrbSaverComponent.png
World Orb Saver component as seen in the Scene Inspector

The WorldOrbSaver Component handles when a user is saving a world to their inventory when saving a world in general.

See World for more info about worlds.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't.
Orb WorldOrb The orb to save to the user's inventory.
saveHereItem ContextMenuItem The context menu item used to trigger "Save Here".
saveToInventoryItem ContextMenuItem The context menu item used to trigger "Save to Inventory".
cancelItem ContextMenuItem The context menu item used to trigger "Cancel"
menu ContextMenu The context menu that was opened to handle this item's menu.
interactive Bool Whether this item is interactive or not.
saving Bool Whether this item is currently saving to the user's inventory.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
OnSaveHere:ButtonEventHandler ButtonEventHandler Handles when the item is being "saved here".
OnSaveToInventory:ButtonEventHandler ButtonEventHandler Handles when the item is being saved to inventory.
OnCancel:ButtonEventHandler ButtonEventHandler Handles when the saving of this item is being canceled.

Usage

See World for more info about worlds.

Examples

See World for more info about worlds.

See Also