Fix adjusting slots on infinite slot jobs (#14154)
* fix TrySetJobSlot() on infinite slot jobs * use null coalescing operator * remove !
This commit is contained in:
@@ -224,7 +224,7 @@ public sealed partial class StationJobsSystem : EntitySystem
|
|||||||
UpdateJobsAvailable();
|
UpdateJobsAvailable();
|
||||||
return true;
|
return true;
|
||||||
case true:
|
case true:
|
||||||
stationJobs.TotalJobs += amount - (int)jobList[jobPrototypeId]!.Value;
|
stationJobs.TotalJobs += amount - (int) (jobList[jobPrototypeId] ?? 0);
|
||||||
|
|
||||||
jobList[jobPrototypeId] = (uint)amount;
|
jobList[jobPrototypeId] = (uint)amount;
|
||||||
UpdateJobsAvailable();
|
UpdateJobsAvailable();
|
||||||
|
|||||||
Reference in New Issue
Block a user