From: Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com> Date: Sun, 19 Feb 2023 01:00:38 +0000 (-0600) Subject: Fix adjusting slots on infinite slot jobs (#14154) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=354d72270a033da0bbba4c607a432b04f99241ac;p=space-station-14.git Fix adjusting slots on infinite slot jobs (#14154) * fix TrySetJobSlot() on infinite slot jobs * use null coalescing operator * remove ! --- diff --git a/Content.Server/Station/Systems/StationJobsSystem.cs b/Content.Server/Station/Systems/StationJobsSystem.cs index f8dac0688c..268d50739d 100644 --- a/Content.Server/Station/Systems/StationJobsSystem.cs +++ b/Content.Server/Station/Systems/StationJobsSystem.cs @@ -224,7 +224,7 @@ public sealed partial class StationJobsSystem : EntitySystem UpdateJobsAvailable(); return true; case true: - stationJobs.TotalJobs += amount - (int)jobList[jobPrototypeId]!.Value; + stationJobs.TotalJobs += amount - (int) (jobList[jobPrototypeId] ?? 0); jobList[jobPrototypeId] = (uint)amount; UpdateJobsAvailable();