//public void ReleaseClaimedBy(Pawn claimant, Job job) public static void Prefix(Pawn claimant, Job job) { if (job.def == JobDefOf.HaulToCell) { ExpectingComp.Remove(q => q.claimant == claimant && q.job == job); } }
//public void Release(LocalTargetInfo target, Pawn claimant, Job job) public static void Prefix(LocalTargetInfo target, Pawn claimant, Job job) { if (claimant.IsFreeColonist && target.Cell != LocalTargetInfo.Invalid && claimant.Map.thingGrid.ThingsAt(target.Cell).FirstOrDefault(t => t.GetType() == ExtendedStoragePatches.typeBuilding_ExtendedStorage) is Thing thing && job.def == JobDefOf.HaulToCell) { ExpectingComp.Remove(q => q.claimant == claimant && q.job == job && q.claimed == thing); } }
//public void Release(LocalTargetInfo target, Pawn claimant, Job job) public static void Prefix(LocalTargetInfo target, Pawn claimant, Job job) { if (claimant.IsFreeColonist && target.Thing is IConstructible c && !(c is Blueprint_Install) && job.def == JobDefOf.HaulToContainer) { ExpectingComp.Remove(q => q.claimant == claimant && q.job == job && q.claimed == target.Thing); } }
//public void ReleaseAllClaimedBy(Pawn claimant) public static void Prefix(Pawn claimant) { ExpectingComp.Remove(q => q.claimant == claimant); }
public static void Prefix(Thing __instance) { ExpectingComp.Remove(q => q.claimed == __instance); }