API ConnectAddon
From Vendetta Lua
ConnectAddon
Definition:
ConnectAddon(int portid, int itemid, function cb) -> bool canconnect
Description:
Attaches the addon itemid to the active ship in port portid
Arguments:
portid portid of the the port
itemid itemid of the addon
cb function to call on completition (optional)
Returns:
canconnect returns true if the player is docked and has an active ship otherwise nil
Example:
-- put the addon 123 into port 2 while the player is docked to a station ConnectAddon(2, 123) -> true