GetBuildList
From Original War Support Wiki
SAIL Functions/G -> GetBuildList
SAIL Functions/MacrosRelated -> GetBuildList
Description
Returns information of the buildings linked to specified base as a list (including factory extensions). Each element looks like this:
[building_type, x-coordinate, y-coordinate, direction]
Note that the depot/warehouse is always 'linked' to the specified base.
Furthermore, note that labs, which are not upgraded, are represented by the constant "b_lab"; half-upgraded labs are represented only by their lab extension, for instance "b_lab_opto" for opto lab; fully upgraded labs are represented twice - one time for each lab extension. So if a lab has a weapon and a siberium extension it is represented twice with the same data for the coordinates and direction but with "b_lab_weapon" and "b_lab_siberium" as the difference.
Usage
GetBuildList(base);
base - identifier of a base (use function GetBase)
Example
This is an example of an output:
[[0,34,21,2], [4,56,22,0], [12,45,30,5], [15,45,30,5]]
So this base has a depot (b_depot = 0) on hex [34,21] turning in direction 2,
an armoury (b_armoury = 4) on hex [56,22] turning in direction 0, and
a fully upgraded lab on hex [45,30] turning in direction 5 with a computer and an opto extension (b_lab_computer = 12, b_lab_opto = 15).