/* * 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 void TryRemoveMindFlayer() { CompMindFlayer checkIfMindFlayer = AbilityUser.TryGetComp <CompMindFlayer>(); if (checkIfMindFlayer != null) { Tools.Warn(AbilityUser.LabelShort + " removing MindFlayer ability", myDebug); RemovePawnAbility(MindFlayerDefOf.LTF_Slug_MindFlayer); } }
public bool IsFlayer(Pawn pawn) { CompMindFlayer compMindFlayer = pawn.TryGetComp <CompMindFlayer>(); if (compMindFlayer != null) { return(compMindFlayer.IsMindFlayer); } return(false); }
public static void FlayerReset(Pawn pawn, bool debug = false) { CompMindFlayer compMindFlayer = pawn.TryGetComp <CompMindFlayer>(); if (compMindFlayer != null) { Tools.Warn("Reseting Flayer", debug); compMindFlayer.RemovePawnAbility(MindFlayerDefOf.LTF_Slug_MindFlayer); compMindFlayer.MindFlayer = null; } else { Tools.Warn("cannot find Flayer ability", debug); } }