API:GetDesiredInteractAction
From RoR Wiki
UI Lua API · Interact functions
Version: WAR 1.4.8
Returns the current "desired interact action": the special cursor mode such as repair, salvage or teleport.
action = GetDesiredInteractAction()
Arguments
None.
Returns
- action
number– The current action. The stock UI compares it withSystemData.InteractActionsvalues (NONE,REPAIR,REPAIR_DISABLED,SALVAGE,TELEPORT,DYE,UNLOCKand others).
Details
- The value is the one last set with SetDesiredInteractAction, or by the client itself.
- The client uses the same value to choose the mouse cursor and when the player targets something.
Errors
None.
Example
From default/ea_craftingwindow/source/salvagingwindow.lua:
if( GetDesiredInteractAction() == SystemData.InteractActions.SALVAGE )
then
SetDesiredInteractAction( SystemData.InteractActions.NONE )
end
From default/ea_battlegrouphud/source/battlegrouphud.lua:
if( GetDesiredInteractAction() == SystemData.InteractActions.TELEPORT )
