Fix 3000 errors
This commit is contained in:
@@ -144,7 +144,7 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
/// Perform a reaction on a solution. This assumes all reaction criteria are met.
|
||||
/// Removes the reactants from the solution, then returns a solution with all products.
|
||||
/// </summary>
|
||||
private Solution PerformReaction(Solution solution, EntityUid ownerUid, ReactionPrototype reaction, FixedPoint2 unitReactions)
|
||||
private Solution PerformReaction(Solution solution, EntityUid Owner, ReactionPrototype reaction, FixedPoint2 unitReactions)
|
||||
{
|
||||
// We do this so that ReagentEffect can have something to work with, even if it's
|
||||
// a little meaningless.
|
||||
@@ -167,14 +167,14 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
}
|
||||
|
||||
// Trigger reaction effects
|
||||
OnReaction(solution, reaction, randomReagent, ownerUid, unitReactions);
|
||||
OnReaction(solution, reaction, randomReagent, Owner, unitReactions);
|
||||
|
||||
return products;
|
||||
}
|
||||
|
||||
protected virtual void OnReaction(Solution solution, ReactionPrototype reaction, ReagentPrototype randomReagent, EntityUid ownerUid, FixedPoint2 unitReactions)
|
||||
protected virtual void OnReaction(Solution solution, ReactionPrototype reaction, ReagentPrototype randomReagent, EntityUid Owner, FixedPoint2 unitReactions)
|
||||
{
|
||||
var args = new ReagentEffectArgs(ownerUid, null, solution,
|
||||
var args = new ReagentEffectArgs(Owner, null, solution,
|
||||
randomReagent,
|
||||
unitReactions, EntityManager, null);
|
||||
|
||||
@@ -185,9 +185,9 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
|
||||
if (effect.ShouldLog)
|
||||
{
|
||||
var entity = EntityManager.GetEntity(args.SolutionEntity);
|
||||
var entity = args.SolutionEntity;
|
||||
_logSystem.Add(LogType.ReagentEffect, effect.LogImpact,
|
||||
$"Reaction effect {effect.GetType().Name} of reaction ${reaction.ID:reaction} applied on entity {entity} at {IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(entity).Coordinates}");
|
||||
$"Reaction effect {effect.GetType().Name} of reaction ${reaction.ID:reaction} applied on entity {entity} at {EntityManager.GetComponent<TransformComponent>(entity).Coordinates}");
|
||||
}
|
||||
|
||||
effect.Effect(args);
|
||||
@@ -199,7 +199,7 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
/// Removes the reactants from the solution, then returns a solution with all products.
|
||||
/// WARNING: Does not trigger reactions between solution and new products.
|
||||
/// </summary>
|
||||
private bool ProcessReactions(Solution solution, EntityUid ownerUid, [MaybeNullWhen(false)] out Solution productSolution)
|
||||
private bool ProcessReactions(Solution solution, EntityUid Owner, [MaybeNullWhen(false)] out Solution productSolution)
|
||||
{
|
||||
foreach(var reactant in solution.Contents)
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
if (!CanReact(solution, reaction, out var unitReactions))
|
||||
continue;
|
||||
|
||||
productSolution = PerformReaction(solution, ownerUid, reaction, unitReactions);
|
||||
productSolution = PerformReaction(solution, Owner, reaction, unitReactions);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -223,11 +223,11 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
/// <summary>
|
||||
/// Continually react a solution until no more reactions occur.
|
||||
/// </summary>
|
||||
public void FullyReactSolution(Solution solution, EntityUid ownerUid)
|
||||
public void FullyReactSolution(Solution solution, EntityUid Owner)
|
||||
{
|
||||
for (var i = 0; i < MaxReactionIterations; i++)
|
||||
{
|
||||
if (!ProcessReactions(solution, ownerUid, out var products))
|
||||
if (!ProcessReactions(solution, Owner, out var products))
|
||||
return;
|
||||
|
||||
if (products.TotalVolume <= 0)
|
||||
@@ -235,18 +235,18 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
|
||||
solution.AddSolution(products);
|
||||
}
|
||||
Logger.Error($"{nameof(Solution)} {ownerUid} could not finish reacting in under {MaxReactionIterations} loops.");
|
||||
Logger.Error($"{nameof(Solution)} {Owner} could not finish reacting in under {MaxReactionIterations} loops.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Continually react a solution until no more reactions occur, with a volume constraint.
|
||||
/// If a reaction's products would exceed the max volume, some product is deleted.
|
||||
/// </summary>
|
||||
public void FullyReactSolution(Solution solution, EntityUid ownerUid, FixedPoint2 maxVolume)
|
||||
public void FullyReactSolution(Solution solution, EntityUid Owner, FixedPoint2 maxVolume)
|
||||
{
|
||||
for (var i = 0; i < MaxReactionIterations; i++)
|
||||
{
|
||||
if (!ProcessReactions(solution, ownerUid, out var products))
|
||||
if (!ProcessReactions(solution, Owner, out var products))
|
||||
return;
|
||||
|
||||
if (products.TotalVolume <= 0)
|
||||
@@ -262,7 +262,7 @@ namespace Content.Shared.Chemistry.Reaction
|
||||
|
||||
solution.AddSolution(products);
|
||||
}
|
||||
Logger.Error($"{nameof(Solution)} {ownerUid} could not finish reacting in under {MaxReactionIterations} loops.");
|
||||
Logger.Error($"{nameof(Solution)} {Owner} could not finish reacting in under {MaxReactionIterations} loops.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user