Resolve 'EntitySystem.Get<T>()' is obsolete in content (#27936)
* PROJECT 0 WARNINGS: Resolve `'EntitySystem.Get<T>()' is obsolete` in content * pass entman * dog ass test * webeditor
This commit is contained in:
@@ -26,7 +26,7 @@ namespace Content.Server.Chemistry.ReactionEffects
|
||||
|
||||
cleanseRate *= args.Scale;
|
||||
|
||||
var bloodstreamSys = EntitySystem.Get<BloodstreamSystem>();
|
||||
var bloodstreamSys = args.EntityManager.System<BloodstreamSystem>();
|
||||
bloodstreamSys.FlushChemicals(args.SolutionEntity, args.Reagent.ID, cleanseRate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
{
|
||||
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out FlammableComponent? flammable)) return;
|
||||
|
||||
var flammableSystem = EntitySystem.Get<FlammableSystem>();
|
||||
var flammableSystem = args.EntityManager.System<FlammableSystem>();
|
||||
flammableSystem.Extinguish(args.SolutionEntity, flammable);
|
||||
flammableSystem.AdjustFireStacks(args.SolutionEntity, -1.5f * (float) args.Quantity, flammable);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed partial class Ignite : ReagentEffect
|
||||
|
||||
public override void Effect(ReagentEffectArgs args)
|
||||
{
|
||||
var flamSys = EntitySystem.Get<FlammableSystem>();
|
||||
var flamSys = args.EntityManager.System<FlammableSystem>();
|
||||
flamSys.Ignite(args.SolutionEntity, args.OrganEntity ?? args.SolutionEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public sealed partial class ModifyBleedAmount : ReagentEffect
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent<BloodstreamComponent>(args.SolutionEntity, out var blood))
|
||||
{
|
||||
var sys = EntitySystem.Get<BloodstreamSystem>();
|
||||
var sys = args.EntityManager.System<BloodstreamSystem>();
|
||||
var amt = Scaled ? Amount * args.Quantity.Float() : Amount;
|
||||
amt *= args.Scale;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public sealed partial class ModifyBloodLevel : ReagentEffect
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent<BloodstreamComponent>(args.SolutionEntity, out var blood))
|
||||
{
|
||||
var sys = EntitySystem.Get<BloodstreamSystem>();
|
||||
var sys = args.EntityManager.System<BloodstreamSystem>();
|
||||
var amt = Scaled ? Amount * args.Quantity : Amount;
|
||||
amt *= args.Scale;
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
IncreaseTimer(status, statusLifetime);
|
||||
|
||||
if (modified)
|
||||
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(args.SolutionEntity);
|
||||
args.EntityManager.System<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(args.SolutionEntity);
|
||||
|
||||
}
|
||||
public void IncreaseTimer(MovespeedModifierMetabolismComponent status, float time)
|
||||
|
||||
@@ -18,7 +18,7 @@ public sealed partial class Oxygenate : ReagentEffect
|
||||
{
|
||||
if (args.EntityManager.TryGetComponent<RespiratorComponent>(args.SolutionEntity, out var resp))
|
||||
{
|
||||
var respSys = EntitySystem.Get<RespiratorSystem>();
|
||||
var respSys = args.EntityManager.System<RespiratorSystem>();
|
||||
respSys.UpdateSaturation(args.SolutionEntity, args.Quantity.Float() * Factor, resp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public sealed partial class Paralyze : ReagentEffect
|
||||
var paralyzeTime = ParalyzeTime;
|
||||
paralyzeTime *= args.Scale;
|
||||
|
||||
EntitySystem.Get<StunSystem>().TryParalyze(args.SolutionEntity, TimeSpan.FromSeconds(paralyzeTime), Refresh);
|
||||
args.EntityManager.System<StunSystem>().TryParalyze(args.SolutionEntity, TimeSpan.FromSeconds(paralyzeTime), Refresh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
{
|
||||
var uid = args.SolutionEntity;
|
||||
if (args.EntityManager.TryGetComponent(uid, out ThirstComponent? thirst))
|
||||
EntitySystem.Get<ThirstSystem>().ModifyThirst(uid, thirst, HydrationFactor);
|
||||
args.EntityManager.System<ThirstSystem>().ModifyThirst(uid, thirst, HydrationFactor);
|
||||
}
|
||||
|
||||
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Content.Server.Chemistry.ReagentEffects
|
||||
{
|
||||
if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out CreamPiedComponent? creamPied)) return;
|
||||
|
||||
EntitySystem.Get<CreamPieSystem>().SetCreamPied(args.SolutionEntity, creamPied, false);
|
||||
args.EntityManager.System<CreamPieSystem>().SetCreamPied(args.SolutionEntity, creamPied, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user