Make sure braces for multi-line statements are on their own lines.
This commit is contained in:
@@ -25,7 +25,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (disconnected || orderManager.Connection.ConnectionState != ConnectionState.NotConnected)
|
||||
return;
|
||||
|
||||
Game.RunAfterTick(() => Ui.OpenWindow("CONNECTIONFAILED_PANEL", new WidgetArgs {
|
||||
Game.RunAfterTick(() => Ui.OpenWindow("CONNECTIONFAILED_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "orderManager", orderManager },
|
||||
{ "onAbort", null },
|
||||
{ "onRetry", null }
|
||||
|
||||
@@ -127,10 +127,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
{ "orderManager", orderManager },
|
||||
{ "getMap", (Func<MapPreview>)(() => map) },
|
||||
{ "onMouseDown", (Action<MapPreviewWidget, MapPreview, MouseInput>)((preview, mapPreview, mi) =>
|
||||
LobbyUtils.SelectSpawnPoint(orderManager, preview, mapPreview, mi))
|
||||
{
|
||||
"onMouseDown", (Action<MapPreviewWidget, MapPreview, MouseInput>)((preview, mapPreview, mi) =>
|
||||
LobbyUtils.SelectSpawnPoint(orderManager, preview, mapPreview, mi))
|
||||
},
|
||||
{
|
||||
"getSpawnOccupants", (Func<MapPreview, Dictionary<CPos, SpawnOccupant>>)(mapPreview =>
|
||||
LobbyUtils.GetSpawnOccupants(orderManager.LobbyInfo, mapPreview))
|
||||
},
|
||||
{ "getSpawnOccupants", (Func<MapPreview, Dictionary<CPos, SpawnOccupant>>)(mapPreview => LobbyUtils.GetSpawnOccupants(orderManager.LobbyInfo, mapPreview)) },
|
||||
{ "showUnoccupiedSpawnpoints", true },
|
||||
});
|
||||
|
||||
|
||||
@@ -40,11 +40,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public static void ShowSlotDropDown(DropDownButtonWidget dropdown, Session.Slot slot,
|
||||
Session.Client client, OrderManager orderManager, MapPreview map)
|
||||
{
|
||||
var options = new Dictionary<string, IEnumerable<SlotDropDownOption>>() { { "Slot", new List<SlotDropDownOption>()
|
||||
var options = new Dictionary<string, IEnumerable<SlotDropDownOption>>
|
||||
{
|
||||
new SlotDropDownOption("Open", "slot_open " + slot.PlayerReference, () => (!slot.Closed && client == null)),
|
||||
new SlotDropDownOption("Closed", "slot_close " + slot.PlayerReference, () => slot.Closed)
|
||||
} } };
|
||||
{
|
||||
"Slot", new List<SlotDropDownOption>
|
||||
{
|
||||
new SlotDropDownOption("Open", "slot_open " + slot.PlayerReference, () => (!slot.Closed && client == null)),
|
||||
new SlotDropDownOption("Closed", "slot_close " + slot.PlayerReference, () => slot.Closed)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var bots = new List<SlotDropDownOption>();
|
||||
if (slot.AllowBots)
|
||||
|
||||
@@ -81,8 +81,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{ "orderManager", null },
|
||||
{ "getMap", (Func<MapPreview>)(() => map) },
|
||||
{ "onMouseDown", (Action<MapPreviewWidget, MapPreview, MouseInput>)((preview, mapPreview, mi) => { }) },
|
||||
{ "getSpawnOccupants", (Func<MapPreview, Dictionary<CPos, SpawnOccupant>>)(mapPreview =>
|
||||
LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, mapPreview))
|
||||
{
|
||||
"getSpawnOccupants", (Func<MapPreview, Dictionary<CPos, SpawnOccupant>>)(mapPreview =>
|
||||
LobbyUtils.GetSpawnOccupants(selectedReplay.GameInfo.Players, mapPreview))
|
||||
},
|
||||
{ "showUnoccupiedSpawnpoints", false },
|
||||
});
|
||||
|
||||
@@ -204,11 +204,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
catch (System.Net.Sockets.SocketException e)
|
||||
{
|
||||
var message = "Could not listen on port {0}.".F(Game.Settings.Server.ListenPort);
|
||||
if (e.ErrorCode == 10048) { // AddressAlreadyInUse (WSAEADDRINUSE)
|
||||
|
||||
// AddressAlreadyInUse (WSAEADDRINUSE)
|
||||
if (e.ErrorCode == 10048)
|
||||
message += "\nCheck if the port is already being used.";
|
||||
} else {
|
||||
else
|
||||
message += "\nError is: \"{0}\" ({1})".F(e.Message, e.ErrorCode);
|
||||
}
|
||||
|
||||
ConfirmationDialogs.ButtonPrompt("Server Creation Failed", message, onCancel: () => { }, cancelText: "Back");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user