pguth66 / screeps-pguth66

My Screeps code
Apache License 2.0
0 stars 1 forks source link

destroying links messes up haulers #33

Open pguthpm opened 5 years ago

pguthpm commented 5 years ago

https://github.com/pguth66/screeps-pguth66/blob/ce9d4b4f4aba2b6665e1157a16362dd8a8937775/default/main.js#L166

I think now that links get cached (?) this error should actually refresh the links cache. Instead what happens is you get an exception because it's trying to reference a dead object when a link gets destroyed.

pguthpm commented 5 years ago

Nope, links aren't cached must be something else

pguthpm commented 5 years ago

ah the error is probably in targetLinks which can be null if the sink link (slink?) got destroyed