Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop creeps on corner squares from changing rooms #72

Open
wants to merge 1 commit into
base: ptr
Choose a base branch
from

Conversation

sparr
Copy link
Contributor

@sparr sparr commented Jan 4, 2018

this is the more preferred solution, rather than rejected #52

@sparr sparr changed the base branch from master to ptr January 4, 2018 05:22
Copy link
Contributor

@artch artch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not enough, since bulk.update(object, {interRoom: {room, x, y}}); will still be executed. You have to change line 50 instead.

@sparr
Copy link
Contributor Author

sparr commented Jan 7, 2018

There are plenty of other places in the code where bulk.update() is called without any changed information. I can rework this one, but I think putting all the conditionals in one big compound if will be less readable than this way. I could, instead, wrap the bulk.update with an if(anything changed)?

@artch
Copy link
Contributor

artch commented Jan 7, 2018

interRoom is not a regular property, it only exists in a creep which requests room transition, and is cleared after that.

@sparr
Copy link
Contributor Author

sparr commented Jan 7, 2018

Ahh, got it. I didn't realize that this wouldn't be a do-nothing call in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants