LocalityLoaderComponent.cs 686 B

12345678910111213141516171819
  1. using Content.Server.Worldgen.Systems;
  2. namespace Content.Server.Worldgen.Components;
  3. /// <summary>
  4. /// This is used for sending a signal to the entity it's on to load contents whenever a loader gets close enough.
  5. /// Does not support unloading.
  6. /// </summary>
  7. [RegisterComponent]
  8. [Access(typeof(LocalityLoaderSystem))]
  9. public sealed partial class LocalityLoaderComponent : Component
  10. {
  11. /// <summary>
  12. /// The maximum distance an entity can be from the loader for it to not load.
  13. /// Once a loader is closer than this, the event is fired and this component removed.
  14. /// </summary>
  15. [DataField("loadingDistance")] public int LoadingDistance = 32;
  16. }