ProtoFlux:Undoable Destroy: Difference between revisions

From Resonite Wiki
Create Undoable Destroy ProtoFlux Page
 
fix types, add file link
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
|Inputs=
|Inputs=
[
[
{"Name":"*", "Type":"Impulse"},
{"Name":"*", "Type":"Call"},
{"Name":"Target", "Type":"Slot"},
{"Name":"Target", "Type":"Slot"},
{"Name":"Preserve Assets", "Type":"bool"}
{"Name":"Preserve Assets", "Type":"bool"}
Line 21: Line 21:
== Inputs ==
== Inputs ==


=== Input (Call) ===  
=== Input ([[Impulses|Call]]) ===  
Create the undo step and set the Slot to be stored in the Undo Manager with references cut for later re-instantiating upon undoing the [[Slot|Slot]]'s destruction. (Basically make the destruction of the slot provided undoable)
Create the undo step and set the Slot to be stored in the Undo Manager with references cut for later re-instantiating upon undoing the [[Slot|Slot]]'s destruction. (Basically make the destruction of the slot provided undoable)


Line 34: Line 34:
== Outputs ==
== Outputs ==


=== Output (Continuation) ===
=== Output ([[Impulses|Continuation]]) ===
Continues to More undo steps, continues to code that eventually ends, or an [[ProtoFlux:End Undo Batch|End Undo Batch]] that continues to eventually ended code.
Continues to More undo steps, continues to code that eventually ends, or an [[ProtoFlux:End Undo Batch|End Undo Batch]] that continues to eventually ended code.


== Examples ==
== Examples ==


{{Stub}}
<gallery widths=480px heights=480px>
File:ProtoFlux_example_undo_node_settup|This node being used in a set of nodes that undoes a bunch of actions that was done by a previous button
</gallery>


[[Category:ProtoFlux:Undo]]
[[Category:ProtoFlux:Undo]]

Latest revision as of 19:38, 9 February 2024

Undoable Destroy
*
Next
Target
Preserve Assets
Undo


The node will create an undo step in the context menu of the person who the impulse came from. The destruction of the slot provided in Target (Slot) will be undo-able by the user.

when this node is paired with an Undo Batch, it's description if has one, will be ignored, and will be part of the Undo Batch's undo step instead.

Inputs

Input (Call)

Create the undo step and set the Slot to be stored in the Undo Manager with references cut for later re-instantiating upon undoing the Slot's destruction. (Basically make the destruction of the slot provided undoable)

Target (Slot)

The Slot to undo destruction for this undo step.

PreserveAssets (Boolean)

Whether to keep the assets store able in an Asset Provider associated with this slot or discard them. Discarding them may lead to missing textures or assets.

Outputs

Output (Continuation)

Continues to More undo steps, continues to code that eventually ends, or an End Undo Batch that continues to eventually ended code.

Examples