StorageContainerVisualsComponent.cs 1007 B

123456789101112131415161718192021222324252627282930
  1. using Content.Client.Chemistry.Visualizers;
  2. using Content.Shared.Chemistry.Components;
  3. namespace Content.Client.Storage.Components;
  4. /// <summary>
  5. /// Essentially a version of <see cref="SolutionContainerVisualsComponent"/> fill level handling but for item storage.
  6. /// Depending on the fraction of storage that's filled, will change the sprite at <see cref="FillLayer"/> to the nearest
  7. /// fill level, up to <see cref="MaxFillLevels"/>.
  8. /// </summary>
  9. [RegisterComponent]
  10. public sealed partial class StorageContainerVisualsComponent : Component
  11. {
  12. [DataField("maxFillLevels")]
  13. public int MaxFillLevels = 0;
  14. /// <summary>
  15. /// A prefix to use for the fill states., i.e. {FillBaseName}{fill level} for the state
  16. /// </summary>
  17. [DataField("fillBaseName")]
  18. public string? FillBaseName;
  19. [DataField("layer")]
  20. public StorageContainerVisualLayers FillLayer = StorageContainerVisualLayers.Fill;
  21. }
  22. public enum StorageContainerVisualLayers : byte
  23. {
  24. Fill
  25. }