API SwapAddons

From Vendetta Lua
Revision as of 22:04, 25 January 2009 by Chefkoch (Talk | contribs) (split)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SwapAddons

Definition: SwapAddons(int portid1 itemid1 porid1 itemid2 function cb) -> nil
Description:
Swap two addons equipped to the current ship (crashes client after undocking)
Arguments:
portid1 port of first item
itemid1 itemid of addon that is supposed to go into port with id portid1
portid2 port of second item
itemid2 itemid of addon that is supposed to go into port with id portid2
cb function to call on success
Example:
assuming 1234 is currently in port 3 and 1235 in port 2 this could be used to swap them

SwapAddons(2, 1234, 3, 1235)