예제 #1
0
 public static void Postfix(JoyGiver __instance, Pawn pawn, ref float __result)
 {
     if (__instance.def == DefDatabase <JoyGiverDef> .GetNamed("WatchTelevision") && pawn.HasTrait(VTEDefOf.VTE_CouchPotato))
     {
         __result *= 2f;
     }
 }
예제 #2
0
        private static readonly JoyGiver vanillaPray; // vanilla fallback

        // I THINK I will need a separate JoyGiver for the vanilla Pray - it's
        //   possible I won't, but this is safe enought to do.  I hope.
        static JoyGiver_Spiritual_Simple()
        {
            if (Defs.LWM_PrayerSpot == null)
            {
                Log.Error("Failed to load PrayerSpot Def");
            }

            vanillaPray     = (JoyGiver)Activator.CreateInstance(typeof(JoyGiver_InPrivateRoom));
            vanillaPray.def = DefDatabase <JoyGiverDef> .GetNamed("Pray");
        }