yupiiii (#391)
This commit is contained in:
@@ -29,6 +29,11 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
/// </summary>
|
||||
public float ArrivalTime { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// If enabled then spawns players on an expedition ship.
|
||||
/// </summary>
|
||||
public bool Enabled { get; private set; }
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -38,12 +43,17 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
SubscribeLocalEvent<CP14StationExpeditionTargetComponent, FTLCompletedEvent>(OnExpeditionShipLanded);
|
||||
|
||||
ArrivalTime = _cfgManager.GetCVar(CCVars.CP14ExpeditionArrivalTime);
|
||||
_cfgManager.OnValueChanged(CCVars.CP14ExpeditionArrivalTime, time => ArrivalTime = time, true);
|
||||
}
|
||||
Enabled = _cfgManager.GetCVar(CCVars.CP14ExpeditionShip);
|
||||
|
||||
_cfgManager.OnValueChanged(CCVars.CP14ExpeditionArrivalTime, time => ArrivalTime = time, true);
|
||||
_cfgManager.OnValueChanged(CCVars.CP14ExpeditionShip, value => Enabled = value, true);
|
||||
}
|
||||
|
||||
private void OnPostInitSetupExpeditionShip(Entity<CP14StationExpeditionTargetComponent> station, ref StationPostInitEvent args)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
if (!Deleted(station.Comp.Shuttle))
|
||||
return;
|
||||
|
||||
@@ -97,6 +107,9 @@ public sealed class CP14ExpeditionSystem : EntitySystem
|
||||
|
||||
public void HandlePlayerSpawning(PlayerSpawningEvent ev)
|
||||
{
|
||||
if (!Enabled)
|
||||
return;
|
||||
|
||||
if (ev.SpawnResult != null)
|
||||
return;
|
||||
|
||||
|
||||
@@ -11,11 +11,17 @@ namespace Content.Shared.CCVar
|
||||
public sealed class CCVars : CVars
|
||||
{
|
||||
#region CP14
|
||||
|
||||
/// <summary>
|
||||
/// how long does it take to fly an expedition ship to an expedition point?
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> CP14ExpeditionArrivalTime =
|
||||
CVarDef.Create("cp14.arrival_time", 180f, CVar.SERVERONLY);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// is the expedition ship's system enabled?
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> CP14ExpeditionShip =
|
||||
CVarDef.Create("cp14.arrivals_ship", true, CVar.SERVERONLY);
|
||||
#endregion
|
||||
/*
|
||||
* Server
|
||||
@@ -1473,7 +1479,7 @@ namespace Content.Shared.CCVar
|
||||
/// Whether the arrivals shuttle is enabled.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> ArrivalsShuttles =
|
||||
CVarDef.Create("shuttle.arrivals", true, CVar.SERVERONLY);
|
||||
CVarDef.Create("shuttle.arrivals", false, CVar.SERVERONLY); //CP14 arrivals disabled
|
||||
|
||||
/// <summary>
|
||||
/// The map to use for the arrivals station.
|
||||
@@ -1600,7 +1606,7 @@ namespace Content.Shared.CCVar
|
||||
/// Whether the emergency shuttle is enabled or should the round just end.
|
||||
/// </summary>
|
||||
public static readonly CVarDef<bool> EmergencyShuttleEnabled =
|
||||
CVarDef.Create("shuttle.emergency", true, CVar.SERVERONLY);
|
||||
CVarDef.Create("shuttle.emergency", false, CVar.SERVERONLY); //CP14 Emergency disabled
|
||||
|
||||
/// <summary>
|
||||
/// The percentage of time passed from the initial call to when the shuttle can no longer be recalled.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
[game]
|
||||
[cp14]
|
||||
arrivals_ship = false
|
||||
|
||||
[game]
|
||||
# Straight in-game baby
|
||||
lobbyenabled = false
|
||||
# Dev map for faster loading & convenience
|
||||
|
||||
Reference in New Issue
Block a user