Have crew monitor display entity coordinates instead (#13120)

closes https://github.com/space-wizards/space-station-14/issues/13042
This commit is contained in:
keronshb
2023-01-09 08:25:46 -05:00
committed by GitHub
parent 05975606cf
commit 72bddb6bdb
5 changed files with 20 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.DeviceNetwork.Systems;
using Content.Server.Medical.SuitSensors;
using Content.Server.UserInterface;
using Content.Shared.Medical.CrewMonitoring;
using Robust.Shared.Map;
using Robust.Shared.Timing;
namespace Content.Server.Medical.CrewMonitoring
@@ -66,9 +67,9 @@ namespace Content.Server.Medical.CrewMonitoring
return;
// update all sensors info
var worldPos = _xform.GetWorldPosition(uid);
var xform = Transform(uid);
var allSensors = component.ConnectedSensors.Values.ToList();
var uiState = new CrewMonitoringState(allSensors, worldPos, component.Snap, component.Precision);
var uiState = new CrewMonitoringState(allSensors, xform.WorldPosition, component.Snap, component.Precision);
ui.SetState(uiState);
}