MappingPrototype.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Content.Shared.Decals;
  2. using Content.Shared.Maps;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Client.Mapping;
  5. /// <summary>
  6. /// Used to represent a button's data in the mapping editor.
  7. /// </summary>
  8. public sealed class MappingPrototype
  9. {
  10. /// <summary>
  11. /// The prototype instance, if any.
  12. /// Can be one of <see cref="EntityPrototype"/>, <see cref="ContentTileDefinition"/> or <see cref="DecalPrototype"/>
  13. /// If null, this is a top-level button (such as Entities, Tiles or Decals)
  14. /// </summary>
  15. public readonly IPrototype? Prototype;
  16. /// <summary>
  17. /// The text to display on the UI for this button.
  18. /// </summary>
  19. public readonly string Name;
  20. /// <summary>
  21. /// Which other prototypes (buttons) this one is nested inside of.
  22. /// </summary>
  23. public List<MappingPrototype>? Parents;
  24. /// <summary>
  25. /// Which other prototypes (buttons) are nested inside this one.
  26. /// </summary>
  27. public List<MappingPrototype>? Children;
  28. public MappingPrototype(IPrototype? prototype, string name)
  29. {
  30. Prototype = prototype;
  31. Name = name;
  32. }
  33. }