Beispiel #1
0
 static void Postfix(ref GameInitData __instance)
 {
     foreach (Pawn startingPawn in __instance.startingAndOptionalPawns)
     {
         MoreThanCapableMod.ResetHatedWorkTypes(startingPawn);
     }
 }
Beispiel #2
0
        static void Postfix(WorkGiver giver, Pawn ___pawn, bool __result)
        {
            if (!__result)
            {
                return;
            }

            var workType = giver.def.workType;

            if (!MoreThanCapableMod.IsBadWork(___pawn, workType))
            {
                return;
            }

            var badWork = ___pawn.RaceProps.hediffGiverSets
                          .SelectMany(s => s.hediffGivers)
                          .OfType <HediffGiver_AssignedToBadWork>()
                          .FirstOrDefault(bw => bw.workType == workType);

            if (badWork == null)
            {
                return;
            }

            AdjustSeverity(___pawn, badWork.hediff, 0.025f, badWork.maxSeverity / 2f);
        }
Beispiel #3
0
 static void RedIfBadWork(Rect position, Pawn p, WorkTypeDef workDef, ref Texture workBoxBGTexAwful, ref Texture workBoxBGTexBad)
 {
     if (MoreThanCapableMod.IsBadWork(p, workDef))
     {
         workBoxBGTexAwful = Resources.workBoxBGTexDespised;
         workBoxBGTexBad   = Resources.workBoxBGTexDespised;
     }
 }
 public override AlertReport GetReport()
 {
     foreach (Pawn current in PawnsFinder.AllMaps_FreeColonistsSpawned)
     {
         if (MoreThanCapableMod.HasBadWork(current))
         {
             return(current);
         }
     }
     return(false);
 }
 public override AlertReport GetReport()
 {
     foreach (Pawn current in PawnsFinder.AllMaps_FreeColonistsSpawned)
     {
         if (current.WorkTypeIsDisabled(WorkTypeDefOf.Hunting) &&
             ((current.equipment.Primary != null) && MoreThanCapableMod.HasWeapon(current)))
         {
             return(current);
         }
     }
     return(false);
 }
Beispiel #6
0
 static void Postfix(Pawn ___pawn)
 {
     MoreThanCapableMod.ResetHatedWorkTypes(___pawn);
 }
Beispiel #7
0
 public static bool Prefix(WorkTags w, Pawn __instance)
 {
     return(!__instance.NonHumanlikeOrWildMan() && w == WorkTags.Violent && !MoreThanCapableMod.HasWeapon(__instance));
 }
 public override bool Evaluate(Pawn pawn)
 {
     return(MoreThanCapableMod.IsBadWorkActive(pawn, workType));
 }
 public override bool Evaluate(Pawn pawn)
 {
     return(pawn.WorkTypeIsDisabled(WorkTypeDefOf.Hunting) && MoreThanCapableMod.HasWeapon(pawn));
 }