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

Randomize all maps when there is only 1 player #583

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,11 @@

private List<Map> GetMapList(int playerCount)
{
if (playerCount == 1)
{
List<Map> allMaps = GameMode?.Maps.ToList() ?? new List<Map>();
return allMaps;
}
Flactine marked this conversation as resolved.
Show resolved Hide resolved
List<Map> mapList = (GameMode?.Maps.Where(x => x.MaxPlayers == playerCount) ?? Array.Empty<Map>()).ToList();
if (mapList.Count < 1 && playerCount <= MAX_PLAYER_COUNT)
return GetMapList(playerCount + 1);
Expand Down Expand Up @@ -769,7 +774,7 @@
ddGameModeMapFilter.SelectedIndex = gameModeMapFilterIndex;
}

protected void AddSideToDropDown(XNADropDown dd, string name, string? uiName = null, Texture2D? texture = null)

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (Ares)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (Ares)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (TS)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (TS)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (YR)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

Check warning on line 777 in DXMainClient/DXGUI/Multiplayer/GameLobby/GameLobbyBase.cs

View workflow job for this annotation

GitHub Actions / build-clients (YR)

The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
{
XNADropDownItem item = new()
{
Expand Down
Loading