DrinkSystem uses EntityUid instead of IEntity

This commit is contained in:
Vera Aguilera Puerto
2021-11-09 11:28:27 +01:00
parent 0220551f72
commit 1a177f7479
12 changed files with 71 additions and 32 deletions

View File

@@ -106,7 +106,7 @@ namespace Content.Server.Chemistry.Components
return true;
}
removedSolution.DoEntityReaction(target, ReactionMethod.Injection);
removedSolution.DoEntityReaction(target.Uid, ReactionMethod.Injection);
EntitySystem.Get<SolutionContainerSystem>().TryAddSolution(target.Uid, targetSolution, removedSolution);

View File

@@ -201,11 +201,11 @@ namespace Content.Server.Chemistry.Components
// TODO: Account for partial transfer.
var bloodsStreamEntity = Owner.EntityManager.GetEntity(user.Uid);
removedSolution.DoEntityReaction(bloodsStreamEntity, ReactionMethod.Injection);
removedSolution.DoEntityReaction(bloodsStreamEntity.Uid, ReactionMethod.Injection);
EntitySystem.Get<SolutionContainerSystem>().TryAddSolution(user.Uid, bloodstream, removedSolution);
removedSolution.DoEntityReaction(targetBloodstream.Owner, ReactionMethod.Injection);
removedSolution.DoEntityReaction(targetBloodstream.Owner.Uid, ReactionMethod.Injection);
Owner.PopupMessage(user,
Loc.GetString("injector-component-inject-success-message",
@@ -236,7 +236,7 @@ namespace Content.Server.Chemistry.Components
// Move units from attackSolution to targetSolution
var removedSolution = EntitySystem.Get<SolutionContainerSystem>().SplitSolution(Owner.Uid, solution, realTransferAmount);
removedSolution.DoEntityReaction(targetEntity, ReactionMethod.Injection);
removedSolution.DoEntityReaction(targetEntity.Uid, ReactionMethod.Injection);
if (!asRefill)
{

View File

@@ -46,7 +46,7 @@ namespace Content.Server.Chemistry.Components
foreach (var reagentQuantity in transferSolution.Contents.ToArray())
{
if (reagentQuantity.Quantity == FixedPoint2.Zero) continue;
chemistry.ReactionEntity(entity, ReactionMethod.Ingestion, reagentQuantity.ReagentId, reagentQuantity.Quantity, transferSolution);
chemistry.ReactionEntity(entity.Uid, ReactionMethod.Ingestion, reagentQuantity.ReagentId, reagentQuantity.Quantity, transferSolution);
}
bloodstream.TryTransferSolution(transferSolution);

View File

@@ -143,7 +143,7 @@ namespace Content.Server.Chemistry.Components
// Touch every entity on the tile
foreach (var entity in tile.GetEntitiesInTileFast().ToArray())
{
chemistry.ReactionEntity(entity, ReactionMethod.Touch, reagent,
chemistry.ReactionEntity(entity.Uid, ReactionMethod.Touch, reagent,
reagentQuantity.Quantity * solutionFraction, solution);
}
}