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

Dynamically generate lobby Map Options UI. #14359

Merged
merged 9 commits into from Dec 12, 2017

Conversation

@pchote
Member

pchote commented Nov 14, 2017

This PR completes the work the work started with #11364 by dynamically generating the map options bin based on the selected map/mod rules.

Custom maps can remove/rearrange existing options by adjusting the *Visible and *DisplayOrder yaml fields, or add their own (see ScriptLobbyDropdown/#14325/#14245).

This also adds descriptive tooltips to the default options.

@pchote pchote changed the title from Unhardcode lobby checkboxes to Dynamically generate lobby Map Options UI. Nov 14, 2017

@pchote pchote referenced this pull request Nov 15, 2017

Closed

Implement bounty checkbox #14245

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Nov 15, 2017

Contributor

c744b13 is a bit out of my league, but the other commits and the in-game result look fine, so 👍

Contributor

reaperrr commented Nov 15, 2017

c744b13 is a bit out of my league, but the other commits and the in-game result look fine, so 👍

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr Nov 17, 2017

Contributor

I think this should go into the playtest, moving to milestone.

Contributor

reaperrr commented Nov 17, 2017

I think this should go into the playtest, moving to milestone.

@reaperrr reaperrr added this to the Next + 1 milestone Nov 17, 2017

@abcdefg30

Changing from Exodus to Infiltration and changing the difficulty and speed dropdowns while the rules have not loaded leads to a crash (which I could not reproduce on bleed):

OpenRA engine version {DEV_VERSION}
Red Alert mod version {DEV_VERSION}
Date: 2017-11-19 00:09:19Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.InvalidOperationException`: Collection was modified. Enumeration operation may not execute. (Die Sammlung wurde geändert. Der Enumerationsvorgang kann möglicherweise nicht ausgeführt werden.)
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at System.Collections.Generic.List`1.Enumerator.MoveNext()
   at OpenRA.Widgets.Widget.TickOuter() in \OpenRA\OpenRA.Game\Widgets\Widget.cs:Line 463.
   at OpenRA.Widgets.Ui.Tick() in \OpenRA\OpenRA.Game\Widgets\Widget.cs:Line 88.
   at OpenRA.Sync.<>c__DisplayClass5.<CheckSyncUnchanged>b__4() in \OpenRA\OpenRA.Game\Sync.cs:Line 166.
   at OpenRA.Sync.CheckSyncUnchanged[T](World world, Func`1 fn) in \OpenRA\OpenRA.Game\Sync.cs:Line 174.
   at OpenRA.Sync.CheckSyncUnchanged(World world, Action fn) in \OpenRA\OpenRA.Game\Sync.cs:Line 166.
   at OpenRA.Game.InnerLogicTick(OrderManager orderManager) in \OpenRA\OpenRA.Game\Game.cs:Line 566.
   at OpenRA.Game.LogicTick() in \OpenRA\OpenRA.Game\Game.cs:Line 633.
   at OpenRA.Game.Loop() in \OpenRA\OpenRA.Game\Game.cs:Line 763.
   at OpenRA.Game.Run() in \OpenRA\OpenRA.Game\Game.cs:Line 803.
   at OpenRA.Program.Run(String[] args) in \OpenRA\OpenRA.Game\Support\Program.cs:Line 136.
   at OpenRA.Program.Main(String[] args) in \OpenRA\OpenRA.Game\Support\Program.cs:Line 40.
@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Nov 19, 2017

Member

Fixed.

Member

pchote commented Nov 19, 2017

Fixed.

@reaperrr reaperrr modified the milestones: Next + 1, Next release Nov 19, 2017

@reaperrr reaperrr removed the PR: Needs +2 label Nov 22, 2017

PR updated

@penev92

This comment has been minimized.

Show comment
Hide comment
@penev92

penev92 Dec 4, 2017

Member

All the random UI-related properties in random TraitInfos really don't sit well with me.
Can we have them as part of the ILobbyOptions interface and give them proper names like LobbyVisible/LobbyDescription/LobbyLocked/etc. ?
And since that's still not quite "proper", I'd actually prefer to see them gone from the respective traits and into a specialized one if possible (but too much of a scope creep for this PR).

Member

penev92 commented Dec 4, 2017

All the random UI-related properties in random TraitInfos really don't sit well with me.
Can we have them as part of the ILobbyOptions interface and give them proper names like LobbyVisible/LobbyDescription/LobbyLocked/etc. ?
And since that's still not quite "proper", I'd actually prefer to see them gone from the respective traits and into a specialized one if possible (but too much of a scope creep for this PR).

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 4, 2017

Member

All the random UI-related properties in random TraitInfos really don't sit well with me.
Can we have them as part of the ILobbyOptions interface and give them proper names like LobbyVisible/LobbyDescription/LobbyLocked/etc. ?
And since that's still not quite "proper", I'd actually prefer to see them gone from the respective traits and into a specialized one if possible (but too much of a scope creep for this PR).

The whole point is to allow individual traits to control their visibility in the options bin via yaml. Making them part of the interface would break FieldLoader/yaml integration, and moving them to another trait would require a new set of plumbing to link them to the traits they control.

Member

pchote commented Dec 4, 2017

All the random UI-related properties in random TraitInfos really don't sit well with me.
Can we have them as part of the ILobbyOptions interface and give them proper names like LobbyVisible/LobbyDescription/LobbyLocked/etc. ?
And since that's still not quite "proper", I'd actually prefer to see them gone from the respective traits and into a specialized one if possible (but too much of a scope creep for this PR).

The whole point is to allow individual traits to control their visibility in the options bin via yaml. Making them part of the interface would break FieldLoader/yaml integration, and moving them to another trait would require a new set of plumbing to link them to the traits they control.

@penev92

Everything seems to work, but I have a bunch of style nits.

P.S.: Eh, I thought I'd do the upgrade rules but ... just rename the bool properties that you're adding now, leave the old ones.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 9, 2017

Member

Fixed all issues, including @penev92's request on IRC to adjust the vertical centering to show all of Fort Lonestar's options without scrolling.

Member

pchote commented Dec 9, 2017

Fixed all issues, including @penev92's request on IRC to adjust the vertical centering to show all of Fort Lonestar's options without scrolling.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 9, 2017

Member

There have been major changes, so @reaperrr please reconfirm your 👍

Member

pchote commented Dec 9, 2017

There have been major changes, so @reaperrr please reconfirm your 👍

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 11, 2017

Member

Rebased.

Member

pchote commented Dec 11, 2017

Rebased.

Changes have been addressed.

@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 12, 2017

Member

Rebased.

Member

pchote commented Dec 12, 2017

Rebased.

@abcdefg30

(PR was only rebased.)

@reaperrr reaperrr merged commit 3ad6a87 into OpenRA:bleed Dec 12, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pchote

This comment has been minimized.

Show comment
Hide comment
@pchote

pchote Dec 13, 2017

Member

I suspect that something went wrong with the rebase or was maybe just missed with the last round of testing. The ordering of the lobby options has regressed on all mods, and the debug menu is no longer enabled by default in TS.

Member

pchote commented Dec 13, 2017

I suspect that something went wrong with the rebase or was maybe just missed with the last round of testing. The ordering of the lobby options has regressed on all mods, and the debug menu is no longer enabled by default in TS.

@pchote pchote deleted the pchote:unhardcode-lobby-checkboxes branch Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment