| 720 | } |
| 721 | |
| 722 | void Agent::addEquipment(GameState &state, sp<AEquipment> object, EquipmentSlotType slotType) |
| 723 | { |
| 724 | Vec2<int> pos = findFirstSlotByType(slotType, object->type); |
| 725 | if (pos.x == -1) |
| 726 | { |
| 727 | LogError("Trying to add \"%s\" on agent \"%s\" failed: no valid slot found", type.id, |
| 728 | this->name); |
| 729 | return; |
| 730 | } |
| 731 | |
| 732 | this->addEquipment(state, pos, object); |
| 733 | } |
| 734 | |
| 735 | void Agent::addEquipment(GameState &state, Vec2<int> pos, sp<AEquipment> object) |
| 736 | { |
no test coverage detected