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

Add priority levels to production exits #17183

Merged
merged 3 commits into from Dec 5, 2019
Merged

Conversation

@pchote
Copy link
Member

pchote commented Oct 5, 2019

This PR adds the ability to specify multiple priorities for exits, with lower priorities only being considered if all higher priority exits are blocked.

This is used to fix the exit behaviour for TS barracks: each defines two normal exits (0,2 and 1,2 for GDI; 2,2 and 3,2 for Nod) and all the remaining perimeter cells as fallback.

Screenshot 2019-10-05 at 17 13 25

Fixes #10843.
Supersedes #17105.

.GroupBy(e => e.Priority)
.FirstOrDefault();

var exits = priorityExits != null ? priorityExits.ToArray() : new ExitInfo[0];

This comment has been minimized.

Copy link
@Mailaender

Mailaender Oct 15, 2019

Member

What does the new ExitInfo[0] do?

This comment has been minimized.

Copy link
@teinarss

teinarss Nov 5, 2019

Contributor

An empty array :)

@reaperrr reaperrr mentioned this pull request Nov 17, 2019
Copy link
Contributor

tovl left a comment

It would be a good idea to add fallback exits to RA kennels as well, so we can close #16792.

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 19, 2019

Purist comment:
kennel

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 20, 2019

FWIW, my comment above was not meant to be an objection against adding fallback exits to the kennel. It's probably good enough.

@pchote pchote dismissed stale reviews from ghost and teinarss via eec75c4 Dec 1, 2019
@pchote pchote force-pushed the pchote:exit-priority branch from c4f620d to eec75c4 Dec 1, 2019
@pchote

This comment has been minimized.

Copy link
Member Author

pchote commented Dec 1, 2019

Rebased and updated Kennel exits:

Screenshot 2019-12-01 at 00 28 44

The primary exit is to the bottom-left (-1,1). If this is blocked it will prefer (-1,0) and (0,1) before falling back again to the other 5 cells.

@tovl
tovl approved these changes Dec 1, 2019
Copy link
Contributor

tovl left a comment

It might look better if the spawn point for the kennel exits (0, -1), (1, -1) and (1, 0) was placed more to the upper right. This is not a blocker though.

@tovl

This comment has been minimized.

Copy link
Contributor

tovl commented Dec 5, 2019

@matjaeck @teinarss do you consider your +1 still valid?

@teinarss teinarss merged commit 494a787 into OpenRA:bleed Dec 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pchote pchote deleted the pchote:exit-priority branch Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.