Make sure braces for multi-line statements are on their own lines.

This commit is contained in:
Paul Chote
2019-06-08 15:04:36 +01:00
committed by reaperrr
parent c89f8dbb89
commit ebf2ce32c0
34 changed files with 180 additions and 91 deletions

View File

@@ -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 },
});

View File

@@ -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)