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);
_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);
}
}
comp.State = FTLState.Cooldown;
- comp.StateTime = StartEndTime.FromCurTime(_gameTiming, FTLCooldown);
+ var cooldown = entity.Comp2.FTLCooldownOverride ?? (HasComp<ArrivalsShuttleComponent>(uid)
+ ? ArrivalsFTLCooldown
+ : FTLCooldown);
+ comp.StateTime = StartEndTime.FromCurTime(_gameTiming, cooldown);
_console.RefreshShuttleConsoles(uid);
_mapSystem.SetPaused(mapId, false);
Smimsh(uid, xform: xform);
CVarDef.Create("shuttle.arrival_time", 5f, CVar.SERVERONLY);
/// <summary>
- /// 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.
/// </summary>
public static readonly CVarDef<float> FTLCooldown =
- CVarDef.Create("shuttle.cooldown", 10f, CVar.SERVERONLY);
+ CVarDef.Create("shuttle.cooldown", 60f, CVar.SERVERONLY);
+
+ /// <summary>
+ /// 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.
+ /// </summary>
+ public static readonly CVarDef<float> ArrivalsFTLCooldown =
+ CVarDef.Create("shuttle.arrivals_ftl_cooldown", 10f, CVar.SERVERONLY);
/// <summary>
/// The maximum <see cref="PhysicsComponent.Mass"/> a grid can have before it becomes unable to FTL.