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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user