コード例 #1
0
        // Token: 0x0600008B RID: 139 RVA: 0x00005B8C File Offset: 0x00003D8C
        public static void Init()
        {
            string     name         = "Robohead";
            string     resourcePath = "CakeMod/Resources/Robohead";
            GameObject gameObject   = new GameObject(name);
            Robohead   catSnack     = gameObject.AddComponent <Robohead>();

            ItemBuilder.AddSpriteToObject(name, resourcePath, gameObject);
            string shortDesc = "BEEP BOOP, I AM A ROBOT";
            string longDesc  = "Electricity sparks from the machine. It seems to be running Winbows.\n\n...Beep. Boop.";

            catSnack.SetupItem(shortDesc, longDesc, "cak");
            catSnack.quality = PickupObject.ItemQuality.EXCLUDED;
            List <string> mandatoryConsoleIDs = new List <string>
            {
                "cak:robohead",
                "shock_rifle"
            };
        }
コード例 #2
0
        public override void Start()
        {
            try
            {
                ZipFilePath     = this.Metadata.Archive;
                metadata        = this.Metadata.Directory;
                metadataARCHIVE = this.Metadata.Archive;
                FilePath        = this.Metadata.Directory + "/rooms";

                path = "CakeMod.Resources.TurtSprites.";

                assembly = Assembly.GetExecutingAssembly();
                list     = new List <Texture2D>();
                foreach (var item in assembly.GetManifestResourceNames())
                {
                    if (!item.EndsWith(".png"))
                    {
                        continue;
                    }

                    if (item.StartsWith(path))
                    {
                        list.Add(ResourceExtractor.GetTextureFromResource(item));
                    }
                }

                ETGModConsole.Log(list.Count.ToString());
                cosmoSpriteSheet = ResourceExtractor.GetTextureFromResource(cosmoSpriteSheetName);
                FloorSheet       = ResourceExtractor.GetTextureFromResource(StringFloorSheet);


                FakePrefabHooks.Init();
                ItemBuilder.Init();
                EnemyTools.Init();
                EnemyBuilder.Init();
                Hooks.Init();
                BossBuilder.Init();
                SpecialBlankModificationItem.InitHooks();
                ItemsMod.Strings = new AdvancedStringDB();
                EasyGoopDefinitions.DefineDefaultGoops();

                Cake.Init();
                CircularKing.Init();
                KinglyBullets.Init();
                LockOfTheJammed.Init();
                CakeBullets.Init();
                BleakBullets.Init();
                Jankan.Init();
                Robohead.Init();
                HatShells.Init();
                DumbBullets.Init();
                ControlledBullets.Init();
                David.Init();
                HeadCrab.Init();
                GunJester.Init();
                Waffle.Init();
                BladeBullets.Init();
                TheFool.Init();
                BowlerHat.Init();
                Depresso.Init();
                FleshCake.Init();
                BountyPoster.Init();
                OneReverse.Init();
                StrangeEffigy.Init();
                ConcealedTreasure.Init();
                Winpetster.Init();
                RookGuonStone.Init();
                IceOgreHead.Init();
                MysteriousIdol.Init();
                GlowingWomb.Init();
                Honkhorn.Init();
                HeartyLocket.Init();
                FunnyHat.Init();
                Radio.Init();
                ChocolateBar.Init();
                CluwneBullets.Init();
                BowlerRainbowDust.Init();
                StrangeArrow.Init();
                testingitem.Init();
                TestItem.Init();
                glitchammolet.Init();
                testbarrel.Init();
                BlobHeart.Init();
                WebAmmolet.Init();
                StarNinja.Init();
                PoisonBomb.Init();
                RoboticHeart.Init();
                ApprenticeScroll.Init();
                amogus.Init();
                ArmouredKey.Init();
                BabyGoodChamber.Init();
                SpringlockSuit.Init();
                BirthdayCandle.Init();
                DeadlyInsanity.Init();
                Keysing.Init();
                BabyGoodLovebulon.Init();
                FreddyPizza.Init();
                CultistHelm.Init();
                Lime.Init();
                CurseItemTest.Init();
                GoopCurse.Init();
                Jammolet.Init();
                HoloProjection.Init();
                Clumsy.Init();
                MiniShroom.Init();
                DrawnChamber.Init();
                BabyGoodMagnum.Init();
                SewingKit.Init();
                PocketRedChest.Init();
                PocketBlackChest.Init();
                PocketGreenChest.Init();
                PocketBlueChest.Init();
                PocketBrownChest.Init();
                ChestFriend.Init();
                PricklyPear.Init();
                StrangePotion.Init();
                DevilContract.Init();
                Hellfire.Init();
                BloomingHeart.Init();
                RatRound.Init();
                FrozenFrog.Init();
                BabyGoodApiary.Init();
                ImmortalSmoke.Init();
                UFO.Init();
                VoodooHeart.Init();
                GunslingKingRequest.Init();
                HappyLad.Init();
                Fez.Init();
                NecromancerBook.Init();
                PlatinumJunk.Init();
                ToxicArmour.Init();
                Notebook.Init();
                TestJammedBullets.Init();
                BulletKinBullets.Init();
                LichHat.Init();
                Skelebot.Init();
                CosmoStatue.CosmoBuildPrefab();
                LichHat2.Init();
                PickleJar.Init();
                Jawbreaker.Init();
                Rift.Init();
                SaveDisk.Init();
                d20.Init();
                ThirdEye.Init();
                GhostlyBody.Init();
                Butter.Init();
                Cookie.Init();
                JunkChestHandler.TheHooks();
                CarpenterHandbook.Init();
                Ipecac.Init();
                Taurus.Init();
                LifeLemon.Init();
                ArmourGuonStone.Init();
                JammedGunParts.Init();
                CloningVat.Init();
                DevilKey.Init();
                TurtsMelon.Init();
                SpareShell.Init();
                FungalTurtle.Init();
                PBullets.Init();
                OddBullets.Init();
                BloodTether.Init();
                TableTechHolographic.Init();
                NavySealCopypasta.Init();
                RuneChalk.Init();
                //RuneChalk2.Init();

                Synergun.Add();
                JackpotOfGreed.Add();
                NoSpriteFound.Add();
                boneblaster.Add();
                KingGun.Add();
                GungeonGun.Add();
                Glockamole.Add();
                CursedKatana.Add();
                Blox.Add();
                Terragun.Add();
                SpongeGun.Add();
                Horn.Add();
                IHateGuns.Add();
                gamefreeze.Add();
                Bananastaff.Add();
                Blackpistol.Add();
                boomstick.Add();
                SydneySleeper.Add();
                Explodergun.Add();
                Scrapgun.Add();
                tinyshotgun.Add();
                GunResource.Add();
                Scrapper.Add();
                Megaphone.Add();
                MissGun.Add();
                Drawn47.Add();
                PirateShotgunKinGun.Add();
                AnArrowkin.Add();
                Timerase.Add();
                Knife.Add();
                firegun.Add();
                Television.Add();
                //Dupligun.Add();
                //OneShot.Add();
                MoneyDebuffEffect.Init();
                money22DebuffEffect.Init();
                hegemonyDebuffEffect.Init();
                moneydebuff3DebuffEffect.Init();
                DemonBuff.Init();
                CasingBullets.Init();
                UnlockHookInators.Init();
                InkBooklet.Init();
                Doodlelet.Init();
                KoolAidMan.Init();
                ammomimic.Init();
                BulletBishop.Init();
                FlameChamber.Init();
                KillShrine.Init();
                InflamedEye.Init();
                FlameClone.Init();
                Jesterlet.Init();
                Mimekin.Init();
                RoyalJesterlet.Init();
                DrawnKin.Init();
                HoveringGunsAdder.AddHovers();
                CakeGunMods.Init();
                BreachShopTool.AddBaseMetaShopTier(ETGMod.Databases.Items["Cultist Helm"].PickupObjectId, 80, ETGMod.Databases.Items["Rainbowllets"].PickupObjectId, 25, ETGMod.Databases.Items["Reloading Waffle"].PickupObjectId, 75, null);
                GameManager.Instance.SynergyManager.synergies = GameManager.Instance.SynergyManager.synergies.Concat(new AdvancedSynergyEntry[]
                {
                    new SyngergraceThisMod.HatSynergy(),
                    new SyngergraceThisMod.IceSynergy(),
                    new SyngergraceThisMod.RainbowSynergy(),
                    new SyngergraceThisMod.ChaosSynergy(),
                    new SyngergraceThisMod.VoodooSynergy(),
                    //new SyngergraceThisMod.OldSynergy(),
                    new SyngergraceThisMod.LoveSynergy(),
                    new SyngergraceThisMod.SoundSynergy(),
                }).ToArray <AdvancedSynergyEntry>();

                //TinyBullet.Add();
                //OldManBreach.Add();


                //ArtistShrine.Add();
                Chester.Add();
                //LesGo.Add();
                StaticReferences.Init();
                StaticReferences2.Init();
                DungeonHandlerTrueForm.Init();
                ShrineFakePrefabHooks.Init();
                ShrineFactory.Init();
                OldShrineFactory.Init();
                SaveAPIManager.Setup("cak");
                ShrineFactory.PlaceBreachShrines();
                ETGModConsole.Log("King's Items is up and running.");
                SyngergraceThisMod.Synergies();
                SynergyFormInitialiser.AddSynergyForms();
                ModPrefabs.InitCustomPrefabs();

                ModRoomPrefabs.InitCustomRooms();

                FloorNameDungeonFlows.InitDungeonFlows();

                DoodleDungeon.InitCustomDungeon();

                ETGModConsole.Commands.AddUnit("daflow", (args) =>
                {
                    DungeonHandlerTrueForm.debugFlow = !DungeonHandlerTrueForm.debugFlow;
                    string status = DungeonHandlerTrueForm.debugFlow ? "enabled" : "disabled";
                    string color  = DungeonHandlerTrueForm.debugFlow ? "00FF00" : "FF0000";
                    ETGModConsole.Log($"da flow is {status}", false);
                });
                List <string> SpareVFXPaths = new List <string>()
                {
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_001",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_002",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_003",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_004",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_005",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_006",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_007",
                    "CakeMod/Resources/BulletBishop/incense_teleport_poof_008",
                };
                GameObject spareVFX = VFXLibrary.CreateVFX("IncensePoof", SpareVFXPaths, 1, new IntVector2(10, 1), tk2dBaseSprite.Anchor.LowerCenter, true, 0.18f, 0, null);
                EasyVFXDatabase.IncenseVFX = spareVFX;
                List <string> SpareVFXPaths3 = new List <string>()
                {
                    "CakeMod/Resources/FlameChamber/flamepoof_001",
                    "CakeMod/Resources/FlameChamber/flamepoof_002",
                    "CakeMod/Resources/FlameChamber/flamepoof_003",
                    "CakeMod/Resources/FlameChamber/flamepoof_004",
                    "CakeMod/Resources/FlameChamber/flamepoof_005",
                };
                GameObject spareVFX3 = VFXLibrary.CreateVFX("FlamePoof", SpareVFXPaths3, 7, new IntVector2(10, 1), tk2dBaseSprite.Anchor.LowerCenter, true, 0.18f, 0, null);
                EasyVFXDatabase.FlameVFX = spareVFX3;
                List <string> SpareVFXPaths2 = new List <string>()
                {
                    "CakeMod/Resources/BloodyLightning/blood1",
                    "CakeMod/Resources/BloodyLightning/blood2",
                    "CakeMod/Resources/BloodyLightning/blood3",
                    "CakeMod/Resources/BloodyLightning/blood4",
                    "CakeMod/Resources/BloodyLightning/blood5",
                    "CakeMod/Resources/BloodyLightning/blood6",
                    "CakeMod/Resources/BloodyLightning/blood7",
                    "CakeMod/Resources/BloodyLightning/blood8",
                    "CakeMod/Resources/BloodyLightning/blood9",
                    "CakeMod/Resources/BloodyLightning/blood10",
                };
                GameObject spareVFX2 = VFXLibrary.CreateVFX("String", SpareVFXPaths2, 16, new IntVector2(10, 1), tk2dBaseSprite.Anchor.LowerCenter, true, 0.18f, 0, null);
                EasyVFXDatabase.StringVFX = spareVFX2;
                //DoodleDungeon.InitCustomDungeon();
            }
            catch (Exception e)
            {
                ETGModConsole.Log(e.ToString(), false);
            }
        }