diff --git a/Content.Server/Worldgen/Prototypes/GCQueuePrototype.cs b/Content.Server/Worldgen/Prototypes/GCQueuePrototype.cs index c62f2bc00d9..94e6cf5fa31 100644 --- a/Content.Server/Worldgen/Prototypes/GCQueuePrototype.cs +++ b/Content.Server/Worldgen/Prototypes/GCQueuePrototype.cs @@ -1,4 +1,4 @@ -using Robust.Shared.Prototypes; +using Robust.Shared.Prototypes; namespace Content.Server.Worldgen.Prototypes; @@ -23,7 +23,7 @@ public sealed class GCQueuePrototype : IPrototype /// The maximum amount of time that can be spent processing this queue. /// [DataField("maximumTickTime")] - public TimeSpan MaximumTickTime { get; } = TimeSpan.FromMilliseconds(5); // Frontier 1<5 + public TimeSpan MaximumTickTime { get; } = TimeSpan.FromMilliseconds(1); /// /// The minimum depth before entities in the queue actually get processed for deletion. @@ -38,3 +38,4 @@ public sealed class GCQueuePrototype : IPrototype [DataField("trySkipQueue")] public bool TrySkipQueue { get; } } + diff --git a/Content.Server/Worldgen/Systems/LocalityLoaderSystem.cs b/Content.Server/Worldgen/Systems/LocalityLoaderSystem.cs index 18cc1be8beb..fb02e8aa0bd 100644 --- a/Content.Server/Worldgen/Systems/LocalityLoaderSystem.cs +++ b/Content.Server/Worldgen/Systems/LocalityLoaderSystem.cs @@ -1,10 +1,5 @@ -using Content.Server.Worldgen.Components; +using Content.Server.Worldgen.Components; using Robust.Server.GameObjects; -using Content.Server._NF.Worldgen.Components.Debris; // Frontier -using Content.Shared.Humanoid; // Frontier -using Content.Shared.Mobs.Components; // Frontier -using Robust.Server.GameObjects; // Frontier -using Robust.Shared.Spawners; // Frontier namespace Content.Server.Worldgen.Systems; @@ -15,13 +10,6 @@ public sealed class LocalityLoaderSystem : BaseWorldSystem { [Dependency] private readonly TransformSystem _xformSys = default!; - private const float DebrisActiveDuration = 5*60; // Frontier - Duration to reset the despawn timer to when a debris is loaded into a player's view. - - public override void Initialize() // Frontier - { - SubscribeLocalEvent(OnDebrisDespawn); - } - /// public override void Update(float frameTime) { @@ -57,8 +45,6 @@ public override void Update(float frameTime) if ((_xformSys.GetWorldPosition(loaderXform) - _xformSys.GetWorldPosition(xform)).Length() > loadable.LoadingDistance) continue; - ResetTimedDespawn(uid); // Frontier - Reset the TimedDespawnComponent's lifetime when loaded - RaiseLocalEvent(uid, new LocalStructureLoadedEvent()); RemCompDeferred(uid); done = true; @@ -68,34 +54,10 @@ public override void Update(float frameTime) } } } - - // Frontier - private void ResetTimedDespawn(EntityUid uid) - { - if (TryComp(uid, out var timedDespawn)) - { - timedDespawn.Lifetime = DebrisActiveDuration; - } - else - { - // Add TimedDespawnComponent if it does not exist - timedDespawn = AddComp(uid); - timedDespawn.Lifetime = DebrisActiveDuration; - } - } - - private void OnDebrisDespawn(EntityUid entity, SpaceDebrisComponent component, EntityTerminatingEvent e) - { - var mobQuery = AllEntityQuery(); - - while (mobQuery.MoveNext(out var mob, out _, out _, out var xform)) - if (xform.MapUid is not null && xform.GridUid == entity) - _xformSys.SetCoordinates(mob, new(xform.MapUid.Value, _xformSys.GetWorldPosition(xform))); - } - // Frontier } /// -/// An event fired on a loadable entity when a local loader enters its vicinity. +/// A directed fired on a loadable entity when a local loader enters it's vicinity. /// public record struct LocalStructureLoadedEvent; + diff --git a/Content.Shared/_NF/Worldgen/Components/Debris/SpaceDebrisComponent.cs b/Content.Shared/_NF/Worldgen/Components/Debris/SpaceDebrisComponent.cs deleted file mode 100644 index fcb18abd365..00000000000 --- a/Content.Shared/_NF/Worldgen/Components/Debris/SpaceDebrisComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Robust.Shared.GameStates; - -namespace Content.Server._NF.Worldgen.Components.Debris; - -[RegisterComponent, NetworkedComponent] -public sealed partial class SpaceDebrisComponent : Component -{ -} diff --git a/Resources/Prototypes/Entities/World/Debris/base_debris.yml b/Resources/Prototypes/Entities/World/Debris/base_debris.yml index ff5cb037de3..c125d991fd4 100644 --- a/Resources/Prototypes/Entities/World/Debris/base_debris.yml +++ b/Resources/Prototypes/Entities/World/Debris/base_debris.yml @@ -4,5 +4,3 @@ components: - type: OwnedDebris - type: LocalityLoader - - type: TimedDespawn # Frontier - lifetime: 600 # Frontier \ No newline at end of file diff --git a/Resources/Prototypes/GC/world.yml b/Resources/Prototypes/GC/world.yml index 166942edca6..b58a68158cc 100644 --- a/Resources/Prototypes/GC/world.yml +++ b/Resources/Prototypes/GC/world.yml @@ -1,5 +1,4 @@ - type: gcQueue id: SpaceDebris - depth: 256 # Frontier - minDepthToProcess: 128 # Frontier - trySkipQueue: true # Frontier - Attempt immediate removal if possible \ No newline at end of file + depth: 512 # So there's a decent bit of time before roids unload. + minDepthToProcess: 256