remove unused Session.Slot
This commit is contained in:
@@ -810,7 +810,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
if (template == null || template.Id != editablePlayerTemplate.Id)
|
if (template == null || template.Id != editablePlayerTemplate.Id)
|
||||||
template = editablePlayerTemplate.Clone();
|
template = editablePlayerTemplate.Clone();
|
||||||
|
|
||||||
LobbyUtils.SetupClientWidget(template, slot, client, orderManager, client.Bot == null);
|
LobbyUtils.SetupClientWidget(template, client, orderManager, client.Bot == null);
|
||||||
|
|
||||||
if (client.Bot != null)
|
if (client.Bot != null)
|
||||||
LobbyUtils.SetupEditableSlotWidget(template, slot, client, orderManager, modRules);
|
LobbyUtils.SetupEditableSlotWidget(template, slot, client, orderManager, modRules);
|
||||||
@@ -829,7 +829,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
if (template == null || template.Id != nonEditablePlayerTemplate.Id)
|
if (template == null || template.Id != nonEditablePlayerTemplate.Id)
|
||||||
template = nonEditablePlayerTemplate.Clone();
|
template = nonEditablePlayerTemplate.Clone();
|
||||||
|
|
||||||
LobbyUtils.SetupClientWidget(template, slot, client, orderManager, client.Bot == null);
|
LobbyUtils.SetupClientWidget(template, client, orderManager, client.Bot == null);
|
||||||
LobbyUtils.SetupNameWidget(template, slot, client);
|
LobbyUtils.SetupNameWidget(template, slot, client);
|
||||||
LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby,
|
LobbyUtils.SetupKickWidget(template, slot, client, orderManager, lobby,
|
||||||
() => panel = PanelType.Kick, () => panel = PanelType.Players);
|
() => panel = PanelType.Kick, () => panel = PanelType.Players);
|
||||||
@@ -879,7 +879,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
() => panel = PanelType.Kick, () => panel = PanelType.Players);
|
() => panel = PanelType.Kick, () => panel = PanelType.Players);
|
||||||
}
|
}
|
||||||
|
|
||||||
LobbyUtils.SetupClientWidget(template, null, c, orderManager, true);
|
LobbyUtils.SetupClientWidget(template, c, orderManager, true);
|
||||||
template.IsVisible = () => true;
|
template.IsVisible = () => true;
|
||||||
|
|
||||||
if (idx >= players.Children.Count)
|
if (idx >= players.Children.Count)
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
return ip;
|
return ip;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetupClientWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, bool visible)
|
public static void SetupClientWidget(Widget parent, Session.Client c, OrderManager orderManager, bool visible)
|
||||||
{
|
{
|
||||||
parent.Get("ADMIN_INDICATOR").IsVisible = () => c.IsAdmin;
|
parent.Get("ADMIN_INDICATOR").IsVisible = () => c.IsAdmin;
|
||||||
var block = parent.Get("LATENCY");
|
var block = parent.Get("LATENCY");
|
||||||
|
|||||||
Reference in New Issue
Block a user