Fix typechecks
This commit is contained in:
parent
6895b94279
commit
0176c85df4
11 changed files with 35 additions and 16 deletions
|
|
@ -222,7 +222,7 @@ export default profiler.registerFN(function (room: Room) {
|
|||
for (let i = 0; i < path.length; i++) {
|
||||
const pos = path[i];
|
||||
structures[getCoord(pos.x, pos.y)]
|
||||
= (i === path.length - 1 && "energy" in target)
|
||||
= (i === path.length - 1 && "ticksToRegeneration" in target)
|
||||
? STRUCTURE_CONTAINER
|
||||
: STRUCTURE_ROAD;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue