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) &&
|
||||||
@@ -393,7 +395,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
|
|||||||
{
|
{
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("This ChemMaster already has a container in it."));
|
Owner.PopupMessage(args.User, Loc.GetString("This ChemMaster already has a container in it."));
|
||||||
}
|
}
|
||||||
else if (!solution.CanUseWithChemDispenser)
|
else if (!solution.CanUseWithChemDispenser)
|
||||||
{
|
{
|
||||||
//If it can't fit in the chem master, don't put it in. For example, buckets and mop buckets can't fit.
|
//If it can't fit in the chem master, don't put it in. For example, buckets and mop buckets can't fit.
|
||||||
Owner.PopupMessage(args.User, Loc.GetString("The {0:theName} is too large for the ChemMaster!", activeHandEntity));
|
Owner.PopupMessage(args.User, Loc.GetString("The {0:theName} is too large for the ChemMaster!", activeHandEntity));
|
||||||
|
|||||||
Reference in New Issue
Block a user