Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -104,7 +104,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
private void OnTeleportButtonPressed(BaseButton.ButtonEventArgs obj)
{
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"tp {XCoordinate.Value} {YCoordinate.Value} {MapOptions.SelectedId}");
$"tp {XCoordinate.Value} {YCoordinate.Value} {new NetEntity(MapOptions.SelectedId)}");
}
private void OnSubmitButtonPressed(BaseButton.ButtonEventArgs obj)
@@ -112,7 +112,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
if (MapPath.Text.Length == 0) return;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"loadbp {MapOptions.SelectedId} \"{MapPath.Text}\" {XCoordinate.Value} {YCoordinate.Value} {RotationSpin.Value}");
$"loadbp {new NetEntity(MapOptions.SelectedId)} \"{MapPath.Text}\" {XCoordinate.Value} {YCoordinate.Value} {RotationSpin.Value}");
}
}
}

View File

@@ -38,8 +38,9 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
if (_data == null)
return;
var dataList = _data.ToList();
var entManager = IoCManager.Resolve<IEntityManager>();
var selectedGrid = dataList[GridOptions.SelectedId].Owner;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {selectedGrid}");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {entManager.GetNetEntity(selectedGrid)}");
}
}
}

View File

@@ -47,7 +47,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
var selectedGrid = _data[GridOptions.SelectedId];
IoCManager.Resolve<IClientConsoleHost>()
.ExecuteCommand($"settemp {TileXSpin.Value} {TileYSpin.Value} {selectedGrid} {TemperatureSpin.Value}");
.ExecuteCommand($"settemp {TileXSpin.Value} {TileYSpin.Value} {IoCManager.Resolve<IEntityManager>().GetNetEntity(selectedGrid)} {TemperatureSpin.Value}");
}
}
}

View File

@@ -18,6 +18,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
private const string ArrowDown = "↓";
private readonly Color _altColor = Color.FromHex("#292B38");
private readonly Color _defaultColor = Color.FromHex("#2F2F3B");
private IEntityManager _entManager;
private readonly AdminSystem _adminSystem;
private IReadOnlyList<PlayerInfo> _players = new List<PlayerInfo>();
@@ -29,7 +30,8 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
public PlayerTab()
{
_adminSystem = EntitySystem.Get<AdminSystem>();
_entManager = IoCManager.Resolve<IEntityManager>();
_adminSystem = _entManager.System<AdminSystem>();
RobustXamlLoader.Load(this);
RefreshPlayerList(_adminSystem.PlayerList);
@@ -119,7 +121,7 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
player.Antag ? "YES" : "NO",
new StyleBoxFlat(useAltColor ? _altColor : _defaultColor),
player.Connected);
entry.PlayerUid = player.EntityUid;
entry.PlayerUid = _entManager.GetEntity(player.NetEntity);
entry.OnPressed += args => OnEntryPressed?.Invoke(args);
PlayerList.AddChild(entry);