Skip to content

Conversation

@sparr
Copy link
Contributor

@sparr sparr commented Sep 28, 2017

This PR introduces a new helper function, Room.getMemoryPathSidewalk(). This produces a path-like list that contains every position on one side of a memorized path. This function is then used to fix the tower/filler/link placement code to avoid the previous problems where there would be gaps between those positions. I also included improvements like using both sides of the road and packing the positions closer together on diagonal roads.

Example of new layout:

Fixes #445

return false;
};

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

this function should be placed in _routing or somewhere else, but not in _memory file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm conflicted. It's theoretically a routing function, but the only place it's currently called is in_memory. I decided to put it here until/unless it gets used somewhere else. I could easily be convinced otherwise.

@sparr sparr changed the title new tower placement algorithm, fixes bugs and improves WIP new tower placement algorithm, fixes bugs and improves Sep 29, 2017
@sparr
Copy link
Contributor Author

sparr commented Sep 29, 2017

Marking this WIP. Will get combined into a single new-base-layout patch to avoid rebuilding existing bases.

@sparr sparr changed the title WIP new tower placement algorithm, fixes bugs and improves [WIP] new tower placement algorithm, fixes bugs and improves Sep 29, 2017
@ghost ghost added the WIP label Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tower link placement mistakes

2 participants