screeps icon indicating copy to clipboard operation
screeps copied to clipboard

Layout code runs every tick in impossible rooms

Open sparr opened this issue 8 years ago • 10 comments

548 | Executing room failed: W57S2 Error: Can't set layout for room W57S2. Not enough space for filler area Error: Can't set layout for room W57S2. Not enough space for filler area

In addition to spamming me with email notifications, this failure also ate up my cpu bucket because the layout code was running every tick. Maybe upon a failure it should wait for a while before trying again?

sparr avatar Oct 03 '17 03:10 sparr

if this is really impossible room - we can only unclaim it and try something else the error is for human interaction to check, if algorithm is correct. Can you give me a screenshot with paths?

samogot avatar Oct 03 '17 04:10 samogot

I should mention that I'm using the mineral PR that's going to merge tomorrow. However, that's not relevant here, because this failure could happen in a very cramped room even with the current code.

I can't screenshot the paths because I already modified my code to put the upgrader farther from the controller to fix this room.

sparr avatar Oct 03 '17 06:10 sparr

as I remember in current code there will be no exception. room layout will just fail silently, and you'll figure it out only on RCL 4

samogot avatar Oct 03 '17 07:10 samogot

As mentioned in slack, if you can provide the room (room data) I will try to include rooms in the private server test. So that we check further room layout changes in such rooms.

TooAngel avatar Oct 03 '17 19:10 TooAngel

Shard 1, room W57S2. I don't know how to turn the room into parseable data, but you should be able to duplicate just the immediate neighborhood of the controller for testing purposes?

partial map screenshot

sparr avatar Oct 03 '17 20:10 sparr

Will have to look into that, too. If it is on the public server I will find a way. I have to make sure that the exits are at the same place, will need to check how to do that :-)

TooAngel avatar Oct 03 '17 20:10 TooAngel

Another room faced with the same problem: shard1, W15N41

2

kahojyun avatar Oct 04 '17 06:10 kahojyun

oh shirt) I'm not sure it's possible to handle this room even if we move upgrader 3 tiles far from controller

samogot avatar Oct 04 '17 07:10 samogot

kahojyun's example would work with the upgrader 2-3 tiles northeast of the controller. I think my current code would put it 2E3N from the controller.

sparr avatar Oct 04 '17 16:10 sparr

However, this issue is not the right place to discuss fixing a specific layout failure. #437 is the right place to move this discussion. THIS issue is just about making the script not try to do layout every tick and throw an error every tick, regardless of which part of layout fails.

sparr avatar Oct 04 '17 16:10 sparr