MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / can_repair

Method can_repair

battlecode-engine/src/world.rs:1394–1396  ·  view source on GitHub ↗

Whether the given worker can repair the given strucutre. Tests that the worker is able to execute a worker action, that the structure is built, and that the structure is within range.

(&self, worker_id: UnitID, structure_id: UnitID)

Source from the content-addressed store, hash-verified

1392 /// is able to execute a worker action, that the structure is built, and that the
1393 /// structure is within range.
1394 pub fn can_repair(&self, worker_id: UnitID, structure_id: UnitID) -> bool {
1395 self.ok_if_can_repair(worker_id, structure_id).is_ok()
1396 }
1397
1398 /// Commands the worker to repair a structure, repleneshing health to it. This
1399 /// can only be done to structures which have been fully built.

Callers

nothing calls this directly

Calls 1

ok_if_can_repairMethod · 0.80

Tested by

no test coverage detected