示例#1
0
 static bool Prefix(Vector3 clickPos, Pawn pawn, out List <FloatMenuOption> __result)
 {
     __result = new List <FloatMenuOption>();
     if (PatchStorageUtil.Get <IHideRightClickMenu>(pawn.Map, clickPos.ToIntVec3())?.HideRightClickMenus ?? false)
     {
         return(false);
     }
     return(true);
 }
示例#2
0
        static bool Prefix(ref QualityCategory __result, Pawn pawn, SkillDef relevantSkill)
        {
            ISetQualityDirectly isqd = PatchStorageUtil.Get <ISetQualityDirectly>(pawn.Map, pawn.Position);

            if (isqd != null)
            {
                __result = isqd.GetQuality(relevantSkill);
                return(false);
            }
            return(true);
        }
 static bool Prefix(Thing __instance, SectionLayer layer)
 {
     if (__instance.def.category == ThingCategory.Item)
     {
         if (PatchStorageUtil.GetWithTickCache <IHideItem>(__instance.Map, __instance.Position)?.HideItems ?? false)
         {
             return(false);
         }
     }
     return(true);
 }
 static bool Prefix(Building_Storage __instance, Thing t, out bool __result)
 {
     __result = false;
     if (PatchStorageUtil.Get <IForbidPawnInputItem>(__instance.Map, __instance.Position)?.ForbidPawnInput ?? false)
     {
         if (!__instance.slotGroup.HeldThings.Contains(t))
         {
             return(false);
         }
     }
     return(true);
 }
 static bool Prefix(Thing t, Pawn pawn, out bool __result)
 {
     __result = true;
     if (t != null && t.Map != null && t.def.category == ThingCategory.Item)
     {
         if (PatchStorageUtil.Get <IForbidPawnOutputItem>(t.Map, t.Position)?.ForbidPawnOutput ?? false)
         {
             return(false);
         }
     }
     return(true);
 }