Skip to content

Commit

Permalink
Merge pull request #251 from Fansana/fix-arrivals-shuttle
Browse files Browse the repository at this point in the history
Fix Arrivals Shuttle
  • Loading branch information
Memeji authored Oct 11, 2024
2 parents b161569 + 3d5c47b commit 1b3e47d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,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 @@ -436,7 +436,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

0 comments on commit 1b3e47d

Please sign in to comment.