Fix chemmaster not checking for reactions
This commit is contained in:
@@ -229,10 +229,12 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
actualAmount = ReagentUnit.Min(reagent.Quantity, amount, beakerSolution.EmptyVolume);
|
actualAmount = ReagentUnit.Min(reagent.Quantity, amount, beakerSolution.EmptyVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BufferSolution.Solution.RemoveReagent(id, actualAmount);
|
BufferSolution.Solution.RemoveReagent(id, actualAmount);
|
||||||
if (_bufferModeTransfer)
|
if (_bufferModeTransfer)
|
||||||
{
|
{
|
||||||
beakerSolution.Solution.AddReagent(id, actualAmount);
|
beakerSolution.TryAddReagent(id, actualAmount, out var _);
|
||||||
|
// beakerSolution.Solution.AddReagent(id, actualAmount);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -283,7 +285,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
var bufferSolution = BufferSolution.Solution.SplitSolution(actualVolume);
|
var bufferSolution = BufferSolution.Solution.SplitSolution(actualVolume);
|
||||||
|
|
||||||
bottle.TryGetComponent<SolutionContainerComponent>(out var bottleSolution);
|
bottle.TryGetComponent<SolutionContainerComponent>(out var bottleSolution);
|
||||||
bottleSolution?.Solution.AddSolution(bufferSolution);
|
bottleSolution?.TryAddSolution(bufferSolution);
|
||||||
|
|
||||||
//Try to give them the bottle
|
//Try to give them the bottle
|
||||||
if (user.TryGetComponent<HandsComponent>(out var hands) &&
|
if (user.TryGetComponent<HandsComponent>(out var hands) &&
|
||||||
@@ -317,7 +319,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
var bufferSolution = BufferSolution.Solution.SplitSolution(actualVolume);
|
var bufferSolution = BufferSolution.Solution.SplitSolution(actualVolume);
|
||||||
|
|
||||||
pill.TryGetComponent<SolutionContainerComponent>(out var pillSolution);
|
pill.TryGetComponent<SolutionContainerComponent>(out var pillSolution);
|
||||||
pillSolution?.Solution.AddSolution(bufferSolution);
|
pillSolution?.TryAddSolution(bufferSolution);
|
||||||
|
|
||||||
//Try to give them the bottle
|
//Try to give them the bottle
|
||||||
if (user.TryGetComponent<HandsComponent>(out var hands) &&
|
if (user.TryGetComponent<HandsComponent>(out var hands) &&
|
||||||
|
|||||||
Reference in New Issue
Block a user