From: mikey <23003816+mikeysaurus@users.noreply.github.com>
Date: Fri, 9 Jan 2026 06:44:22 +0000 (-0800)
Subject: Increase shuttle FTL cooldown to prevent FTL spamming (#42209)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=ec024001e715faaebb60d2df9a1c262504d81cf9;p=space-station-14.git
Increase shuttle FTL cooldown to prevent FTL spamming (#42209)
* seperate out shuttle cooldowns
* fix
* feedback
* fix spacing
* update to TimeSpan
* GOAT float
* return to TimeSpan
* add var
* clarify with seconds
* clarifying some things
---
diff --git a/Content.Server/Shuttles/Components/ShuttleComponent.cs b/Content.Server/Shuttles/Components/ShuttleComponent.cs
index 0aa815d2df..75a162f643 100644
--- a/Content.Server/Shuttles/Components/ShuttleComponent.cs
+++ b/Content.Server/Shuttles/Components/ShuttleComponent.cs
@@ -68,5 +68,12 @@ namespace Content.Server.Shuttles.Components
///
[DataField]
public float DampingModifier;
+
+ ///
+ /// Optional override for the FTL cooldown for this shuttle.
+ /// If not null, then the value will be used instead of the shuttle.cooldown CCVar.
+ ///
+ [DataField]
+ public TimeSpan? FTLCooldownOverride = null;
}
}
diff --git a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
index a63359077f..1441c2edc8 100644
--- a/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
+++ b/Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
@@ -48,7 +48,8 @@ public sealed partial class ShuttleSystem
public float DefaultStartupTime;
public float DefaultTravelTime;
public float DefaultArrivalTime;
- private float FTLCooldown;
+ private TimeSpan FTLCooldown;
+ private TimeSpan ArrivalsFTLCooldown;
public float FTLMassLimit;
private TimeSpan _hyperspaceKnockdownTime = TimeSpan.FromSeconds(5);
@@ -87,7 +88,8 @@ public sealed partial class ShuttleSystem
_cfg.OnValueChanged(CCVars.FTLStartupTime, time => DefaultStartupTime = time, true);
_cfg.OnValueChanged(CCVars.FTLTravelTime, time => DefaultTravelTime = time, true);
_cfg.OnValueChanged(CCVars.FTLArrivalTime, time => DefaultArrivalTime = time, true);
- _cfg.OnValueChanged(CCVars.FTLCooldown, time => FTLCooldown = time, true);
+ _cfg.OnValueChanged(CCVars.FTLCooldown, time => FTLCooldown = TimeSpan.FromSeconds(time), true);
+ _cfg.OnValueChanged(CCVars.ArrivalsFTLCooldown, time => ArrivalsFTLCooldown = TimeSpan.FromSeconds(time), true);
_cfg.OnValueChanged(CCVars.FTLMassLimit, time => FTLMassLimit = time, true);
_cfg.OnValueChanged(CCVars.HyperspaceKnockdownTime, time => _hyperspaceKnockdownTime = TimeSpan.FromSeconds(time), true);
}
@@ -542,7 +544,10 @@ public sealed partial class ShuttleSystem
}
comp.State = FTLState.Cooldown;
- comp.StateTime = StartEndTime.FromCurTime(_gameTiming, FTLCooldown);
+ var cooldown = entity.Comp2.FTLCooldownOverride ?? (HasComp(uid)
+ ? ArrivalsFTLCooldown
+ : FTLCooldown);
+ comp.StateTime = StartEndTime.FromCurTime(_gameTiming, cooldown);
_console.RefreshShuttleConsoles(uid);
_mapSystem.SetPaused(mapId, false);
Smimsh(uid, xform: xform);
diff --git a/Content.Shared/CCVar/CCVars.Shuttle.cs b/Content.Shared/CCVar/CCVars.Shuttle.cs
index 28ed146eaf..ad8e9b2d70 100644
--- a/Content.Shared/CCVar/CCVars.Shuttle.cs
+++ b/Content.Shared/CCVar/CCVars.Shuttle.cs
@@ -95,10 +95,17 @@ public sealed partial class CCVars
CVarDef.Create("shuttle.arrival_time", 5f, CVar.SERVERONLY);
///
- /// How much time needs to pass before a shuttle can FTL again.
+ /// How much time in seconds that needs to pass before a non-arrivals shuttle can FTL again.
///
public static readonly CVarDef FTLCooldown =
- CVarDef.Create("shuttle.cooldown", 10f, CVar.SERVERONLY);
+ CVarDef.Create("shuttle.cooldown", 60f, CVar.SERVERONLY);
+
+ ///
+ /// How much time in seconds that needs to pass before the arrivals shuttle can FTL again.
+ /// If this is adjusted, ensure that shuttle.arrivals_cooldown is longer than this value.
+ ///
+ public static readonly CVarDef ArrivalsFTLCooldown =
+ CVarDef.Create("shuttle.arrivals_ftl_cooldown", 10f, CVar.SERVERONLY);
///
/// The maximum a grid can have before it becomes unable to FTL.