BiomeEntityLayer.cs 1016 B

123456789101112131415161718192021222324252627
  1. using Content.Shared.Maps;
  2. using Robust.Shared.Noise;
  3. using Robust.Shared.Prototypes;
  4. using Robust.Shared.Serialization;
  5. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
  6. namespace Content.Shared.Parallax.Biomes.Layers;
  7. [Serializable, NetSerializable]
  8. public sealed partial class BiomeEntityLayer : IBiomeWorldLayer
  9. {
  10. /// <inheritdoc/>
  11. [DataField("allowedTiles", customTypeSerializer:typeof(PrototypeIdListSerializer<ContentTileDefinition>))]
  12. public List<string> AllowedTiles { get; private set; } = new();
  13. [DataField("noise")] public FastNoiseLite Noise { get; private set; } = new(0);
  14. /// <inheritdoc/>
  15. [DataField("threshold")]
  16. public float Threshold { get; private set; } = 0.5f;
  17. /// <inheritdoc/>
  18. [DataField("invert")] public bool Invert { get; private set; } = false;
  19. [DataField("entities", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
  20. public List<string> Entities = new();
  21. }