Code cleanup
This commit is contained in:
committed by
teinarss
parent
10ac07bf9f
commit
2c8c6e50da
@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
slotsButton.IsVisible = () => panel != PanelType.Servers;
|
||||
slotsButton.IsDisabled = () => configurationDisabled() || panel != PanelType.Players ||
|
||||
(orderManager.LobbyInfo.Slots.Values.All(s => !s.AllowBots) &&
|
||||
orderManager.LobbyInfo.Slots.Count(s => !s.Value.LockTeam && orderManager.LobbyInfo.ClientInSlot(s.Key) != null) == 0);
|
||||
!orderManager.LobbyInfo.Slots.Any(s => !s.Value.LockTeam && orderManager.LobbyInfo.ClientInSlot(s.Key) != null));
|
||||
|
||||
slotsButton.OnMouseDown = _ =>
|
||||
{
|
||||
@@ -269,7 +269,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
Title = $"{d} Teams",
|
||||
IsSelected = () => false,
|
||||
OnClick = () => orderManager.IssueOrder(Order.Command($"assignteams {d.ToString()}"))
|
||||
OnClick = () => orderManager.IssueOrder(Order.Command($"assignteams {d}"))
|
||||
}).ToList();
|
||||
|
||||
if (orderManager.LobbyInfo.Slots.Any(s => s.Value.AllowBots))
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
"Slot", new List<SlotDropDownOption>
|
||||
{
|
||||
new SlotDropDownOption("Open", "slot_open " + slot.PlayerReference, () => (!slot.Closed && client == null)),
|
||||
new SlotDropDownOption("Open", "slot_open " + slot.PlayerReference, () => !slot.Closed && client == null),
|
||||
new SlotDropDownOption("Closed", "slot_close " + slot.PlayerReference, () => slot.Closed)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
[ObjectCreator.UseCtor]
|
||||
public SpawnSelectorTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, MapPreviewWidget preview, bool showUnoccupiedSpawnpoints)
|
||||
{
|
||||
bool showTooltip = true;
|
||||
var showTooltip = true;
|
||||
widget.IsVisible = () => preview.TooltipSpawnIndex != -1 && showTooltip;
|
||||
var label = widget.Get<LabelWidget>("LABEL");
|
||||
var flag = widget.Get<ImageWidget>("FLAG");
|
||||
|
||||
Reference in New Issue
Block a user