Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Arrivals Shuttle #1040

Merged
merged 3 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public override void Update(float frameTime)
if (xform.MapUid != arrivalsXform.MapUid)
{
if (arrivals.IsValid())
_shuttles.FTLToDock(uid, shuttle, arrivals);
_shuttles.FTLToDock(uid, shuttle, arrivals, _cfgManager.GetCVar(CCVars.ArrivalsStartupTime), _cfgManager.GetCVar(CCVars.ArrivalsHyperspaceTime), "DockArrivals");

comp.NextArrivalsTime = _timing.CurTime + TimeSpan.FromSeconds(tripTime);
}
Expand All @@ -435,7 +435,7 @@ public override void Update(float frameTime)
var targetGrid = _station.GetLargestGrid(data);

if (targetGrid != null)
_shuttles.FTLToDock(uid, shuttle, targetGrid.Value);
_shuttles.FTLToDock(uid, shuttle, targetGrid.Value, _cfgManager.GetCVar(CCVars.ArrivalsStartupTime), _cfgManager.GetCVar(CCVars.ArrivalsHyperspaceTime), "DockArrivals");

// The ArrivalsCooldown includes the trip there, so we only need to add the time taken for
// the trip back.
Expand Down
12 changes: 12 additions & 0 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,18 @@ public static readonly CVarDef<int>
public static readonly CVarDef<float> ArrivalsCooldown =
CVarDef.Create("shuttle.arrivals_cooldown", 50f, CVar.SERVERONLY);

/// <summary>
/// Time it takes the shuttle to spin up it's hyper drive and jump
/// </summary>
public static readonly CVarDef<float> ArrivalsStartupTime=
CVarDef.Create("shuttle.arrivals_startup_time", 5.5f, CVar.SERVERONLY);

/// <summary>
/// Time spent in hyperspace
/// </summary>
public static readonly CVarDef<float> ArrivalsHyperspaceTime =
CVarDef.Create("shuttle.arrivals_hyperspace_time", 20f, CVar.SERVERONLY);

/// <summary>
/// Are players allowed to return on the arrivals shuttle.
/// </summary>
Expand Down
Loading