Revert "Solution Entities" (#23160)

Revert "Solution Entities (#21916)"

This reverts commit d75e743dd7.
This commit is contained in:
Emisse
2023-12-28 20:45:42 -07:00
committed by GitHub
parent c2c76c2035
commit 938d6d9945
180 changed files with 2959 additions and 3543 deletions

View File

@@ -1,8 +1,7 @@
using Content.Server.Chemistry.Containers.EntitySystems;
using Content.Shared.Administration;
using Content.Shared.Chemistry.Components.SolutionManager;
using Content.Shared.Chemistry.EntitySystems;
using Robust.Shared.Console;
using System.Linq;
namespace Content.Server.Administration.Commands
{
@@ -35,13 +34,13 @@ namespace Content.Server.Administration.Commands
return;
}
var solutionContainerSystem = _entManager.System<SolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution((uid.Value, man), args[1], out var solution))
if (!man.Solutions.ContainsKey(args[1]))
{
var validSolutions = string.Join(", ", solutionContainerSystem.EnumerateSolutions((uid.Value, man)).Select(s => s.Name));
var validSolutions = string.Join(", ", man.Solutions.Keys);
shell.WriteLine($"Entity does not have a \"{args[1]}\" solution. Valid solutions are:\n{validSolutions}");
return;
}
var solution = man.Solutions[args[1]];
if (!float.TryParse(args[2], out var quantity))
{
@@ -55,7 +54,7 @@ namespace Content.Server.Administration.Commands
return;
}
solutionContainerSystem.SetTemperature(solution.Value, quantity);
_entManager.System<SolutionContainerSystem>().SetTemperature(uid.Value, solution, quantity);
}
}
}