NoiseIndexComponent.cs 730 B

1234567891011121314151617181920
  1. using Content.Server.Worldgen.Prototypes;
  2. using Content.Server.Worldgen.Systems;
  3. namespace Content.Server.Worldgen.Components;
  4. /// <summary>
  5. /// This is used for containing configured noise generators.
  6. /// </summary>
  7. [RegisterComponent]
  8. [Access(typeof(NoiseIndexSystem))]
  9. public sealed partial class NoiseIndexComponent : Component
  10. {
  11. /// <summary>
  12. /// An index of generators, to avoid having to recreate them every time a noise channel is used.
  13. /// Keyed by noise generator prototype ID.
  14. /// </summary>
  15. [Access(typeof(NoiseIndexSystem), Friend = AccessPermissions.ReadWriteExecute, Other = AccessPermissions.None)]
  16. public Dictionary<string, NoiseGenerator> Generators { get; } = new();
  17. }