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

@@ -6,6 +6,9 @@ namespace Content.Shared.Chemistry.Reaction
{
public interface ITileReaction
{
FixedPoint2 TileReact(TileRef tile, ReagentPrototype reagent, FixedPoint2 reactVolume);
FixedPoint2 TileReact(TileRef tile,
ReagentPrototype reagent,
FixedPoint2 reactVolume,
IEntityManager entityManager);
}
}

View File

@@ -142,7 +142,7 @@ namespace Content.Shared.Chemistry.Reagent
[DataField]
public SoundSpecifier FootstepSound = new SoundCollectionSpecifier("FootstepWater", AudioParams.Default.WithVolume(6));
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume)
public FixedPoint2 ReactionTile(TileRef tile, FixedPoint2 reactVolume, IEntityManager entityManager)
{
var removed = FixedPoint2.Zero;
@@ -151,7 +151,7 @@ namespace Content.Shared.Chemistry.Reagent
foreach (var reaction in TileReactions)
{
removed += reaction.TileReact(tile, this, reactVolume - removed);
removed += reaction.TileReact(tile, this, reactVolume - removed, entityManager);
if (removed > reactVolume)
throw new Exception("Removed more than we have!");