public override void SetupAttributes()
        {
            base.SetupAttributes();
            rewindStateType = ContentAddition.AddEntityState <RewindState>(out _);
            R2API.Networking.NetworkingAPI.RegisterMessageType <MsgRewind>();

            blacklistedSkills = new[] {
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CallSupplyDropHealing"),
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CallSupplyDropHacking"),
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CallSupplyDropShocking"),
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CallSupplyDropEquipmentRestock"),
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CaptainSkillUsedUp"),
                LegacyResourcesAPI.Load <RoR2.Skills.SkillDef>("SkillDefs/CaptainBody/CaptainCancelDummy")
            };

            rewindBuff            = ScriptableObject.CreateInstance <BuffDef>();
            rewindBuff.buffColor  = Color.white;
            rewindBuff.canStack   = true;
            rewindBuff.isDebuff   = false;
            rewindBuff.isCooldown = true;
            rewindBuff.name       = "TKSATRewind";
            rewindBuff.iconSprite = TinkersSatchelPlugin.resources.LoadAsset <Sprite>("Assets/TinkersSatchel/Textures/MiscIcons/rewindBuffIcon.png");
            ContentAddition.AddBuffDef(rewindBuff);

            if (Compat_ClassicItems.enabled)
            {
                LanguageAPI.Add("TKSAT_REWIND_CI_EMBRYO_APPEND", "\n<style=cStack>Beating Embryo: 50% chance to not consume stock.</style>");
                Compat_ClassicItems.RegisterEmbryoHook(equipmentDef, "TKSAT_REWIND_CI_EMBRYO_APPEND", () => "TKSAT.CausalCamera");
            }
        }
Exemple #2
0
        public override void SetupAttributes()
        {
            base.SetupAttributes();

            var nSpriteD = TinkersSatchelPlugin.resources.LoadAsset <Sprite>("Assets/TinkersSatchel/Textures/packBoxArrowDown.png");
            var nSpriteU = TinkersSatchelPlugin.resources.LoadAsset <Sprite>("Assets/TinkersSatchel/Textures/packBoxArrowUp.png");

            var recy = LegacyResourcesAPI.Load <GameObject>("Prefabs/RecyclerIndicator").InstantiateClone("temporary setup prefab", false);

            foreach (var spr in recy.GetComponentsInChildren <SpriteRenderer>())
            {
                if (spr.sprite.name != "texRecyclerArrow")
                {
                    continue;
                }
                spr.sprite = nSpriteD;
            }
            placeIndicatorPrefab = recy.InstantiateClone("TkSatPackBoxPlaceIndicator", false);
            GameObject.Destroy(recy);

            recy = LegacyResourcesAPI.Load <GameObject>("Prefabs/RecyclerIndicator").InstantiateClone("temporary setup prefab", false);
            foreach (var spr in recy.GetComponentsInChildren <SpriteRenderer>())
            {
                if (spr.sprite.name != "texRecyclerArrow")
                {
                    continue;
                }
                spr.sprite = nSpriteU;
            }
            packIndicatorPrefab = recy.InstantiateClone("TkSatPackBoxPackIndicator", false);
            GameObject.Destroy(recy);

            recy = LegacyResourcesAPI.Load <GameObject>("Prefabs/RecyclerBadIndicator").InstantiateClone("temporary setup prefab", false);
            foreach (var spr in recy.GetComponentsInChildren <SpriteRenderer>())
            {
                if (spr.sprite.name != "texRecyclerArrow")
                {
                    continue;
                }
                spr.sprite = nSpriteD;
            }
            placeIndicatorBadPrefab = recy.InstantiateClone("TkSatPackBoxPlaceBadIndicator", false);
            GameObject.Destroy(recy);

            R2API.Networking.NetworkingAPI.RegisterMessageType <MsgPackboxPack>();
            R2API.Networking.NetworkingAPI.RegisterMessageType <MsgPackboxPlace>();

            if (Compat_ClassicItems.enabled)
            {
                LanguageAPI.Add("TKSAT_PACKBOX_CI_EMBRYO_APPEND", "\n<style=cStack>Beating Embryo: 50% chance to not consume stock on place.</style>");
                Compat_ClassicItems.RegisterEmbryoHook(equipmentDef, "TKSAT_PACKBOX_CI_EMBRYO_APPEND", () => "TKSAT.CardboardBox");
            }
        }
        public override void SetupAttributes()
        {
            base.SetupAttributes();

            droneMasterPrefabNames.UnionWith(masterNamesConfig.Split(',')
                                             .Select(x => x.Trim()));

            if (Compat_ClassicItems.enabled)
            {
                LanguageAPI.Add("TKSAT_REVIVEONCE_CI_EMBRYO_APPEND", "\n<style=cStack>Beating Embryo: Activates twice simultaneously.</style>");
                Compat_ClassicItems.RegisterEmbryoHook(equipmentDef, "TKSAT_REVIVEONCE_CI_EMBRYO_APPEND", () => "TKSAT.CommandTerminal");
            }
        }
Exemple #4
0
        public override void SetupAttributes()
        {
            base.SetupAttributes();

            var achiNameToken = $"ACHIEVEMENT_TKSAT_{name.ToUpper(System.Globalization.CultureInfo.InvariantCulture)}_NAME";
            var achiDescToken = $"ACHIEVEMENT_TKSAT_{name.ToUpper(System.Globalization.CultureInfo.InvariantCulture)}_DESCRIPTION";

            unlockable                 = ScriptableObject.CreateInstance <UnlockableDef>();
            unlockable.cachedName      = $"TkSat_{name}Unlockable";
            unlockable.sortScore       = 200;
            unlockable.achievementIcon = TinkersSatchelPlugin.resources.LoadAsset <Sprite>("Assets/TinkersSatchel/Textures/UnlockIcons/recombobulatorIcon.png");
            ContentAddition.AddUnlockableDef(unlockable);
            LanguageAPI.Add(achiNameToken, "Risktaker");
            LanguageAPI.Add(achiDescToken, "Recycle a rare or boss item.");
            equipmentDef.unlockableDef = unlockable;

            if (Compat_ClassicItems.enabled)
            {
                LanguageAPI.Add("TKSAT_RECOMBOBULATOR_CI_EMBRYO_APPEND", "\n<style=cStack>Beating Embryo: Roll twice and choose the rarer result.</style>");
                Compat_ClassicItems.RegisterEmbryoHook(equipmentDef, "TKSAT_RECOMBOBULATOR_CI_EMBRYO_APPEND", () => "TKSAT.QuantumRecombobulator");
            }
        }
Exemple #5
0
        public override void SetupAttributes()
        {
            base.SetupAttributes();

            var tempPfb = LegacyResourcesAPI.Load <GameObject>("Prefabs/Projectiles/GravSphere").InstantiateClone("temporary setup prefab", false);
            var proj    = tempPfb.GetComponent <RoR2.Projectile.ProjectileSimple>();

            proj.desiredForwardSpeed = 0;
            proj.lifetime            = 0.5f;
            var projCtrl = tempPfb.GetComponent <RoR2.Projectile.ProjectileController>();

            projCtrl.procCoefficient = 0;
            var dmg = proj.GetComponent <RoR2.Projectile.ProjectileDamage>();

            dmg.damage  = 0f;
            dmg.enabled = false;
            var force = tempPfb.GetComponent <RadialForce>();

            force.enabled = false;

            var sph = tempPfb.transform.Find("Sphere");

            sph.gameObject.SetActive(false);

            var sps      = tempPfb.transform.Find("Sparks");
            var spsPart  = sps.GetComponent <ParticleSystem>();
            var spsShape = spsPart.shape;

            spsShape.radius = 30f;

            blackHolePrefab = tempPfb.InstantiateClone("LodestoneProcPrefab", true);
            UnityEngine.Object.Destroy(tempPfb);

            ContentAddition.AddProjectile(blackHolePrefab);

            validObjectNamesRB.UnionWith(new[] {
                "HealPack(Clone)",
                "StickyBomb(Clone)",
                "TkSatPixieMovePack(Clone)",
                "TkSatPixieAttackPack(Clone)",
                "TkSatPixieDamagePack(Clone)",
                "TkDatPixieArmorPack(Clone)",
                "AmmoPack(Clone)",
                "BonusMoneyPack(Clone)",
                "ShurikenProjectile(Clone)",
                "FireMeatBall(Clone)",
                "DeathProjectile(Clone)",
                "BeamSphere(Clone)",
                "GravSphere(Clone)",
                "Sawmerang(Clone)",
                "LunarSunProjectile(Clone)"
            });
            validObjectNamesNoRB.UnionWith(new[] { //may have RB, but should teleport anyways
                "DeskplantWard(Clone)",
                "CrippleWard(Clone)",
                "WarbannerWard(Clone)",
                "DamageZoneWard(Clone)"
            });

            var achiNameToken = $"ACHIEVEMENT_TKSAT_{name.ToUpper(System.Globalization.CultureInfo.InvariantCulture)}_NAME";
            var achiDescToken = $"ACHIEVEMENT_TKSAT_{name.ToUpper(System.Globalization.CultureInfo.InvariantCulture)}_DESCRIPTION";

            unlockable                 = ScriptableObject.CreateInstance <UnlockableDef>();
            unlockable.cachedName      = $"TkSat_{name}Unlockable";
            unlockable.sortScore       = 200;
            unlockable.achievementIcon = TinkersSatchelPlugin.resources.LoadAsset <Sprite>("Assets/TinkersSatchel/Textures/UnlockIcons/lodestoneIcon.png");
            ContentAddition.AddUnlockableDef(unlockable);
            LanguageAPI.Add(achiNameToken, "Drive Me Closer");
            LanguageAPI.Add(achiDescToken, "Item Set: Close-range. Have 6 or more (of 15) at once.");
            equipmentDef.unlockableDef = unlockable;

            if (Compat_ClassicItems.enabled)
            {
                LanguageAPI.Add("TKSAT_LODESTONE_CI_EMBRYO_APPEND", "\n<style=cStack>Beating Embryo: Double range and damage.</style>");
                Compat_ClassicItems.RegisterEmbryoHook(equipmentDef, "TKSAT_LODESTONE_CI_EMBRYO_APPEND", () => "TKSAT.Lodestone");
            }
        }