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

Host can change Team and Spawn of any player. #12936 #13002

Merged
merged 1 commit into from May 4, 2017

Conversation

Projects
None yet
5 participants
@rob-v
Contributor

rob-v commented Mar 20, 2017

Host can change Team and Spawn of any player to make it simpler and quicker to setup new game.

@rob-v

This comment has been minimized.

Show comment
Hide comment
@rob-v

rob-v Mar 21, 2017

Contributor

Updated, we don't need backward compatibility, so it is now simpler.

Contributor

rob-v commented Mar 21, 2017

Updated, we don't need backward compatibility, so it is now simpler.

@pchote

pchote approved these changes Apr 22, 2017

Works as advertised on all four default mods. Just one small fix to do for future compatibility:

dropdown.IsDisabled = () => s.LockTeam || orderManager.LocalClient.IsReady;
dropdown.OnMouseDown = _ => ShowTeamDropDown(dropdown, c, orderManager, map.PlayerCount);
dropdown.GetText = () => (c.Team == 0) ? "-" : c.Team.ToString();
HideChildWidget(parent, "TEAM");

This comment has been minimized.

@pchote

pchote Apr 22, 2017

Member

You will also need to hide TEAM_DROPDOWN in SetupTeamWidget in case the template is reused when the player surrenders admin (as a future feature).

@pchote

pchote Apr 22, 2017

Member

You will also need to hide TEAM_DROPDOWN in SetupTeamWidget in case the template is reused when the player surrenders admin (as a future feature).

@@ -450,6 +450,15 @@ public static void SetupEditableSpawnWidget(Widget parent, Session.Slot s, Sessi
ShowSpawnDropDown(dropdown, c, orderManager, spawnPoints);
};
dropdown.GetText = () => (c.SpawnPoint == 0) ? "-" : Convert.ToChar('A' - 1 + c.SpawnPoint).ToString();
HideChildWidget(parent, "SPAWN");

This comment has been minimized.

@pchote

pchote Apr 22, 2017

Member

Likewise for SPAWN_DROPDOWN.

@pchote

pchote Apr 22, 2017

Member

Likewise for SPAWN_DROPDOWN.

@rob-v

This comment has been minimized.

Show comment
Hide comment
@rob-v

rob-v Apr 23, 2017

Contributor

Updated

Contributor

rob-v commented Apr 23, 2017

Updated

@@ -666,6 +666,7 @@ void UpdatePlayerList()
if (orderManager.LocalClient == null)
return;
var isHost = Game.IsHost;

This comment has been minimized.

@Phrohdoh

Phrohdoh Apr 29, 2017

Member

Why are you copying this?

@Phrohdoh

Phrohdoh Apr 29, 2017

Member

Why are you copying this?

This comment has been minimized.

@rob-v

rob-v Apr 29, 2017

Contributor

It is not changing, used in loop so retrieved only once.

@rob-v

rob-v Apr 29, 2017

Contributor

It is not changing, used in loop so retrieved only once.

@pchote pchote added this to the Next Release milestone Apr 30, 2017

@reaperrr

This comment has been minimized.

Show comment
Hide comment
@reaperrr

reaperrr May 4, 2017

Contributor

👍

Contributor

reaperrr commented May 4, 2017

👍

@reaperrr reaperrr merged commit ea29cce into OpenRA:bleed May 4, 2017

2 checks passed

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

This comment has been minimized.

Show comment
Hide comment
@reaperrr
Contributor

reaperrr commented May 4, 2017

@rob-v rob-v deleted the rob-v:LobbyOptionsEditableByHost branch May 4, 2017

@reaperrr reaperrr modified the milestones: Next Release, Next + 1 Sep 1, 2017

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