| 568 | } |
| 569 | |
| 570 | GameValue ListAllowGetIn(const GameState* state, GameValuePar oper1, GameValuePar oper2) |
| 571 | { |
| 572 | const GameArrayType& array = oper1; |
| 573 | bool allow = oper2; |
| 574 | for (int i = 0; i < array.Size(); i++) |
| 575 | { |
| 576 | Object* obj = GetObject(array[i]); |
| 577 | if (!obj) |
| 578 | { |
| 579 | continue; |
| 580 | } |
| 581 | EntityAI* ai = dyn_cast<EntityAI>(obj); |
| 582 | if (!ai) |
| 583 | { |
| 584 | continue; |
| 585 | } |
| 586 | AIUnit* unit = ai->CommanderUnit(); |
| 587 | if (!unit) |
| 588 | { |
| 589 | continue; |
| 590 | } |
| 591 | unit->AllowGetIn(allow); |
| 592 | } |
| 593 | |
| 594 | return NOTHING; |
| 595 | } |
| 596 | |
| 597 | GameValue ListOrderGetIn(const GameState* state, GameValuePar oper1, GameValuePar oper2) |
| 598 | { |
nothing calls this directly
no test coverage detected