private static readonly string guid = "68656c69636f707465720a"; //give your companion some unique guid public static void Init() { string itemName = "Baby Good Shellicopter"; string resourceName = "BleakMod/Resources/mini_agunim"; GameObject obj = new GameObject(); GameObject ect = new GameObject(); var item = obj.AddComponent <BabyGoodShellicopter>(); ItemBuilder.AddSpriteToObject(itemName, resourceName, obj); string shortDesc = "Get To The Choppa!"; string longDesc = "A strange companion found in the R&G Department.\nIt shoots bullets and rockets, burns them alive, and... talks?"; ItemBuilder.SetupItem(item, shortDesc, longDesc, "bb"); item.quality = PickupObject.ItemQuality.S; item.CompanionGuid = guid; //this will be used by the item later to pull your companion from the enemy database item.Synergies = new CompanionTransformSynergy[0]; //this just needs to not be null BabyGoodShellicopter.BuildPrefab(); BabyGoodShellicopter.napalmGoop = new GoopDefinition(); AssetBundle assetBundle = ResourceManager.LoadAssetBundle("shared_auto_001"); GoopDefinition goopDefinition; try { GameObject gameObject2 = assetBundle.LoadAsset(BabyGoodShellicopter.fireGoop) as GameObject; goopDefinition = gameObject2.GetComponent <GoopDefinition>(); } catch { goopDefinition = (assetBundle.LoadAsset(BabyGoodShellicopter.fireGoop) as GoopDefinition); } goopDefinition.name = BabyGoodShellicopter.fireGoop.Replace("assets/data/goops/", "").Replace(".asset", ""); BabyGoodShellicopter.napalmGoop = goopDefinition; }
public override void Start() { ItemBuilder.Init(); //Hooks.Init(); //EnemyTools.Init(); //Tools.Init(); //EnemyBuilder.Init(); LifeCube.Register(); GungeonWind.Register(); FriendshipBracelet.Register(); FlamingSkull.Register(); Carrot.Register(); WinchestersHat.Register(); GundromedaPain.Register(); Bleaker.Register(); CheeseAmmolet.Register(); StrawberryJam.Register(); //WhiteBulletCell.Register(); Distribullets.Register(); HungryClips.Register(); TatteredCape.Register(); HeroicCape.Register(); Popcorn.Register(); RepurposedShellCasing.Register(); GatlingGullets.Register(); //SomeBunny.Register(); FittedTankBarrel.Register(); LeadCrown.Register(); //PiratesPendant.Register(); PendantOfTheFirstOrder.Register(); MimicBullets.Register(); CatchingMitts.Register(); Protractor.Register(); HealthyBullets.Register(); ChamberOfFrogs.Register(); TrickShot.Register(); ShowoffBullets.Register(); BabyGoodShellicopter.Init(); PrismaticGuonStone.Init(); //GoonStone.Init(); Overpill.Init(); JammomancersHat.Init(); ShotgunEnergyDrink.Init(); BowlersBriefcase.Init(); FatalOptics.Init(); MicroEnhancement.Init(); TargetingSpecs.Init(); GunShredder.Init(); GlassPrincesCannon.Add(); Rewind.Init(); Telegunesis.Init(); //Underpill.Init(); AegisShield.Init(); AmmocondasNest.Init(); ShadesShades.Init(); BeholstersBelt.Init(); SuspiciousLookingBell.Init(); WowTasticPaintbrush.Init(); SmokingSkull.Init(); PortableSewerGrate.Init(); GoldenCirclet.Init(); //PackOfLostItems.Init(); CapeOfTheResourcefulRat.Init(); //DemonicBrick.Init(); EffigyOfVengeance.Init(); HornOfTheDragun.Init(); PickpocketGuide.Init(); SpillOJar.Init(); PhaseShifterStopwatch.Init(); Rhythminator.Add(); //Bubbler.Add(); StartStriker.Add(); PrizeRifle.Add(); MultiActiveReloadManager.SetupHooks(); EasyGoopDefinitions.DefineDefaultGoops(); //ZipFilePath = this.Metadata.Archive; //FilePath = this.Metadata.Directory; //AudioResourceLoader.InitAudio; SaveAPIManager.Setup("bb:"); Log($"{MOD_NAME} v{VERSION} started successfully.", TEXT_COLOR); }