Fix warnings and code cleanup/fixes (#13570)
This commit is contained in:
@@ -347,7 +347,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
{
|
||||
_solutionContainerSystem.TryGetSolution(pill, SharedChemMaster.PillSolutionName, out var solution);
|
||||
var quantity = solution?.Volume ?? FixedPoint2.Zero;
|
||||
return ((string, FixedPoint2 quantity))(Name(pill), quantity:(FixedPoint2) quantity);
|
||||
return (Name(pill), quantity);
|
||||
})).ToList();
|
||||
|
||||
return pills is null
|
||||
|
||||
@@ -188,7 +188,7 @@ public sealed partial class ChemistrySystem
|
||||
|
||||
private void OnInjectorStartup(EntityUid uid, InjectorComponent component, ComponentStartup args)
|
||||
{
|
||||
/// ???? why ?????
|
||||
// ???? why ?????
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public sealed partial class ChemistrySystem
|
||||
if (!_solutions.TryGetMixableSolution(args.Target.Value, out solution))
|
||||
return;
|
||||
|
||||
_popup.PopupEntity(Loc.GetString(component.MixMessage, ("mixed", Identity.Entity(args.Target.Value, EntityManager)), ("mixer", Identity.Entity(uid, EntityManager))), args.User, args.User); ;
|
||||
_popup.PopupEntity(Loc.GetString(component.MixMessage, ("mixed", Identity.Entity(args.Target.Value, EntityManager)), ("mixer", Identity.Entity(uid, EntityManager))), args.User, args.User);
|
||||
|
||||
_solutions.UpdateChemicals(args.Target.Value, solution, true, component);
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ public sealed partial class SolutionContainerSystem : EntitySystem
|
||||
/// </summary>
|
||||
/// <param name="uid">EntityUid to which to add solution</param>
|
||||
/// <param name="name">name for the solution</param>
|
||||
/// <param name="minVol">Ensures that the solution's maximum volume is larger than this value./param>
|
||||
/// <param name="minVol">Ensures that the solution's maximum volume is larger than this value.</param>
|
||||
/// <param name="solutionsMgr">solution components used in resolves</param>
|
||||
/// <returns>solution</returns>
|
||||
public Solution EnsureSolution(EntityUid uid, string name, FixedPoint2 minVol, out bool existed,
|
||||
@@ -397,7 +397,7 @@ public sealed partial class SolutionContainerSystem : EntitySystem
|
||||
{
|
||||
if (!Resolve(uid, ref solutionsMgr, false))
|
||||
solutionsMgr = EntityManager.EnsureComponent<SolutionContainerManagerComponent>(uid);
|
||||
|
||||
|
||||
if (!solutionsMgr.Solutions.TryGetValue(name, out var existing))
|
||||
{
|
||||
var newSolution = new Solution(reagents, setMaxVol);
|
||||
|
||||
@@ -130,7 +130,6 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
("target", target)));
|
||||
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user