1
0

GatewayGeneratorComponent.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using Content.Shared.Parallax.Biomes.Markers;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Server.Gateway.Components;
  5. /// <summary>
  6. /// Generates gateway destinations at a regular interval.
  7. /// </summary>
  8. [RegisterComponent, AutoGenerateComponentPause]
  9. public sealed partial class GatewayGeneratorComponent : Component
  10. {
  11. /// <summary>
  12. /// Prototype to spawn on the generated map if applicable.
  13. /// </summary>
  14. [DataField]
  15. public EntProtoId? Proto = "Gateway";
  16. /// <summary>
  17. /// Next time another seed unlocks.
  18. /// </summary>
  19. [DataField(customTypeSerializer:typeof(TimeOffsetSerializer))]
  20. [AutoPausedField]
  21. public TimeSpan NextUnlock;
  22. /// <summary>
  23. /// How long it takes to unlock another destination once one is taken.
  24. /// </summary>
  25. [DataField]
  26. public TimeSpan UnlockCooldown = TimeSpan.FromMinutes(75);
  27. /// <summary>
  28. /// Maps we've generated.
  29. /// </summary>
  30. [DataField]
  31. public List<EntityUid> Generated = new();
  32. [DataField]
  33. public int MobLayerCount = 1;
  34. /// <summary>
  35. /// Mob layers to pick from.
  36. /// </summary>
  37. [DataField]
  38. public List<ProtoId<BiomeMarkerLayerPrototype>> MobLayers = new()
  39. {
  40. "Carps",
  41. "Xenos",
  42. };
  43. [DataField]
  44. public int LootLayerCount = 3;
  45. /// <summary>
  46. /// Loot layers to pick from.
  47. /// </summary>
  48. public List<ProtoId<BiomeMarkerLayerPrototype>> LootLayers = new()
  49. {
  50. "OreIron",
  51. "OreQuartz",
  52. "OreGold",
  53. "OreSilver",
  54. "OrePlasma",
  55. "OreUranium",
  56. "OreBananium",
  57. "OreArtifactFragment",
  58. };
  59. }