From 8ef8c6a22357ca7af7f1bbc03944f7959a5961cc Mon Sep 17 00:00:00 2001 From: user Date: Wed, 27 Nov 2024 18:43:40 +0300 Subject: [PATCH] Job giver fix: won't give job to reload torpedo tube of other faction, follow-up fix to correponding change in job driver earlier. --- Source/1.5/Jobs/WorkGiver_LoadTorpedoTube.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/1.5/Jobs/WorkGiver_LoadTorpedoTube.cs b/Source/1.5/Jobs/WorkGiver_LoadTorpedoTube.cs index 4550ef22..a550edd2 100644 --- a/Source/1.5/Jobs/WorkGiver_LoadTorpedoTube.cs +++ b/Source/1.5/Jobs/WorkGiver_LoadTorpedoTube.cs @@ -21,6 +21,10 @@ public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { return false; } + if (pawn == null || building_Tube.Faction != pawn.Faction) + { + return false; + } if (ForbidUtility.IsForbidden(t, pawn) || !ReservationUtility.CanReserveAndReach(pawn, t, (PathEndMode)2, DangerUtility.NormalMaxDanger(pawn), 1, -1, (ReservationLayerDef)null, false)) { return false;