Blueprints a unit of the given type in the given direction. Subtract cost of that unit from the team's resource pool. NoSuchUnit - the worker does not exist (within the vision range). TeamNotAllowed - the worker is not on the current player's team. InappropriateUnitType - the unit is not a worker, or the unit type is not a structure. Overheated - the worker has already performed an action this tu
(&mut self, worker_id: UnitID, structure_type: UnitType,
direction: Direction)
| 654 | /// * InsufficientKarbonite - your team does not have enough Karbonite to |
| 655 | /// build the requested structure. |
| 656 | pub fn blueprint(&mut self, worker_id: UnitID, structure_type: UnitType, |
| 657 | direction: Direction) -> Result<(), GameError> { |
| 658 | let delta = Delta::Blueprint { worker_id, structure_type, direction }; |
| 659 | self.world.apply(&delta)?; |
| 660 | if self.config.generate_turn_messages { |
| 661 | self.turn.changes.push(delta); |
| 662 | } |
| 663 | Ok(()) |
| 664 | } |
| 665 | |
| 666 | /// Whether the worker can build a blueprint with the given ID. The worker |
| 667 | /// and the blueprint must be adjacent to each other. The worker cannot |