Envrioment: | Mission Scripting | ||
Function: | getResourceMap | Added with: 2.8.8 | |
Member Of: | Airbase | ||
Syntax: | table Airbase.getResourceMap(Class self ) | ||
Description: | Returns the wsType of every object that exists in DCS. A wsType is a table consisting of 4 entries indexed numerically. It can be used to broadly categorize object types. The table can be broken down as: {mainCategory, subCat1, subCat2, index}
A vague breakdown of the wsTypes: 1 : Aircraft 1: Airplanes 1: Fighters 2: Fast Bombers 3: Interceptors 4: Bombers 5: Misc support 6: Attack 2: Helicopters 2 : Vehicles 3 : Ships 4 : Weapons
There are several items that have a wsType of {0, 0, 0, 0}. Typically these include shells, static objects, and turrets.
| ||
Return Value: | table | ||
Return Example: | A table indexed by string of the object name containing the wsType table associated with the object.
{ ["S-60_Type59_Artillery"] = { [1] = 2, [2] = 16, [3] = 26, [4] = 259, }, ["Daimler_AC"] = { [1] = 2, [2] = 17, [3] = 26, [4] = 7, }, ["weapons.shells.KDA_35_FAPDS"] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, }, ["weapons.missiles.P_24T"] = { [1] = 4, [2] = 4, [3] = 7, [4] = 26, } | ||
Examples: | |||
Related Functions: | Warehouse Functions: addItem, getItemCount, setItem, removeItem, addLiquid, getLiquidAmount, setLiquidAmount, removeLiquid, getOwner, getInventory | ||
Notes: |