private static bool Prefix(Pawn pawn, ref List <ThingStuffPair> ___allWeaponPairs)
 {
     if (savedAllWeaponPairs == null)
     {
         savedAllWeaponPairs = ___allWeaponPairs.ListFullCopy();
     }
     ___allWeaponPairs = savedAllWeaponPairs.FindAll((ThingStuffPair x) => RaceAddonTools.CheckWeapon(pawn, x.thing));
     return(true);
 }
 private static void Postfix(Pawn pawn, LocalTargetInfo target, ref FloatMenuOption __result)
 {
     if (pawn != null && target.Thing != null)
     {
         var thing = target.Thing;
         if (thing is Apparel apparel && !RaceAddonTools.CheckApparel(pawn, apparel.def) && __result.Label == "ForceWear".Translate(apparel.LabelShort, apparel))
         {
             __result = new FloatMenuOption("CannotWear".Translate(apparel.Label, apparel) + " (" + "RaceAddonRestriction_FloatMenu".Translate() + ")", null);
         }
         if (thing.TryGetComp <CompEquippable>() != null && !RaceAddonTools.CheckWeapon(pawn, thing.def) && __result.Label.Contains("Equip".Translate(thing.LabelShort)))
         {
             __result = new FloatMenuOption("CannotEquip".Translate(thing.LabelShort) + " (" + "RaceAddonRestriction_FloatMenu".Translate() + ")", null);
         }
     }
 }
 private static bool Prefix(Pawn p, ref Thing ___draggedItem, ref bool ___droppedDraggedItem)
 {
     ___droppedDraggedItem = false;
     if (___draggedItem.def.IsApparel && !RaceAddonTools.CheckApparel(p, ___draggedItem.def))
     {
         Messages.Message("RaceAddonRestriction_Caravan".Translate(p.LabelShort), p, MessageTypeDefOf.RejectInput, false);
         ___draggedItem = null;
         return(false);
     }
     if (___draggedItem.def.IsWeapon && !RaceAddonTools.CheckWeapon(p, ___draggedItem.def))
     {
         Messages.Message("RaceAddonRestriction_Caravan".Translate(p.LabelShort), p, MessageTypeDefOf.RejectInput, false);
         ___draggedItem = null;
         return(false);
     }
     return(true);
 }