API GetStationMerchInfo

From Vendetta Lua
Jump to: navigation, search

GetStationMerchInfo

Definition: GetStationMerchInfo(int merchid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
Description:
get info about items this station sells
Arguments:
merchid id of sold items (1-n), where n = GetNumStationMerch()
Example:

for item = 1, GetNumStationMerch() do
    local haveitem = GetStationMerchInfo(item);
    console_print("Station has item: ".. haveitem.name);
end