/*
         * public bool HasAbilitiesToReset
         * {
         *  get
         *  {
         *      return !Props.abilitiesToReset.NullOrEmpty();
         *  }
         * }
         */
        public void ResetAbilities(Pawn pawn)
        {
            //foreach(AbilityUser.AbilityDef abilityDef in Props.abilitiesToReset){};
            Tools.Warn("Entering HeDiffComp_ResetAbilities.ResetAbilities", myDebug);
            CompMindFlayer compMindFlayer = pawn.TryGetComp <CompMindFlayer>();

            if (compMindFlayer != null)
            {
                Tools.Warn("Reseting " + pLabel + ".compMindFlayer", myDebug);
                compMindFlayer.MindFlayer = null;
                didIt = true;
            }
            else
            {
                Tools.Warn("cannot find" + pLabel + " MindFondler ability", myDebug);
            }

            CompMindFondler compMindFondler = pawn.TryGetComp <CompMindFondler>();

            if (compMindFondler != null)
            {
                Tools.Warn("Reseting " + pLabel + " MindFondler", myDebug);
                compMindFondler.MindFondler = null;
                didIt = true;
            }
            else
            {
                Tools.Warn("cannot find " + pLabel + " MindFondler ability", myDebug);
            }
        }
        public bool IsFondler(Pawn pawn)
        {
            CompMindFondler compMindFondler = pawn.TryGetComp <CompMindFondler>();

            if (compMindFondler != null)
            {
                return(compMindFondler.IsMindFondler);
            }

            return(false);
        }
Exemple #3
0
        public static void FondlerReset(Pawn pawn, bool debug = false)
        {
            CompMindFondler compMindFondler = pawn.TryGetComp <CompMindFondler>();

            if (compMindFondler != null)
            {
                Tools.Warn("Reseting Fondler", debug);

                compMindFondler.RemovePawnAbility(MindFondlerDefOf.LTF_Slug_MindFondler);
                compMindFondler.MindFondler = null;
            }
            else
            {
                Tools.Warn("cannot find MindFondler ability", debug);
            }
        }
 public override void PostInitialize()
 {
     base.PostInitialize();
     if (MindFondler == true)
     {
         Tools.Warn(AbilityUser.LabelShort + " adding MindFondler ability", myDebug);
         AddPawnAbility(MindFondlerDefOf.LTF_Slug_MindFondler);
     }
     else
     {
         CompMindFondler checkIfMindFondler = AbilityUser.TryGetComp <CompMindFondler>();
         if (checkIfMindFondler != null)
         {
             Tools.Warn(AbilityUser.LabelShort + " removing MindFondler ability", myDebug);
             RemovePawnAbility(MindFondlerDefOf.LTF_Slug_MindFondler);
         }
     }
 }