Dla argumentu btype = -1 funkcja zwraca listę ze wszystkimi budynkami danej strony.
Código: Seleccionar todo
Export Function GetBuildingsList(side, btype);
var i, tmp, list;
begin
if btype = -1 then
tmp := FilterAllUnits([[f_side, side], [f_type, unit_building]])
else
tmp := FilterAllUnits([[f_side, side], [f_btype, btype]]);
list := [];
for i = 1 to tmp do
list := list ^ [[GetBType(tmp[i]), GetX(tmp[i]), GetY(tmp[i]), GetDir(tmp[i])]];
result = list;
End;