Module action-comms
Adds an action-driven comms menu system.
For details of the menu item format, see action.
Target arguments: source, target
Differences from action docs:
info
entries will be merged and used as the comms message.- Menu items support a
requiredDockState
boolean; if set, the item will only display when the source is (true
) or is not (false
) docked with the target.
To create a comms menu, add entries to it, and set it as an entity's comms function:
local commsMenu = CommsMenu() commsMenu:add { info = "Comms Message", } commsMenu:add { button = "Button Name", action = function(reopen, source, target) ... end, } entity:setCommsFunction(commsMenu:getCommsFunction())
Functions
CommsMenu() | Create a new comms menu. |
commsMenu:getCommsFunction() | Get a comms function that will show this menu. |
Functions
- CommsMenu()
-
Create a new comms menu.
CommsMenu is derived from action.ActionBase and inherits some instance functions from there. - commsMenu:getCommsFunction()
- Get a comms function that will show this menu.