diff --git a/ReallifeGamemode.Server/Job/JobBase.cs b/ReallifeGamemode.Server/Job/JobBase.cs index e10a76ed..7b4488d3 100644 --- a/ReallifeGamemode.Server/Job/JobBase.cs +++ b/ReallifeGamemode.Server/Job/JobBase.cs @@ -28,6 +28,8 @@ namespace ReallifeGamemode.Server.Job public abstract bool NeedVehicleToStart { get; } + public virtual bool Deactivated => false; + public void StartJob(Player player) { if (_inJob.Contains(player)) return; diff --git a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs index 4ccfa110..0b4f9b12 100644 --- a/ReallifeGamemode.Server/Job/TaxiDriverJob.cs +++ b/ReallifeGamemode.Server/Job/TaxiDriverJob.cs @@ -25,6 +25,8 @@ namespace ReallifeGamemode.Server.Job public override bool NeedVehicleToStart => true; + public override bool Deactivated => true; + private static TaxiDriverJob _Instance; public TaxiDriverJob() diff --git a/ReallifeGamemode.Server/Managers/JobManager.cs b/ReallifeGamemode.Server/Managers/JobManager.cs index 7360b6dc..ee82abd5 100644 --- a/ReallifeGamemode.Server/Managers/JobManager.cs +++ b/ReallifeGamemode.Server/Managers/JobManager.cs @@ -34,6 +34,12 @@ namespace ReallifeGamemode.Server.Managers { throw new InvalidOperationException($"Double Job ID found: {instance.Id} | {instance.Name}"); } + + if (instance.Deactivated) + { + NAPI.Util.ConsoleOutput("Job {0} is deactivated", instance.Name); + continue; + } _jobs.Add(instance); NAPI.Util.ConsoleOutput($"Loading job {instance.Name}"); }