Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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;
     }
 }