[ModAPI] Allow Mods to use Set and Execute Terminal Actions

IotaSphere shared this feedback 41 days ago
Not Enough Votes

A few updates ago saw the introduction of the "set and execute" terminal options like "Set and Move" and "Set Color". Currently, mods don't have access to this system and can't make use of it for their own custom blocks.

I'm requesting that the underlying framework for these types of actions be exposed so mods can leverage this system. Currently, mods still rely on using increment/decrement actions to change their custom block values. Being able to allow the user to directly set the value would simplify a lot of terminal actions and open up new possibilities for modded blocks.

Replies (1)

photo
1

To sumarize what this would need:

  • IMyTerminalAction exposes DoUserParameterRequestWithItem, ParameterDefinitions and ActionWithParameters. (TerminalActionParameter and IUserCustomizableTerminalAction are already whitelisted)
  • A method that pops up a multi-line text editor (very much a copy of the CustomData or datapad popup) with pre-filled text and callback with edited text, simple and useful outside of this feature too!

These two combined should make it possible for modders to do this system with high flexibility.


For example, modder adds an action and makes it pop up a window when it's added to a toolbar, said window text contains:


Speed: 1.0
Easein: 1.0
Label: (auto)

Then the player would edit the values and click "OK" or "Cancel", both of which trigger the callback where the modder parses the info and adds the parameters to IUserCustomizableTerminalAction and invokes the action given by DoUserParameterRequestWithItem, just like the game does.

Leave a Comment
 
Attach a file
You can't vote. Please authorize!