Skip to content

Commit

Permalink
Merge pull request #813 from zymex22/salReserveNullResistance
Browse files Browse the repository at this point in the history
SAL Release reduced the impact of a null map
  • Loading branch information
Sn1p3rr3c0n authored Oct 20, 2024
2 parents d25320f + b715b13 commit cf0d04b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Source/ProjectRimFactory/AutoMachineTool/SAL_TargetBench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ public void generalRelease(Building tb)
/*Log.Message("pre release");
debugListReservations();
*/
// SOS2 Can apparently make the map null ....
if (map is null)
{
Log.Warning("PRF SAL_TargetBench:generalRelease NULL map");
if (mySAL is null)
{
Log.Error("PRF SAL is NULL, Can't release Reservation. Skipping");
return;
}
map = mySAL.Map;
if (map is null)
{
Log.Error("PRF SAL map is also NULL, Can't release Reservation. Skipping");
return;
}
}
map.reservationManager.Release(tb, PRFGameComponent.PRF_StaticPawn, PRFGameComponent.PRF_StaticJob);
//Log.Message("generalRelease for " + (Position + Rotation.FacingCell) );
//Log.Message("post release");
Expand Down

0 comments on commit cf0d04b

Please sign in to comment.