Fix warnings and code cleanup/fixes (#13570)

This commit is contained in:
Visne
2023-01-19 03:56:45 +01:00
committed by GitHub
parent 3ca5a0224b
commit c6d3e4f3bd
265 changed files with 499 additions and 666 deletions

View File

@@ -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

View File

@@ -188,7 +188,7 @@ public sealed partial class ChemistrySystem
private void OnInjectorStartup(EntityUid uid, InjectorComponent component, ComponentStartup args)
{
/// ???? why ?????
// ???? why ?????
Dirty(component);
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -130,7 +130,6 @@ namespace Content.Server.Chemistry.EntitySystems
("target", target)));
args.Handled = true;
return;
}
}
}