The search keyword must be a single word (no spaces).
Function OneBuildLoop
- Line
- 1348
- Location
- common.ai
- Constant?
- no
- Type
- function
- Arguments
- nothing
- Returns
- nothing
| 1348 | function OneBuildLoop takes nothing returns nothing |
| 1349 | local integer index = 0 |
| 1350 | local integer qty |
| 1351 | local integer id |
| 1352 | local integer tp |
| 1353 | |
| 1354 | set total_gold = GetGold() - gold_buffer |
| 1355 | set total_wood = GetWood() |
| 1356 | |
| 1357 | loop
|
| 1358 | exitwhen index == build_length |
| 1359 | |
| 1360 | set qty = build_qty [index] |
| 1361 | set id = build_item[index] |
| 1362 | set tp = build_type[index] |
| 1363 | |
| 1364 | //--------------------------------------------------------------------
|
| 1365 | if tp == BUILD_UNIT then |
| 1366 | if not StartUnit(qty,id,build_town[index]) then |
| 1367 | return
|
| 1368 | endif
|
| 1369 | |
| 1370 | //--------------------------------------------------------------------
|
| 1371 | elseif tp == BUILD_UPGRADE then |
| 1372 | call StartUpgrade(qty,id) |
| 1373 | |
| 1374 | //--------------------------------------------------------------------
|
| 1375 | else // tp == BUILD_EXPAND |
| 1376 | if not StartExpansion(qty,id) then |
| 1377 | return
|
| 1378 | endif
|
| 1379 | endif
|
| 1380 | |
| 1381 | set index = index + 1 |
| 1382 | endloop
|
| 1383 | endfunction
|