Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetDesiredInteractAction

From RoR Wiki
Revision as of 19:48, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Interact functions
Version: WAR 1.4.8

Sets the "desired interact action": the special cursor mode such as repair or salvage.

SetDesiredInteractAction(action)

Arguments

action
number – The new action, a SystemData.InteractActions value. Must be 0–13.

Returns

Nothing useful. See Details.

Details

  • Values outside 0–13 are ignored and the current action is kept. No error is raised.
  • The client uses the value to choose the mouse cursor and when the player targets something. Read it back with GetDesiredInteractAction.
  • When the value is accepted, the function reports one return value without pushing one, so the call returns the action argument back to the caller. When the value is rejected, it returns nothing. Do not rely on this.
  • Exactly one argument must be passed.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From default/ea_craftingwindow/source/salvagingwindow.lua:

SetDesiredInteractAction( SystemData.InteractActions.SALVAGE )

From default/ea_cursor/source/cursor.lua:

if GetDesiredInteractAction() ~= SystemData.InteractActions.NONE then
    SetDesiredInteractAction( SystemData.InteractActions.NONE )

See also