//public bool ThingsAvailableAnywhere(ThingDefCountClass need, Pawn pawn) public static bool OrInInventory(ItemAvailability item, ThingDefCountClass need, Pawn pawn) { if (item.ThingsAvailableAnywhere(need, pawn)) { return(true); } return(pawn.Map.GetComponent <ItemInvAvailabilityMapComp>().ThingsAvailableInventories(need.thingDef, pawn)); }
//public bool ThingsAvailableAnywhere(ThingDefCountClass need, Pawn pawn) public static bool OrInInventory(ItemAvailability item, ThingDefCountClass need, Pawn pawn) { if (item.ThingsAvailableAnywhere(need, pawn)) { return(true); } return (pawn.carryTracker.GetDirectlyHeldThings().Contains(need.thingDef) || pawn.Map.GetComponent <ItemInvAvailabilityMapComp>().ThingsAvailableInventories(need.thingDef, pawn.Faction)); }