getLoadout
getLoadout(string path) → any loadout
Reads a loadout written as JSON in one of your AI files, in the format of the loadout export of the leek page. The path, relative to the file calling the function as with include, must be written between quotes: the file is read at compile time, and editing it recompiles the AI. Weapons and chips are returned as their id (the one of the WEAPON_* and CHIP_* constants), components as their template; an unknown item is skipped with a warning. Example: var build = getLoadout('builds/tank.json')
debug(build.weapons) // [47, 37] : WEAPON_M_LASER, WEAPON_PISTOL