Fix misc commands (#20004)
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Content.Client.Administration.UI.SetOutfit
|
||||
public override void HandleState(EuiStateBase state)
|
||||
{
|
||||
var outfitState = (SetOutfitEuiState) state;
|
||||
_window.TargetEntityId = _entManager.GetEntity(outfitState.TargetNetEntity);
|
||||
_window.TargetEntityId = outfitState.TargetNetEntity;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Content.Client.Administration.UI.SetOutfit
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
||||
|
||||
public EntityUid? TargetEntityId { get; set; }
|
||||
public NetEntity? TargetEntityId { get; set; }
|
||||
private StartingGearPrototype? _selectedOutfit;
|
||||
|
||||
public SetOutfitMenu()
|
||||
|
||||
@@ -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} {new NetEntity(MapOptions.SelectedId)}");
|
||||
$"tp {XCoordinate.Value} {YCoordinate.Value} {new MapId(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 {new NetEntity(MapOptions.SelectedId)} \"{MapPath.Text}\" {XCoordinate.Value} {YCoordinate.Value} {RotationSpin.Value}");
|
||||
$"loadbp {new MapId(MapOptions.SelectedId)} \"{MapPath.Text}\" {XCoordinate.Value} {YCoordinate.Value} {RotationSpin.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
[UsedImplicitly]
|
||||
public sealed partial class AddGasWindow : DefaultWindow
|
||||
{
|
||||
private List<EntityUid>? _gridData;
|
||||
private List<NetEntity>? _gridData;
|
||||
private IEnumerable<GasPrototype>? _gasData;
|
||||
|
||||
protected override void EnteredTree()
|
||||
@@ -25,11 +25,12 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
var playerManager = IoCManager.Resolve<IPlayerManager>();
|
||||
|
||||
var gridQuery = entManager.AllEntityQueryEnumerator<MapGridComponent>();
|
||||
_gridData ??= new List<EntityUid>();
|
||||
_gridData ??= new List<NetEntity>();
|
||||
_gridData.Clear();
|
||||
|
||||
while (gridQuery.MoveNext(out var uid, out _))
|
||||
{
|
||||
_gridData.Add(entManager.GetNetEntity(uid));
|
||||
var player = playerManager.LocalPlayer?.ControlledEntity;
|
||||
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
|
||||
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
|
||||
@@ -60,7 +61,6 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
|
||||
var gasList = _gasData.ToList();
|
||||
var gasId = gasList[GasOptions.SelectedId].ID;
|
||||
|
||||
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
|
||||
$"addgas {TileXSpin.Value} {TileYSpin.Value} {gridIndex} {gasId} {AmountSpin.Value}");
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
[UsedImplicitly]
|
||||
public sealed partial class FillGasWindow : DefaultWindow
|
||||
{
|
||||
private List<EntityUid>? _gridData;
|
||||
private List<NetEntity>? _gridData;
|
||||
private IEnumerable<GasPrototype>? _gasData;
|
||||
|
||||
protected override void EnteredTree()
|
||||
@@ -29,7 +29,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
var playerManager = IoCManager.Resolve<IPlayerManager>();
|
||||
|
||||
var gridQuery = entManager.AllEntityQueryEnumerator<MapGridComponent>();
|
||||
_gridData ??= new List<EntityUid>();
|
||||
_gridData ??= new List<NetEntity>();
|
||||
_gridData.Clear();
|
||||
|
||||
while (gridQuery.MoveNext(out var uid, out _))
|
||||
@@ -37,7 +37,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
var player = playerManager.LocalPlayer?.ControlledEntity;
|
||||
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
|
||||
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
|
||||
_gridData.Add(uid);
|
||||
_gridData.Add(entManager.GetNetEntity(uid));
|
||||
}
|
||||
|
||||
GridOptions.OnItemSelected += eventArgs => GridOptions.SelectId(eventArgs.Id);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
[UsedImplicitly]
|
||||
public sealed partial class SetTemperatureWindow : DefaultWindow
|
||||
{
|
||||
private List<EntityUid>? _data;
|
||||
private List<NetEntity>? _data;
|
||||
|
||||
protected override void EnteredTree()
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
var playerManager = IoCManager.Resolve<IPlayerManager>();
|
||||
|
||||
var gridQuery = entManager.AllEntityQueryEnumerator<MapGridComponent>();
|
||||
_data ??= new List<EntityUid>();
|
||||
_data ??= new List<NetEntity>();
|
||||
_data.Clear();
|
||||
|
||||
while (gridQuery.MoveNext(out var uid, out _))
|
||||
@@ -33,7 +33,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
|
||||
var player = playerManager.LocalPlayer?.ControlledEntity;
|
||||
var playerGrid = entManager.GetComponentOrNull<TransformComponent>(player)?.GridUid;
|
||||
GridOptions.AddItem($"{uid} {(playerGrid == uid ? " (Current)" : "")}");
|
||||
_data.Add(uid);
|
||||
_data.Add(entManager.GetNetEntity(uid));
|
||||
}
|
||||
|
||||
GridOptions.OnItemSelected += eventArgs => GridOptions.SelectId(eventArgs.Id);
|
||||
@@ -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} {IoCManager.Resolve<IEntityManager>().GetNetEntity(selectedGrid)} {TemperatureSpin.Value}");
|
||||
.ExecuteCommand($"settemp {TileXSpin.Value} {TileYSpin.Value} {selectedGrid} {TemperatureSpin.Value}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user