public override void PostSetupContent() { Mod calamity = ModLoader.GetMod("CalamityMod"); Mod thor = ModLoader.GetMod("ThoriumMod"); SoundChanges.Init(); // TODO: Finish adding these another day... #region Calamity Adds if (calamity != null) { TileDetection.AddTilesToList(calamity, TileDetection.snowyblocks, "AstralSnow"); TileDetection.AddTilesToList(calamity, TileDetection.sandBlocks, "SulphurousSand", "AstralSand", "EutrophicSand", "AstralClay"); TileDetection.AddTilesToList(calamity, TileDetection.grassTiles, "AstralDirt", "AstralGrass", "PlantyMush"); TileDetection.AddTilesToList(calamity, TileDetection.stoneBlocks, "AstralOre", "AstralStone", "AstralMonolith", "AstralMonolith", "AbyssGravel", "Tenebris", "ChaoticOre", "SmoothCoal", "Voidstone", "Navystone", "TableCoral", "SeaPrism", "HazardChevronPanels", "NavyPlate", "LaboratoryPanels", "LaboratoryPlating", "RustedPlating", "HardenedSulphurousSandstone"); } #endregion #region Thorium Adds if (thor != null) { TileDetection.AddTilesToList(thor, TileDetection.stoneBlocks, "ThoriumOre", "LifeQuartz", "MarineRock", "MarineRockMoss", "DepthsAmber", "PearlStone", "Aquaite", "DepthsOpal", "SynthPlatinum", "DepthsOnyx", "DepthsSapphire", "DepthsEmerald", "DepthsTopaz", "DepthsAmethyst", "ScarletChestPlatform"); TileDetection.AddTilesToList(thor, TileDetection.sandBlocks, "Brack", "BrackBare"); } #endregion }
public override void Unload() { string path = ""; if (Directory.Exists(Path.Combine(ModLoader.ModPath, "Cache"))) { path = Path.Combine(ModLoader.ModPath, "Cache//ta_secretconfig.txt"); if (File.Exists(path)) { File.WriteAllText(path, Ambience.TAAmbient.ToString() + $"\n{Ambience.fStepsVol}\n\nDO NOT CHANGE THESE NUMBERS."); } else { Logger.Error("Failed to write save data for TerrariaAmbience volume config."); } } else { Logger.Error("Failed to write save data for TerrariaAmbience volume config."); } SoundChanges.Unload(); }