Fix typechecks

This commit is contained in:
uwap 2026-01-03 09:30:08 +01:00
parent 6895b94279
commit 0176c85df4
11 changed files with 35 additions and 16 deletions

View file

@ -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;
}