Code: Select all
"actions":[{
"type":"rect",
"w":9,
"h":9,
"skip x":3,
"skip y":3,
"inner":[{
"type":"build",
"id":"$whatever"
}]
}]
Code: Select all
"actions":[{
"type":"rect",
"w":9,
"h":9,
"skip x":3,
"skip y":3,
"inner":[{
"type":"build",
"id":"$whatever"
}]
}]
Code: Select all
local function buildRect(draft, x, y, width, height, stepx, stepy)
stepx = stepx or 1
stepy = stepy or 1
for oy=0,height-1,stepy do
for ox=0,width-1,stepx do
if Builder.isBuildingBuildable(draft, x + ox, y + oy) then
Builder.buildBuilding(draft, x + ox, y + oy)
end
end
end
end