SolutionContainerSystem.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Content.Shared.Chemistry.Components;
  2. using Content.Shared.Chemistry.Components.SolutionManager;
  3. using Content.Shared.Chemistry.EntitySystems;
  4. using Content.Shared.FixedPoint;
  5. using Robust.Shared.Containers;
  6. using Robust.Shared.Map;
  7. using Robust.Shared.Utility;
  8. using System.Numerics;
  9. namespace Content.Server.Chemistry.Containers.EntitySystems;
  10. [Obsolete("This is being depreciated. Use SharedSolutionContainerSystem instead!")]
  11. public sealed partial class SolutionContainerSystem : SharedSolutionContainerSystem
  12. {
  13. [Obsolete("This is being depreciated. Use the ensure methods in SharedSolutionContainerSystem instead!")]
  14. public Solution EnsureSolution(Entity<MetaDataComponent?> entity, string name)
  15. => EnsureSolution(entity, name, out _);
  16. [Obsolete("This is being depreciated. Use the ensure methods in SharedSolutionContainerSystem instead!")]
  17. public Solution EnsureSolution(Entity<MetaDataComponent?> entity, string name, out bool existed)
  18. => EnsureSolution(entity, name, FixedPoint2.Zero, out existed);
  19. [Obsolete("This is being depreciated. Use the ensure methods in SharedSolutionContainerSystem instead!")]
  20. public Solution EnsureSolution(Entity<MetaDataComponent?> entity, string name, FixedPoint2 maxVol, out bool existed)
  21. => EnsureSolution(entity, name, maxVol, null, out existed);
  22. [Obsolete("This is being depreciated. Use the ensure methods in SharedSolutionContainerSystem instead!")]
  23. public Solution EnsureSolution(Entity<MetaDataComponent?> entity, string name, FixedPoint2 maxVol, Solution? prototype, out bool existed)
  24. {
  25. EnsureSolution(entity, name, maxVol, prototype, out existed, out var solution);
  26. return solution!;//solution is only ever null on the client, so we can suppress this
  27. }
  28. [Obsolete("This is being depreciated. Use the ensure methods in SharedSolutionContainerSystem instead!")]
  29. public Entity<SolutionComponent> EnsureSolutionEntity(
  30. Entity<SolutionContainerManagerComponent?> entity,
  31. string name,
  32. FixedPoint2 maxVol,
  33. Solution? prototype,
  34. out bool existed)
  35. {
  36. EnsureSolutionEntity(entity, name, out existed, out var solEnt, maxVol, prototype);
  37. return solEnt!.Value;//solEnt is only ever null on the client, so we can suppress this
  38. }
  39. }