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();
|
||||
return true;
|
||||
case true:
|
||||
stationJobs.TotalJobs += amount - (int)jobList[jobPrototypeId]!.Value;
|
||||
stationJobs.TotalJobs += amount - (int) (jobList[jobPrototypeId] ?? 0);
|
||||
|
||||
jobList[jobPrototypeId] = (uint)amount;
|
||||
UpdateJobsAvailable();
|
||||
|
||||
Reference in New Issue
Block a user