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

creep in room corner moves to diagonal adjacent room #52

Closed
wants to merge 2 commits into from

Conversation

sparr
Copy link
Contributor

@sparr sparr commented Sep 27, 2017

The default map generator doesn't allow rooms to have open corners, but that's no reason for this code to be lazy. If a creep is in the corner, it should move to the diagonally adjacent room.

@tedivm
Copy link
Contributor

tedivm commented Nov 11, 2017

Shouldn't a PR that does this also update Game.map.describeExits?

@sparr
Copy link
Contributor Author

sparr commented Nov 11, 2017

@tedivm excellent point!

That will require updating:

makeMap.describeExits
https://github.com/screeps/engine/blob/master/src/game/map.js#L18-L44

and

WorldMapGrid.prototype._buildGridData in screeps/driver. https://github.com/screeps/driver/blob/22379332c7c4132e6a9f74fc72a2a30f0c42128b/lib/runtime/mapgrid.js#L59-L121

I'll submit an update to this PR and a matching PR to screeps/driver when I get a chance.

@tedivm
Copy link
Contributor

tedivm commented Nov 11, 2017

You may also need to update the find function and add new FIND_ constants for the newly available exits.

@artch
Copy link
Contributor

artch commented Jan 1, 2018

Corner tiles aren't supposed to be exit tiles by design. I would prefer a change which makes them non-functional at all, rather than leading to diagonal rooms.

@artch artch closed this Jan 1, 2018
@sparr
Copy link
Contributor Author

sparr commented Jan 3, 2018

So if a room was, somehow, created/modified to have an accessible corner square, a creep moving there should be able to sit stationary there without changing rooms?

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.

None yet

4 participants