// Token: 0x0600004F RID: 79 RVA: 0x00004428 File Offset: 0x00002628
        protected override void DoListingItems()
        {
            base.DoListingItems();
            if (Current.ProgramState != ProgramState.Playing)
            {
                return;
            }

            var map = Find.CurrentMap;

            if (map == null)
            {
                return;
            }

            DoGap();
            DoLabel("Tools - Warframe");
            DebugToolMap("Apply: Warframe 30Level", GiveLevel, false);
            DebugToolMap("Apply: Max Sp", delegate
            {
                foreach (var thing in Find.CurrentMap.thingGrid.ThingsAt(UI.MouseCell()))
                {
                    if (thing is not Pawn pawn || !pawn.IsWarframe())
                    {
                        continue;
                    }

                    var wb = WarframeStaticMethods.GetBelt(pawn);
                    wb.SP += 9999;
                }
            }, false);
Esempio n. 2
0
        public override IEnumerable <Gizmo> GetWornGizmos()
        {
            if (Find.Selector.SingleSelectedThing != Wearer)
            {
                yield break;
            }


            var pawn = Wearer;

            if (pawn == null || !pawn.IsWarframe())
            {
                yield break;
            }

            var replace = pawn.kindDef.defName.Replace("Warframe_", "");


            var ck1 = WarframeStaticMethods.GetSkillCommand(replace, 1);

            ck1.self        = Wearer;
            ck1.defaultDesc = (replace + "Skill1.desc").Translate() + "\n" + "SP:" +
                              WarframeStaticMethods.GetArmor(Wearer).TryGetComp <CompWarframeSkill>().skill1mana;
            ck1.disabled =
                (!Wearer.Drafted || cooldownTime1 > 0 || Wearer.stances.stunner.Stunned ||
                 WarframeStaticMethods.GetBelt(Wearer).SP < getSkillComp().skill1mana) && tillSkillOpen != 1;


            yield return(ck1);

            var ck2 = WarframeStaticMethods.GetSkillCommand(replace, 2);

            ck2.self        = Wearer;
            ck2.defaultDesc = (replace + "Skill2.desc").Translate() + "\n" + "SP:" +
                              WarframeStaticMethods.GetArmor(Wearer).TryGetComp <CompWarframeSkill>().skill2mana;
            ck2.disabled =
                (!Wearer.Drafted || cooldownTime2 > 0 || Wearer.stances.stunner.Stunned ||
                 WarframeStaticMethods.GetBelt(Wearer).SP < getSkillComp().skill2mana) && tillSkillOpen != 2;


            yield return(ck2);

            var ck3 = WarframeStaticMethods.GetSkillCommand(replace, 3);

            ck3.self        = Wearer;
            ck3.defaultDesc = (replace + "Skill3.desc").Translate() + "\n" + "SP:" +
                              WarframeStaticMethods.GetArmor(Wearer).TryGetComp <CompWarframeSkill>().skill3mana;
            ck3.disabled =
                (!Wearer.Drafted || cooldownTime3 > 0 || Wearer.stances.stunner.Stunned ||
                 WarframeStaticMethods.GetBelt(Wearer).SP < getSkillComp().skill3mana) && tillSkillOpen != 3;


            yield return(ck3);

            var ck4 = WarframeStaticMethods.GetSkillCommand(replace, 4);

            ck4.self        = Wearer;
            ck4.defaultDesc = (replace + "Skill4.desc").Translate() + "\n" + "SP:" +
                              WarframeStaticMethods.GetArmor(Wearer).TryGetComp <CompWarframeSkill>().skill4mana;
            ck4.disabled =
                (!Wearer.Drafted || cooldownTime4 > 0 || Wearer.stances.stunner.Stunned ||
                 WarframeStaticMethods.GetBelt(Wearer).SP < getSkillComp().skill4mana) && tillSkillOpen != 4;


            yield return(ck4);
        }