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:
Kara
2024-05-12 17:34:52 -07:00
committed by GitHub
parent efc430f651
commit 993eef1e7c
65 changed files with 186 additions and 110 deletions

View File

@@ -29,7 +29,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
!system.EntityManager.TryGetComponent<TransformComponent>(owner, out var xform))
return;
var vendingMachineSystem = EntitySystem.Get<VendingMachineSystem>();
var vendingMachineSystem = system.EntityManager.System<VendingMachineSystem>();
var inventory = vendingMachineSystem.GetAvailableInventory(owner, vendingcomp);
if (inventory.Count <= 0)
return;

View File

@@ -11,7 +11,7 @@ public sealed partial class OpenBehavior : IThresholdBehavior
{
public void Execute(EntityUid uid, DestructibleSystem system, EntityUid? cause = null)
{
var openable = EntitySystem.Get<OpenableSystem>();
var openable = system.EntityManager.System<OpenableSystem>();
openable.TryOpen(uid);
}
}

View File

@@ -22,8 +22,8 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
/// <param name="cause"></param>
public void Execute(EntityUid owner, DestructibleSystem system, EntityUid? cause = null)
{
var solutionContainerSystem = EntitySystem.Get<SolutionContainerSystem>();
var spillableSystem = EntitySystem.Get<PuddleSystem>();
var solutionContainerSystem = system.EntityManager.System<SolutionContainerSystem>();
var spillableSystem = system.EntityManager.System<PuddleSystem>();
var coordinates = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;