Content update for NetEntities (#18935)
This commit is contained in:
@@ -152,7 +152,7 @@ namespace Content.Server.Medical.BiomassReclaimer
|
||||
if (!HasComp<MobStateComponent>(args.Used) || !CanGib(uid, args.Used, component))
|
||||
return;
|
||||
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(args.User, 7f, new ReclaimerDoAfterEvent(), uid, target: args.Target, used: args.Used)
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, 7f, new ReclaimerDoAfterEvent(), uid, target: args.Target, used: args.Used)
|
||||
{
|
||||
BreakOnTargetMove = true,
|
||||
BreakOnUserMove = true,
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Content.Server.Medical.CrewMonitoring
|
||||
|
||||
// update all sensors info
|
||||
var allSensors = component.ConnectedSensors.Values.ToList();
|
||||
UserInterfaceSystem.SetUiState(bui, new CrewMonitoringState(allSensors, component.Snap, component.Precision));
|
||||
_uiSystem.SetUiState(bui, new CrewMonitoringState(allSensors, component.Snap, component.Precision));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
|
||||
if (cryoPodComponent.BodyContainer.ContainedEntity != null)
|
||||
return;
|
||||
|
||||
var doAfterArgs = new DoAfterArgs(args.User, cryoPodComponent.EntryDelay, new CryoPodDragFinished(), uid, target: args.Dragged, used: uid)
|
||||
var doAfterArgs = new DoAfterArgs(EntityManager, args.User, cryoPodComponent.EntryDelay, new CryoPodDragFinished(), uid, target: args.Dragged, used: uid)
|
||||
{
|
||||
BreakOnDamage = true,
|
||||
BreakOnTargetMove = true,
|
||||
@@ -184,8 +184,8 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
|
||||
_userInterfaceSystem.TrySendUiMessage(
|
||||
uid,
|
||||
HealthAnalyzerUiKey.Key,
|
||||
new HealthAnalyzerScannedUserMessage(cryoPodComponent.BodyContainer.ContainedEntity,
|
||||
temp != null ? temp.CurrentTemperature : 0, bloodstream != null ? bloodstream.BloodSolution.FillFraction : 0));
|
||||
new HealthAnalyzerScannedUserMessage(GetNetEntity(cryoPodComponent.BodyContainer.ContainedEntity),
|
||||
temp?.CurrentTemperature ?? 0, bloodstream != null ? bloodstream.BloodSolution.FillFraction : 0));
|
||||
}
|
||||
|
||||
private void OnInteractUsing(EntityUid uid, CryoPodComponent cryoPodComponent, InteractUsingEvent args)
|
||||
|
||||
@@ -177,7 +177,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
return false;
|
||||
|
||||
_audio.PlayPvs(component.ChargeSound, uid);
|
||||
return _doAfter.TryStartDoAfter(new DoAfterArgs(user, component.DoAfterDuration, new DefibrillatorZapDoAfterEvent(),
|
||||
return _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, user, component.DoAfterDuration, new DefibrillatorZapDoAfterEvent(),
|
||||
uid, target, uid)
|
||||
{
|
||||
BlockDuplicate = true,
|
||||
|
||||
@@ -187,7 +187,7 @@ public sealed class HealingSystem : EntitySystem
|
||||
: component.Delay * GetScaledHealingPenalty(user, component);
|
||||
|
||||
var doAfterEventArgs =
|
||||
new DoAfterArgs(user, delay, new HealingDoAfterEvent(), target, target: target, used: uid)
|
||||
new DoAfterArgs(EntityManager, user, delay, new HealingDoAfterEvent(), target, target: target, used: uid)
|
||||
{
|
||||
//Raise the event on the target if it's not self, otherwise raise it on self.
|
||||
BreakOnUserMove = true,
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Content.Server.Medical
|
||||
|
||||
_audio.PlayPvs(healthAnalyzer.ScanningBeginSound, uid);
|
||||
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(args.User, healthAnalyzer.ScanDelay, new HealthAnalyzerDoAfterEvent(), uid, target: args.Target, used: uid)
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, healthAnalyzer.ScanDelay, new HealthAnalyzerDoAfterEvent(), uid, target: args.Target, used: uid)
|
||||
{
|
||||
BreakOnTargetMove = true,
|
||||
BreakOnUserMove = true,
|
||||
@@ -75,7 +75,7 @@ namespace Content.Server.Medical
|
||||
|
||||
OpenUserInterface(user, healthAnalyzer);
|
||||
|
||||
_uiSystem.SendUiMessage(healthAnalyzer.UserInterface, new HealthAnalyzerScannedUserMessage(target, temp != null ? temp.CurrentTemperature : float.NaN,
|
||||
_uiSystem.SendUiMessage(healthAnalyzer.UserInterface, new HealthAnalyzerScannedUserMessage(GetNetEntity(target), temp != null ? temp.CurrentTemperature : float.NaN,
|
||||
bloodstream != null ? bloodstream.BloodSolution.FillFraction : float.NaN));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace Content.Server.Medical.Stethoscope
|
||||
// construct the doafter and start it
|
||||
private void StartListening(EntityUid scope, EntityUid user, EntityUid target, StethoscopeComponent comp)
|
||||
{
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(user, comp.Delay, new StethoscopeDoAfterEvent(), scope, target: target, used: scope)
|
||||
_doAfterSystem.TryStartDoAfter(new DoAfterArgs(EntityManager, user, comp.Delay, new StethoscopeDoAfterEvent(), scope, target: target, used: scope)
|
||||
{
|
||||
BreakOnTargetMove = true,
|
||||
BreakOnUserMove = true,
|
||||
|
||||
@@ -321,7 +321,7 @@ namespace Content.Server.Medical.SuitSensors
|
||||
totalDamage = damageable.TotalDamage.Int();
|
||||
|
||||
// finally, form suit sensor status
|
||||
var status = new SuitSensorStatus(uid, userName, userJob);
|
||||
var status = new SuitSensorStatus(GetNetEntity(uid), userName, userJob);
|
||||
switch (sensor.Mode)
|
||||
{
|
||||
case SuitSensorMode.SensorBinary:
|
||||
@@ -353,7 +353,7 @@ namespace Content.Server.Medical.SuitSensors
|
||||
coordinates = EntityCoordinates.Invalid;
|
||||
}
|
||||
|
||||
status.Coordinates = coordinates;
|
||||
status.Coordinates = GetNetCoordinates(coordinates);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -404,11 +404,11 @@ namespace Content.Server.Medical.SuitSensors
|
||||
payload.TryGetValue(SuitSensorConstants.NET_TOTAL_DAMAGE, out int? totalDamage);
|
||||
payload.TryGetValue(SuitSensorConstants.NET_COORDINATES, out EntityCoordinates? cords);
|
||||
|
||||
var status = new SuitSensorStatus(suitSensorUid, name, job)
|
||||
var status = new SuitSensorStatus(GetNetEntity(suitSensorUid), name, job)
|
||||
{
|
||||
IsAlive = isAlive.Value,
|
||||
TotalDamage = totalDamage,
|
||||
Coordinates = cords,
|
||||
Coordinates = GetNetCoordinates(cords),
|
||||
};
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user