public override void Load() { if (!SRModLoader.IsModPresent("quicksilver_rancher")) { GameObject prefab = SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.QUICKSILVER_SLIME); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.QUICKSILVER_PLORT)); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_1)); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_3)); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_2)); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, SRSingleton <GameContext> .Instance.LookupDirector.GetPrefab(Identifiable.Id.VALLEY_AMMO_4)); AmmoRegistry.RegisterAmmoPrefab(PlayerState.AmmoMode.DEFAULT, prefab); AmmoRegistry.RegisterRefineryResource(Identifiable.Id.QUICKSILVER_PLORT); //LookupRegistry.RegisterVacEntry(Identifiable.Id.QUICKSILVER_PLORT, Color.grey, SRSingleton<SceneContext>.Instance..entries.First((PediaDirector.IdEntry x) => x.id == PediaDirector.Id.QUICKSILVER_PLORT).icon); PlortRegistry.AddEconomyEntry(Identifiable.Id.QUICKSILVER_PLORT, 200f, 100f); PlortRegistry.AddPlortEntry(Identifiable.Id.QUICKSILVER_PLORT, new ProgressDirector.ProgressType[] { ProgressDirector.ProgressType.ENTER_ZONE_MOCHI_RANCH }); AmmoRegistry.RegisterSiloAmmo((SiloStorage.StorageType x) => x == SiloStorage.StorageType.NON_SLIMES || x == SiloStorage.StorageType.PLORT, Identifiable.Id.QUICKSILVER_PLORT); } else { throw new Exception("Quicksilver Rancher mod (the old and original) is there, please remove it if you consider using this mod"); } }
// Called before GameContext.Awake // You want to register new things and enum values here, as well as do all your harmony patching public override void PreLoad() { HarmonyInstance.PatchAll(); TranslationPatcher.AddActorTranslation("l." + ModdedIds.MAPLE_SLIME.ToString().ToLower(), "Maple Slime"); TranslationPatcher.AddActorTranslation("l." + ModdedIds.MAPLE_PLORT.ToString().ToLower(), "Maple Plort"); TranslationPatcher.AddActorTranslation("l." + ModdedIds.TEST_CRATE_01.ToString().ToLower(), "Test Crate"); new SlimePediaEntryTranslation(ModdedIds.MAPLE_SLIMES).SetTitleTranslation("Maple Slimes").SetIntroTranslation("Pancakes, anyone?").SetSlimeologyTranslation("A syrupy relative of the Honey Slime, the Maple Slimes are a fall favorite which can be found in the Moss Blanket. It is rumored that they were created in a collaboration between Ogden Ortiz and Viktor Humphries and then got loose. Maybe someday they'll make Butter Slimes too...").SetDietTranslation("Fruit").SetFavoriteTranslation("Pogofruit").SetRisksTranslation("These slimes produce very sticky plorts. If they get loose, you'll have a very sticky situation on your very sticky hands. Best not let that happen.").SetPlortonomicsTranslation("These delicious morsels are just about the best thing since sliced... anything! They're highly prized by top chefs and breakfast enthusiasts alike. There's nothing like the smell of warm syrup to wake up a hungry rancher."); new SlimePediaEntryTranslation(ModdedIds.CARAMEL_APPLES).SetTitleTranslation("Caramel Apples").SetIntroTranslation("Intro TK").SetDescriptionTranslation("Description TK"); PlortRegistry.AddPlortEntry(ModdedIds.MAPLE_PLORT, new ProgressDirector.ProgressType[] { ProgressDirector.ProgressType.UNLOCK_MOSS }); DataModelRegistry.RegisterCustomActorModel(ModdedIds.MAPLE_SLIME, (long x, Identifiable.Id y, RegionRegistry.RegionSetId z, GameObject w) => new SlimeModel(x, y, z, w.transform)); PediaRegistry.RegisterIdentifiableMapping(PediaDirector.Id.PLORTS, ModdedIds.MAPLE_PLORT); PediaRegistry.RegisterIdentifiableMapping(ModdedIds.MAPLE_SLIMES, ModdedIds.MAPLE_SLIME); PediaRegistry.RegisterIdentifiableMapping(ModdedIds.CARAMEL_APPLES, ModdedIds.CARAMEL_APPLE_FRUIT); PediaRegistry.SetPediaCategory(ModdedIds.MAPLE_SLIMES, PediaRegistry.PediaCategory.SLIMES); PediaRegistry.SetPediaCategory(ModdedIds.CARAMEL_APPLES, PediaRegistry.PediaCategory.RESOURCES); }