ReagentEntityReaction uses EntityUid
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Content.Shared.Chemistry
|
||||
foreach (var reaction in reactive.Reactions)
|
||||
{
|
||||
// If we have a source solution, use the reagent quantity we have left. Otherwise, use the reaction volume specified.
|
||||
reaction.React(method, entity, reagent, source?.GetReagentQuantity(reagent.ID) ?? reactVolume, source);
|
||||
reaction.React(method, entity.Uid, reagent, source?.GetReagentQuantity(reagent.ID) ?? reactVolume, source, EntityManager);
|
||||
|
||||
// Make sure we still have enough reagent to go...
|
||||
if (source != null && !source.ContainsReagent(reagent.ID))
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
[DataField("ingestion")]
|
||||
public bool Ingestion { get; } = false;
|
||||
|
||||
public void React(ReactionMethod method, IEntity entity, ReagentPrototype reagent, FixedPoint2 volume, Components.Solution? source)
|
||||
public void React(ReactionMethod method, EntityUid uid, ReagentPrototype reagent, FixedPoint2 volume, Components.Solution? source, IEntityManager entityManager)
|
||||
{
|
||||
switch (method)
|
||||
{
|
||||
@@ -48,9 +48,9 @@ namespace Content.Shared.Chemistry.Reagent
|
||||
throw new ArgumentOutOfRangeException(nameof(method), method, null);
|
||||
}
|
||||
|
||||
React(entity, reagent, volume, source);
|
||||
React(uid, reagent, volume, source, entityManager);
|
||||
}
|
||||
|
||||
protected abstract void React(IEntity entity, ReagentPrototype reagent, FixedPoint2 volume, Components.Solution? source);
|
||||
protected abstract void React(EntityUid uid, ReagentPrototype reagent, FixedPoint2 volume, Components.Solution? source, IEntityManager entityManager);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user