commit e30707df873d6caaca48e9583abad338e49e72ba Author: apotofkoolaid <72956636+apotofkoolaid@users.noreply.github.com> Date: Sun Jun 16 22:03:05 2024 -0500 Upload diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f1a334d --- /dev/null +++ b/.gitattributes @@ -0,0 +1,27 @@ +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# These files are text and will have their line endings managed, but will respect +# the individual user's eol and autocrlf settings. +# +# These are currently commented out to override Visual Studio forcing CRLF line endings. +# +# *.cs text +# *.txt text + +# These files will always have their line endings forced to LF (Linux style). +*.cs text eol=lf +*.txt text eol=lf + +# These files will always have their line endings forced to CRLF (Windows style). +# (This is used for files internal to Visual Studio's operation.) +*.csproj text eol=crlf +*.csproj.user text eol=crlf +*.sln text eol=crlf + +# These files are NOT text and will not have their "line endings converted" (aka get corrupted by Git). +*.png binary +*.jpg binary +*.jpeg binary +*.wav binary +*.ogg binary \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..516f1ca --- /dev/null +++ b/.gitignore @@ -0,0 +1,306 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +*.csproj +*.sln +Properties/ + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Windows +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk diff --git a/Assets/Music/Alternates/AbyssLayer3Alt.ogg b/Assets/Music/Alternates/AbyssLayer3Alt.ogg new file mode 100644 index 0000000..974d99b Binary files /dev/null and b/Assets/Music/Alternates/AbyssLayer3Alt.ogg differ diff --git a/Assets/Music/Alternates/BloodMoonAlt.ogg b/Assets/Music/Alternates/BloodMoonAlt.ogg new file mode 100644 index 0000000..e055127 Binary files /dev/null and b/Assets/Music/Alternates/BloodMoonAlt.ogg differ diff --git a/Assets/Music/Alternates/CrimsonAlt.ogg b/Assets/Music/Alternates/CrimsonAlt.ogg new file mode 100644 index 0000000..6fa8e64 Binary files /dev/null and b/Assets/Music/Alternates/CrimsonAlt.ogg differ diff --git a/Assets/Music/Alternates/DestroyerAlt.ogg b/Assets/Music/Alternates/DestroyerAlt.ogg new file mode 100644 index 0000000..8c569d5 Binary files /dev/null and b/Assets/Music/Alternates/DestroyerAlt.ogg differ diff --git a/Assets/Music/Alternates/EyeofCthulhuAlt.ogg b/Assets/Music/Alternates/EyeofCthulhuAlt.ogg new file mode 100644 index 0000000..7feb57a Binary files /dev/null and b/Assets/Music/Alternates/EyeofCthulhuAlt.ogg differ diff --git a/Assets/Music/Alternates/KingSlimeAlt.ogg b/Assets/Music/Alternates/KingSlimeAlt.ogg new file mode 100644 index 0000000..557934e Binary files /dev/null and b/Assets/Music/Alternates/KingSlimeAlt.ogg differ diff --git a/Assets/Music/Alternates/RainAlt.ogg b/Assets/Music/Alternates/RainAlt.ogg new file mode 100644 index 0000000..ab1e068 Binary files /dev/null and b/Assets/Music/Alternates/RainAlt.ogg differ diff --git a/Assets/Music/Ambience/AbyssLayer2.ogg b/Assets/Music/Ambience/AbyssLayer2.ogg new file mode 100644 index 0000000..616034f Binary files /dev/null and b/Assets/Music/Ambience/AbyssLayer2.ogg differ diff --git a/Assets/Music/Ambience/AbyssLayer3.ogg b/Assets/Music/Ambience/AbyssLayer3.ogg new file mode 100644 index 0000000..5e9dcaf Binary files /dev/null and b/Assets/Music/Ambience/AbyssLayer3.ogg differ diff --git a/Assets/Music/Ambience/AbyssLayer4.ogg b/Assets/Music/Ambience/AbyssLayer4.ogg new file mode 100644 index 0000000..efe573d Binary files /dev/null and b/Assets/Music/Ambience/AbyssLayer4.ogg differ diff --git a/Assets/Music/Ambience/AstralInfection.ogg b/Assets/Music/Ambience/AstralInfection.ogg new file mode 100644 index 0000000..1cc1258 Binary files /dev/null and b/Assets/Music/Ambience/AstralInfection.ogg differ diff --git a/Assets/Music/Ambience/AstralInfectionUnderground.ogg b/Assets/Music/Ambience/AstralInfectionUnderground.ogg new file mode 100644 index 0000000..ef04d7d Binary files /dev/null and b/Assets/Music/Ambience/AstralInfectionUnderground.ogg differ diff --git a/Assets/Music/Ambience/BeeHive.ogg b/Assets/Music/Ambience/BeeHive.ogg new file mode 100644 index 0000000..5919020 Binary files /dev/null and b/Assets/Music/Ambience/BeeHive.ogg differ diff --git a/Assets/Music/Ambience/BioLab.ogg b/Assets/Music/Ambience/BioLab.ogg new file mode 100644 index 0000000..b7a3aa6 Binary files /dev/null and b/Assets/Music/Ambience/BioLab.ogg differ diff --git a/Assets/Music/Ambience/BrimstoneCrags.ogg b/Assets/Music/Ambience/BrimstoneCrags.ogg new file mode 100644 index 0000000..35855dd Binary files /dev/null and b/Assets/Music/Ambience/BrimstoneCrags.ogg differ diff --git a/Assets/Music/Ambience/Caverns.ogg b/Assets/Music/Ambience/Caverns.ogg new file mode 100644 index 0000000..78c3889 Binary files /dev/null and b/Assets/Music/Ambience/Caverns.ogg differ diff --git a/Assets/Music/Ambience/Corruption.ogg b/Assets/Music/Ambience/Corruption.ogg new file mode 100644 index 0000000..5032d48 Binary files /dev/null and b/Assets/Music/Ambience/Corruption.ogg differ diff --git a/Assets/Music/Ambience/CorruptionUnderground.ogg b/Assets/Music/Ambience/CorruptionUnderground.ogg new file mode 100644 index 0000000..f7b2b9a Binary files /dev/null and b/Assets/Music/Ambience/CorruptionUnderground.ogg differ diff --git a/Assets/Music/Ambience/Crimson.ogg b/Assets/Music/Ambience/Crimson.ogg new file mode 100644 index 0000000..1573e8f Binary files /dev/null and b/Assets/Music/Ambience/Crimson.ogg differ diff --git a/Assets/Music/Ambience/CrimsonUnderground.ogg b/Assets/Music/Ambience/CrimsonUnderground.ogg new file mode 100644 index 0000000..0c9dade Binary files /dev/null and b/Assets/Music/Ambience/CrimsonUnderground.ogg differ diff --git a/Assets/Music/Ambience/Desert.ogg b/Assets/Music/Ambience/Desert.ogg new file mode 100644 index 0000000..c3b4eee Binary files /dev/null and b/Assets/Music/Ambience/Desert.ogg differ diff --git a/Assets/Music/Ambience/DesertUnderground.ogg b/Assets/Music/Ambience/DesertUnderground.ogg new file mode 100644 index 0000000..bdfa048 Binary files /dev/null and b/Assets/Music/Ambience/DesertUnderground.ogg differ diff --git a/Assets/Music/Ambience/Dungeon.ogg b/Assets/Music/Ambience/Dungeon.ogg new file mode 100644 index 0000000..9fe8f85 Binary files /dev/null and b/Assets/Music/Ambience/Dungeon.ogg differ diff --git a/Assets/Music/Ambience/ForestDay.ogg b/Assets/Music/Ambience/ForestDay.ogg new file mode 100644 index 0000000..2fcab48 Binary files /dev/null and b/Assets/Music/Ambience/ForestDay.ogg differ diff --git a/Assets/Music/Ambience/ForestNight.ogg b/Assets/Music/Ambience/ForestNight.ogg new file mode 100644 index 0000000..78cb3a9 Binary files /dev/null and b/Assets/Music/Ambience/ForestNight.ogg differ diff --git a/Assets/Music/Ambience/GlowingMushroomFields.ogg b/Assets/Music/Ambience/GlowingMushroomFields.ogg new file mode 100644 index 0000000..b3d5712 Binary files /dev/null and b/Assets/Music/Ambience/GlowingMushroomFields.ogg differ diff --git a/Assets/Music/Ambience/GlowingMushroomGrove.ogg b/Assets/Music/Ambience/GlowingMushroomGrove.ogg new file mode 100644 index 0000000..e7bb6b7 Binary files /dev/null and b/Assets/Music/Ambience/GlowingMushroomGrove.ogg differ diff --git a/Assets/Music/Ambience/Hallow.ogg b/Assets/Music/Ambience/Hallow.ogg new file mode 100644 index 0000000..9daae6b Binary files /dev/null and b/Assets/Music/Ambience/Hallow.ogg differ diff --git a/Assets/Music/Ambience/HallowUnderground.ogg b/Assets/Music/Ambience/HallowUnderground.ogg new file mode 100644 index 0000000..6294bdd Binary files /dev/null and b/Assets/Music/Ambience/HallowUnderground.ogg differ diff --git a/Assets/Music/Ambience/Jungle.ogg b/Assets/Music/Ambience/Jungle.ogg new file mode 100644 index 0000000..4ae1e89 Binary files /dev/null and b/Assets/Music/Ambience/Jungle.ogg differ diff --git a/Assets/Music/Ambience/JungleTemple.ogg b/Assets/Music/Ambience/JungleTemple.ogg new file mode 100644 index 0000000..4e0c2d5 Binary files /dev/null and b/Assets/Music/Ambience/JungleTemple.ogg differ diff --git a/Assets/Music/Ambience/JungleUnderground.ogg b/Assets/Music/Ambience/JungleUnderground.ogg new file mode 100644 index 0000000..cdf525e Binary files /dev/null and b/Assets/Music/Ambience/JungleUnderground.ogg differ diff --git a/Assets/Music/Ambience/Meteorite.ogg b/Assets/Music/Ambience/Meteorite.ogg new file mode 100644 index 0000000..2ae493b Binary files /dev/null and b/Assets/Music/Ambience/Meteorite.ogg differ diff --git a/Assets/Music/Ambience/Ocean.ogg b/Assets/Music/Ambience/Ocean.ogg new file mode 100644 index 0000000..520883d Binary files /dev/null and b/Assets/Music/Ambience/Ocean.ogg differ diff --git a/Assets/Music/Ambience/RainHeavy.ogg b/Assets/Music/Ambience/RainHeavy.ogg new file mode 100644 index 0000000..06248bb Binary files /dev/null and b/Assets/Music/Ambience/RainHeavy.ogg differ diff --git a/Assets/Music/Ambience/RainLight.ogg b/Assets/Music/Ambience/RainLight.ogg new file mode 100644 index 0000000..8528ef8 Binary files /dev/null and b/Assets/Music/Ambience/RainLight.ogg differ diff --git a/Assets/Music/Ambience/RainNormal.ogg b/Assets/Music/Ambience/RainNormal.ogg new file mode 100644 index 0000000..b25a595 Binary files /dev/null and b/Assets/Music/Ambience/RainNormal.ogg differ diff --git a/Assets/Music/Ambience/Sandstorm.ogg b/Assets/Music/Ambience/Sandstorm.ogg new file mode 100644 index 0000000..16d5536 Binary files /dev/null and b/Assets/Music/Ambience/Sandstorm.ogg differ diff --git a/Assets/Music/Ambience/Space.ogg b/Assets/Music/Ambience/Space.ogg new file mode 100644 index 0000000..0027fd2 Binary files /dev/null and b/Assets/Music/Ambience/Space.ogg differ diff --git a/Assets/Music/Ambience/SpiderCave.ogg b/Assets/Music/Ambience/SpiderCave.ogg new file mode 100644 index 0000000..7c39bca Binary files /dev/null and b/Assets/Music/Ambience/SpiderCave.ogg differ diff --git a/Assets/Music/Ambience/SulphurousSea.ogg b/Assets/Music/Ambience/SulphurousSea.ogg new file mode 100644 index 0000000..a577bb3 Binary files /dev/null and b/Assets/Music/Ambience/SulphurousSea.ogg differ diff --git a/Assets/Music/Ambience/SunkenSea.ogg b/Assets/Music/Ambience/SunkenSea.ogg new file mode 100644 index 0000000..9c8e479 Binary files /dev/null and b/Assets/Music/Ambience/SunkenSea.ogg differ diff --git a/Assets/Music/Ambience/Tundra.ogg b/Assets/Music/Ambience/Tundra.ogg new file mode 100644 index 0000000..299241b Binary files /dev/null and b/Assets/Music/Ambience/Tundra.ogg differ diff --git a/Assets/Music/Ambience/TundraUnderground.ogg b/Assets/Music/Ambience/TundraUnderground.ogg new file mode 100644 index 0000000..5b82512 Binary files /dev/null and b/Assets/Music/Ambience/TundraUnderground.ogg differ diff --git a/Assets/Music/Ambience/Underground.ogg b/Assets/Music/Ambience/Underground.ogg new file mode 100644 index 0000000..a5cf422 Binary files /dev/null and b/Assets/Music/Ambience/Underground.ogg differ diff --git a/Assets/Music/Ambience/Underworld.ogg b/Assets/Music/Ambience/Underworld.ogg new file mode 100644 index 0000000..c0b6bb6 Binary files /dev/null and b/Assets/Music/Ambience/Underworld.ogg differ diff --git a/Assets/Music/Biomes/Caverns.ogg b/Assets/Music/Biomes/Caverns.ogg new file mode 100644 index 0000000..b0878b0 Binary files /dev/null and b/Assets/Music/Biomes/Caverns.ogg differ diff --git a/Assets/Music/Biomes/Corruption.ogg b/Assets/Music/Biomes/Corruption.ogg new file mode 100644 index 0000000..47e7524 Binary files /dev/null and b/Assets/Music/Biomes/Corruption.ogg differ diff --git a/Assets/Music/Biomes/CorruptionUnderground.ogg b/Assets/Music/Biomes/CorruptionUnderground.ogg new file mode 100644 index 0000000..ad88f43 Binary files /dev/null and b/Assets/Music/Biomes/CorruptionUnderground.ogg differ diff --git a/Assets/Music/Biomes/Crimson.ogg b/Assets/Music/Biomes/Crimson.ogg new file mode 100644 index 0000000..fd46ed2 Binary files /dev/null and b/Assets/Music/Biomes/Crimson.ogg differ diff --git a/Assets/Music/Biomes/CrimsonUnderground.ogg b/Assets/Music/Biomes/CrimsonUnderground.ogg new file mode 100644 index 0000000..1a2ca77 Binary files /dev/null and b/Assets/Music/Biomes/CrimsonUnderground.ogg differ diff --git a/Assets/Music/Biomes/Desert.ogg b/Assets/Music/Biomes/Desert.ogg new file mode 100644 index 0000000..c8da384 Binary files /dev/null and b/Assets/Music/Biomes/Desert.ogg differ diff --git a/Assets/Music/Biomes/Dungeon.ogg b/Assets/Music/Biomes/Dungeon.ogg new file mode 100644 index 0000000..edb8639 Binary files /dev/null and b/Assets/Music/Biomes/Dungeon.ogg differ diff --git a/Assets/Music/Biomes/ForestDayAfternoon.ogg b/Assets/Music/Biomes/ForestDayAfternoon.ogg new file mode 100644 index 0000000..b90dc0f Binary files /dev/null and b/Assets/Music/Biomes/ForestDayAfternoon.ogg differ diff --git a/Assets/Music/Biomes/ForestDayDawn.ogg b/Assets/Music/Biomes/ForestDayDawn.ogg new file mode 100644 index 0000000..2d264ca Binary files /dev/null and b/Assets/Music/Biomes/ForestDayDawn.ogg differ diff --git a/Assets/Music/Biomes/ForestDayEvening.ogg b/Assets/Music/Biomes/ForestDayEvening.ogg new file mode 100644 index 0000000..ff94668 Binary files /dev/null and b/Assets/Music/Biomes/ForestDayEvening.ogg differ diff --git a/Assets/Music/Biomes/ForestDayMorning.ogg b/Assets/Music/Biomes/ForestDayMorning.ogg new file mode 100644 index 0000000..c6210a3 Binary files /dev/null and b/Assets/Music/Biomes/ForestDayMorning.ogg differ diff --git a/Assets/Music/Biomes/ForestNight.ogg b/Assets/Music/Biomes/ForestNight.ogg new file mode 100644 index 0000000..644e81e Binary files /dev/null and b/Assets/Music/Biomes/ForestNight.ogg differ diff --git a/Assets/Music/Biomes/Geodes.ogg b/Assets/Music/Biomes/Geodes.ogg new file mode 100644 index 0000000..1305aed Binary files /dev/null and b/Assets/Music/Biomes/Geodes.ogg differ diff --git a/Assets/Music/Biomes/GlowingMushroomFields.ogg b/Assets/Music/Biomes/GlowingMushroomFields.ogg new file mode 100644 index 0000000..69f75f7 Binary files /dev/null and b/Assets/Music/Biomes/GlowingMushroomFields.ogg differ diff --git a/Assets/Music/Biomes/Meteorite.ogg b/Assets/Music/Biomes/Meteorite.ogg new file mode 100644 index 0000000..4552c63 Binary files /dev/null and b/Assets/Music/Biomes/Meteorite.ogg differ diff --git a/Assets/Music/Biomes/OceanDay.ogg b/Assets/Music/Biomes/OceanDay.ogg new file mode 100644 index 0000000..5e529ac Binary files /dev/null and b/Assets/Music/Biomes/OceanDay.ogg differ diff --git a/Assets/Music/Biomes/OceanNight.ogg b/Assets/Music/Biomes/OceanNight.ogg new file mode 100644 index 0000000..34eac70 Binary files /dev/null and b/Assets/Music/Biomes/OceanNight.ogg differ diff --git a/Assets/Music/Biomes/Space.ogg b/Assets/Music/Biomes/Space.ogg new file mode 100644 index 0000000..87f84fc Binary files /dev/null and b/Assets/Music/Biomes/Space.ogg differ diff --git a/Assets/Music/Biomes/TownDay.ogg b/Assets/Music/Biomes/TownDay.ogg new file mode 100644 index 0000000..479db2d Binary files /dev/null and b/Assets/Music/Biomes/TownDay.ogg differ diff --git a/Assets/Music/Biomes/TownNight.ogg b/Assets/Music/Biomes/TownNight.ogg new file mode 100644 index 0000000..0306ebb Binary files /dev/null and b/Assets/Music/Biomes/TownNight.ogg differ diff --git a/Assets/Music/Biomes/TownNight_Noiseless.ogg b/Assets/Music/Biomes/TownNight_Noiseless.ogg new file mode 100644 index 0000000..9c32fd6 Binary files /dev/null and b/Assets/Music/Biomes/TownNight_Noiseless.ogg differ diff --git a/Assets/Music/Biomes/Tundra.ogg b/Assets/Music/Biomes/Tundra.ogg new file mode 100644 index 0000000..e7d3b0a Binary files /dev/null and b/Assets/Music/Biomes/Tundra.ogg differ diff --git a/Assets/Music/Biomes/TundraUnderground.ogg b/Assets/Music/Biomes/TundraUnderground.ogg new file mode 100644 index 0000000..703017f Binary files /dev/null and b/Assets/Music/Biomes/TundraUnderground.ogg differ diff --git a/Assets/Music/Biomes/Underground.ogg b/Assets/Music/Biomes/Underground.ogg new file mode 100644 index 0000000..2439cf5 Binary files /dev/null and b/Assets/Music/Biomes/Underground.ogg differ diff --git a/Assets/Music/Biomes/Underworld.ogg b/Assets/Music/Biomes/Underworld.ogg new file mode 100644 index 0000000..ef0fe33 Binary files /dev/null and b/Assets/Music/Biomes/Underworld.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier1.ogg b/Assets/Music/Biomes/WorkshopTier1.ogg new file mode 100644 index 0000000..e4eae45 Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier1.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier2.ogg b/Assets/Music/Biomes/WorkshopTier2.ogg new file mode 100644 index 0000000..ec32447 Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier2.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier3.ogg b/Assets/Music/Biomes/WorkshopTier3.ogg new file mode 100644 index 0000000..6c1895d Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier3.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier4.ogg b/Assets/Music/Biomes/WorkshopTier4.ogg new file mode 100644 index 0000000..566ab9c Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier4.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier5.ogg b/Assets/Music/Biomes/WorkshopTier5.ogg new file mode 100644 index 0000000..d61225c Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier5.ogg differ diff --git a/Assets/Music/Biomes/WorkshopTier6.ogg b/Assets/Music/Biomes/WorkshopTier6.ogg new file mode 100644 index 0000000..c88d66f Binary files /dev/null and b/Assets/Music/Biomes/WorkshopTier6.ogg differ diff --git a/Assets/Music/Bosses/BrainofCthulhu.ogg b/Assets/Music/Bosses/BrainofCthulhu.ogg new file mode 100644 index 0000000..1895184 Binary files /dev/null and b/Assets/Music/Bosses/BrainofCthulhu.ogg differ diff --git a/Assets/Music/Bosses/EaterofWorlds.ogg b/Assets/Music/Bosses/EaterofWorlds.ogg new file mode 100644 index 0000000..005d243 Binary files /dev/null and b/Assets/Music/Bosses/EaterofWorlds.ogg differ diff --git a/Assets/Music/Bosses/EyeofCthulhu.ogg b/Assets/Music/Bosses/EyeofCthulhu.ogg new file mode 100644 index 0000000..9bcfe46 Binary files /dev/null and b/Assets/Music/Bosses/EyeofCthulhu.ogg differ diff --git a/Assets/Music/Bosses/KingSlime.ogg b/Assets/Music/Bosses/KingSlime.ogg new file mode 100644 index 0000000..d5a5bae Binary files /dev/null and b/Assets/Music/Bosses/KingSlime.ogg differ diff --git a/Assets/Music/Bosses/MoonLord.ogg b/Assets/Music/Bosses/MoonLord.ogg new file mode 100644 index 0000000..aef438b Binary files /dev/null and b/Assets/Music/Bosses/MoonLord.ogg differ diff --git a/Assets/Music/Bosses/Skeletron.ogg b/Assets/Music/Bosses/Skeletron.ogg new file mode 100644 index 0000000..d696a95 Binary files /dev/null and b/Assets/Music/Bosses/Skeletron.ogg differ diff --git a/Assets/Music/Bosses/WallofFlesh.ogg b/Assets/Music/Bosses/WallofFlesh.ogg new file mode 100644 index 0000000..3d7957f Binary files /dev/null and b/Assets/Music/Bosses/WallofFlesh.ogg differ diff --git a/Assets/Music/Events/BloodMoon.ogg b/Assets/Music/Events/BloodMoon.ogg new file mode 100644 index 0000000..9899277 Binary files /dev/null and b/Assets/Music/Events/BloodMoon.ogg differ diff --git a/Assets/Music/Events/BloodMoonDeath.ogg b/Assets/Music/Events/BloodMoonDeath.ogg new file mode 100644 index 0000000..48a3ecc Binary files /dev/null and b/Assets/Music/Events/BloodMoonDeath.ogg differ diff --git a/Assets/Music/Events/LanternFestival.ogg b/Assets/Music/Events/LanternFestival.ogg new file mode 100644 index 0000000..10c0280 Binary files /dev/null and b/Assets/Music/Events/LanternFestival.ogg differ diff --git a/Assets/Music/Events/Rain.ogg b/Assets/Music/Events/Rain.ogg new file mode 100644 index 0000000..ac4dd6d Binary files /dev/null and b/Assets/Music/Events/Rain.ogg differ diff --git a/Assets/Music/Events/SlimeRain.ogg b/Assets/Music/Events/SlimeRain.ogg new file mode 100644 index 0000000..743c32b Binary files /dev/null and b/Assets/Music/Events/SlimeRain.ogg differ diff --git a/Assets/Music/Misc/FalseEpilogue.ogg b/Assets/Music/Misc/FalseEpilogue.ogg new file mode 100644 index 0000000..8143fd7 Binary files /dev/null and b/Assets/Music/Misc/FalseEpilogue.ogg differ diff --git a/Assets/Music/Misc/HardmodeInterlude.ogg b/Assets/Music/Misc/HardmodeInterlude.ogg new file mode 100644 index 0000000..364fb41 Binary files /dev/null and b/Assets/Music/Misc/HardmodeInterlude.ogg differ diff --git a/Assets/Music/Misc/RainLegacy.ogg b/Assets/Music/Misc/RainLegacy.ogg new file mode 100644 index 0000000..23f79d4 Binary files /dev/null and b/Assets/Music/Misc/RainLegacy.ogg differ diff --git a/Assets/Sounds/Silence.ogg b/Assets/Sounds/Silence.ogg new file mode 100644 index 0000000..1fc2e1e Binary files /dev/null and b/Assets/Sounds/Silence.ogg differ diff --git a/Common/Configs/MusicConfig.cs b/Common/Configs/MusicConfig.cs new file mode 100644 index 0000000..d521b4f --- /dev/null +++ b/Common/Configs/MusicConfig.cs @@ -0,0 +1,67 @@ +using Terraria.ModLoader.Config; +using System.ComponentModel; + +namespace UnCalamityModMusic.Common.Configs +{ + [BackgroundColor(49, 32, 36, 216)] + public class MusicConfig : ModConfig + { + public override ConfigScope Mode => ConfigScope.ClientSide; + + [Header("$Mods.UnCalamityModMusic.Configs.MusicConfig.MusicTogglesHeader")] + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + public bool WorkshopThemes { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + public bool HardmodeInterlude { get; set; } + + [Header("$Mods.UnCalamityModMusic.Configs.MusicConfig.AlternateMusicHeader")] + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool DeepAbyssAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool CrimsonAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool RainAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool BloodMoonAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool KingSlimeAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool EyeofCthulhuAlt { get; set; } + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool DestroyerAlt { get; set; } + + [Header("$Mods.UnCalamityModMusic.Configs.MusicConfig.ConditionChangesHeader")] + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool PrioritizeInfernumMusic { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool OverrideAnahitasLure { get; set; } + } +} \ No newline at end of file diff --git a/Common/Configs/OtherConfig.cs b/Common/Configs/OtherConfig.cs new file mode 100644 index 0000000..d5154f4 --- /dev/null +++ b/Common/Configs/OtherConfig.cs @@ -0,0 +1,35 @@ +using Terraria.ModLoader.Config; +using System.ComponentModel; + +namespace UnCalamityModMusic.Common.Configs +{ + [BackgroundColor(49, 32, 36, 216)] + public class OtherConfig : ModConfig + { + public override ConfigScope Mode => ConfigScope.ClientSide; + + [Header("$Mods.UnCalamityModMusic.Configs.OtherConfig.AmbienceTogglesHeader")] + + [Range(0f, 100f)] + [Increment(1f)] + [BackgroundColor(192, 54, 64, 192)] + [SliderColor(224, 165, 56, 128)] + [DefaultValue(0f)] + public float AmbienceFrequency { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool DisableBeeHiveAmbience { get; set; } + + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(false)] + public bool DisableSpiderCaveAmbience { get; set; } + + [Header("$Mods.UnCalamityModMusic.Configs.OtherConfig.OtherChangesHeader")] + + [ReloadRequired] + [BackgroundColor(192, 54, 64, 192)] + [DefaultValue(true)] + public bool MusicBoxResprite { get; set; } + } +} \ No newline at end of file diff --git a/Common/ModCompatibility/BossChecklistCompatibility.cs b/Common/ModCompatibility/BossChecklistCompatibility.cs new file mode 100644 index 0000000..0893670 --- /dev/null +++ b/Common/ModCompatibility/BossChecklistCompatibility.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common.ModCompatibility +{ + public class BossChecklistCompatibility : ModSystem + { + public override void PostSetupContent() + { + BossChecklistSetup(); + } + + public void BossChecklistSetup() + { + var bossChecklist = ModLoader.TryGetMod("BossChecklist", out Mod checklist); + + if (!bossChecklist) + { + return; + } + + var BossMusicBoxes = new Dictionary + { + { "Terraria MoonLord", ModContent.ItemType() }, + //{ "Terraria CultistBoss", ModContent.ItemType() }, + //{ "Terraria HallowBoss", ModContent.ItemType() }, + //{ "Terraria DukeFishron", ModContent.ItemType() }, + //{ "Terraria Golem", ModContent.ItemType() }, + //{ "Terraria Plantera", ModContent.ItemType() }, + //{ "Terraria SkeletronPrime", ModContent.ItemType() }, + //{ "Terraria TheTwins", ModContent.ItemType() }, + //{ "Terraria TheDestroyer", ModContent.ItemType() }, + //{ "Terraria QueenSlimeBoss", ModContent.ItemType() }, + { "Terraria WallofFlesh", ModContent.ItemType() }, + { "Terraria Skeletron", ModContent.ItemType() }, + //{ "Terraria QueenBee", ModContent.ItemType() }, + { "Terraria BrainofCthulhu", ModContent.ItemType() }, + { "Terraria EaterofWorlds", ModContent.ItemType() }, + { "Terraria EyeofCthulhu", ModContent.ItemType() }, + { "Terraria KingSlime", ModContent.ItemType() } + }; + + var EventMusicBoxes = new Dictionary + { + //{ "Terraria FrostMoon", ModContent.ItemType() }, + //{ "Terraria PumpkinMoon", ModContent.ItemType() }, + //{ "Terraria TorchGod", ModContent.ItemType() }, + //{ "Terraria LunarEvent", new List { ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType(), ModContent.ItemType() } }, + //{ "Terraria MartianMadness", ModContent.ItemType() }, + //{ "Terraria PirateInvasion", ModContent.ItemType() }, + //{ "Terraria GoblinArmy", ModContent.ItemType() }, + //{ "Terraria Eclipse", ModContent.ItemType() }, + { "Terraria BloodMoon", new List { ModContent.ItemType(), ModContent.ItemType() } }, + }; + + var MinibossMusicBoxes = new Dictionary + { + //{ "CalamityMod GreatSandShark", ModContent.ItemType() }, + }; + + + checklist.Call("SubmitEntryCollectibles", Mod, BossMusicBoxes); + checklist.Call("SubmitEntryCollectibles", Mod, EventMusicBoxes); + checklist.Call("SubmitEntryCollectibles", Mod, MinibossMusicBoxes); + } + } +} \ No newline at end of file diff --git a/Common/ModCompatibility/InfernumCompatibility.cs b/Common/ModCompatibility/InfernumCompatibility.cs new file mode 100644 index 0000000..c459009 --- /dev/null +++ b/Common/ModCompatibility/InfernumCompatibility.cs @@ -0,0 +1,176 @@ +using Terraria; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.ModCompatibility +{ + public class InfernumCompatibility + { + //Infernum has picky code when deciding its music, being altered for if the mode is on for example + public static int DecideOnMusicPath(string normalPath, string infernumPath) + { + var infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + var infernumModMusic = ModLoader.TryGetMod("InfernumModeMusic", out Mod imusic); + + bool normalPathExists = MusicLoader.MusicExists(UnCalamityModMusic.Instance, "Assets/Music/Bosses/" + normalPath) || MusicLoader.MusicExists(UnCalamityModMusic.Instance, "Assets/Music/Events/" + normalPath); + bool infernumPathExists; + + if (infernumModMusic) + { + infernumPathExists = MusicLoader.MusicExists(imusic, "Sounds/Music/" + infernumPath); + } + else + { + infernumPathExists = false; + } + + if (infernumMod) + { + if (infernumModMusic && ModContent.GetInstance().PrioritizeInfernumMusic && infernumPathExists) + { + if (PlayerFlags.infernumMode && infernumPath.Contains("MoonLord")) + { + return -1; + } + else + { + return MusicLoader.GetMusicSlot(imusic, "Sounds/Music/" + infernumPath); + } + } + else + { + if (normalPathExists) + { + return MusicPathing.GetMusicSlot(normalPath); + } + else + { + return -1; + } + } + } + else + { + if (infernumModMusic && ModContent.GetInstance().PrioritizeInfernumMusic && infernumPathExists) + { + return MusicLoader.GetMusicSlot(imusic, "Sounds/Music/" + infernumPath); + } + else + { + if (normalPathExists) + { + return MusicPathing.GetMusicSlot(normalPath); + } + else + { + return -1; + } + } + } + } + + public static SceneEffectPriority DecideOnScenePriority(SceneEffectPriority normalPriority) + { + var infernumModMusic = ModLoader.TryGetMod("InfernumModeMusic", out Mod imusic); + + if (infernumModMusic && !PlayerFlags.bossRushActive) + { + return (SceneEffectPriority)12; + } + else + { + return normalPriority; + } + } + } + //Fixes a problem where Infernum forces vanilla Dungeon music to play when Ceaseless Void is passive in the Archives + [JITWhenModsEnabled("CalamityMod")] + public class CeaselessVoid_Passive : ModSceneEffect + { + public static int voidBoss => CalamityMod.NPCs.CalamityGlobalNPC.voidBoss; + + public static int ghostBoss => CalamityMod.NPCs.CalamityGlobalNPC.ghostBoss; + + public override int Music => MusicPathing.GetMusicSlot("Dungeon"); + + public override SceneEffectPriority Priority + { + get + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + var infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + + if (calamityMod && infernumMod) + { + if (ghostBoss >= 0 && ghostBoss < Main.npc.Length) + { + NPC polterghast = Main.npc[ghostBoss]; + + if (polterghast != null) + { + return SceneEffectPriority.BossLow; + } + } + if (PlayerFlags.bossRushActive) + { + return SceneEffectPriority.BossLow; + } + + return (SceneEffectPriority)9; + } + + return SceneEffectPriority.None; + } + } + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + var infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + + if (calamityMod && infernumMod) + { + if (voidBoss >= 0 && voidBoss < Main.npc.Length) + { + NPC ceaselessVoid = Main.npc[voidBoss]; + + if (ceaselessVoid != null && ceaselessVoid.active) + { + return ceaselessVoid.ai[0] == 0f; + } + } + } + + return false; + } + } + //Makes the VCMM Desert theme play in the Lost Colosseum after Argus is defeated, instead of vanilla music + [JITWhenModsEnabled("InfernumMode")] + public class LostColosseum_Aftermath : ModSceneEffect + { + public static bool downedArgus => InfernumMode.Content.Subworlds.LostColosseum.HasBereftVassalBeenDefeated; + + public override int Music => MusicPathing.GetMusicSlot("Desert"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override float GetWeight(Player player) => 0.97f; + + public override bool IsSceneEffectActive(Player player) + { + var infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + + if (infernumMod) + { + if (downedArgus) + { + return PlayerFlags.ZoneLostColosseum; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/Common/ModCompatibility/MusicDisplayCompatibility.cs b/Common/ModCompatibility/MusicDisplayCompatibility.cs new file mode 100644 index 0000000..a172c95 --- /dev/null +++ b/Common/ModCompatibility/MusicDisplayCompatibility.cs @@ -0,0 +1,125 @@ +using Terraria.Localization; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common.ModCompatibility +{ + public class MusicDisplayCompatibility : ModSystem + { + public override void PostSetupContent() + { + MusicDisplaySetup(); + } + + public void MusicDisplaySetup() + { + var musicDisplay = ModLoader.TryGetMod("MusicDisplay", out Mod display); + + if (!musicDisplay) + { + return; + } + + void AddMusic(string songKey, string authorKey, string songType) + { + short slot = (short)MusicLoader.GetMusicSlot(Mod, $"Assets/Music/{songType}/{songKey}"); + display.Call("AddMusic", slot, Language.GetTextValue("Mods.UnCalamityModMusic.ModSupport.MusicDisplay.SongNames." + songKey), Language.GetTextValue("Mods.UnCalamityModMusic.ModSupport.MusicDisplay.Authors." + authorKey), Mod.DisplayName); + } + + AddMusic("AbyssLayer3Alt", "HeartPlusUp", "Alternates"); + AddMusic("DestroyerAlt", "CDMusic", "Alternates"); + AddMusic("EyeofCthulhuAlt", "CDMusic", "Alternates"); + AddMusic("KingSlimeAlt", "CDMusic", "Alternates"); + AddMusic("BloodMoonAlt", "CDMusic", "Alternates"); + AddMusic("CrimsonAlt", "CDMusic", "Alternates"); + AddMusic("RainAlt", "CDMusic", "Alternates"); + AddMusic("Space", "HeartPlusUp", "Biomes"); + AddMusic("Underworld", "HeartPlusUp", "Biomes"); + //AddMusic("Aether", "HeartPlusUp", "Biomes"); + //AddMusic("Graveyard", "HeartPlusUp", "Biomes"); + AddMusic("Meteorite", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier6", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier5", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier4", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier3", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier2", "HeartPlusUp", "Biomes"); + AddMusic("WorkshopTier1", "HeartPlusUp", "Biomes"); + AddMusic("TownNight", "HeartPlusUp", "Biomes"); + AddMusic("TownNight_Noiseless", "HeartPlusUp", "Biomes"); + AddMusic("TownDay", "HeartPlusUp", "Biomes"); + //AddMusic("JungleTemple", "Universe", "Biomes"); + AddMusic("Dungeon", "HeartPlusUp", "Biomes"); + AddMusic("GlowingMushroomFields", "HeartPlusUp", "Biomes"); + AddMusic("Corruption", "HeartPlusUp", "Biomes"); + AddMusic("CorruptionUnderground", "HeartPlusUp", "Biomes"); + AddMusic("Crimson", "SkippyZii", "Biomes"); + AddMusic("CrimsonUnderground", "SkippyZii", "Biomes"); + AddMusic("Geodes", "HeartPlusUp", "Biomes"); + AddMusic("Tundra", "HeartPlusUp", "Biomes"); + AddMusic("TundraUnderground", "HeartPlusUp", "Biomes"); + //AddMusic("JungleNight", "HeartPlusUp", "Biomes"); + //AddMusic("JungleDay", "HeartPlusUp", "Biomes"); + //AddMusic("JungleUndergroundHardmode", "HeartPlusUp", "Biomes"); + //AddMusic("JungleUnderground", "HeartPlusUp", "Biomes"); + //AddMusic("Hallow", "HeartPlusUp", "Biomes"); + //AddMusic("HallowUnderground", "HeartPlusUp", "Biomes"); + //AddMusic("DesertUnderground", "HeartPlusUp", "Biomes"); + //AddMusic("UndergroundHardmode", "HeartPlusUp", "Biomes"); + AddMusic("Caverns", "HeartPlusUp", "Biomes"); + AddMusic("Underground", "HeartPlusUp", "Biomes"); + AddMusic("OceanNight", "HeartPlusUp", "Biomes"); + AddMusic("OceanDay", "HeartPlusUp", "Biomes"); + AddMusic("Desert", "HeartPlusUp", "Biomes"); + AddMusic("ForestNight", "HeartPlusUp", "Biomes"); + AddMusic("ForestDayEvening", "HeartPlusUp", "Biomes"); + AddMusic("ForestDayAfternoon", "HeartPlusUp", "Biomes"); + AddMusic("ForestDayMorning", "HeartPlusUp", "Biomes"); + AddMusic("ForestDayDawn", "HeartPlusUp", "Biomes"); + AddMusic("MoonLord", "psykomatic", "Bosses"); + //AddMusic("LunaticCultist", "HeartPlusUp", "Bosses"); + //AddMusic("EmpressofLight", "HeartPlusUp", "Bosses"); + //AddMusic("DukeFishron", "Universe", "Bosses"); + //AddMusic("Golem", "Universe", "Bosses"); + //AddMusic("Plantera", "HeartPlusUp", "Bosses"); + //AddMusic("MechanicalTrio", "HeartPlusUp", "Bosses"); + //AddMusic("SkeletronPrime", "HeartPlusUp", "Bosses"); + //AddMusic("Twins", "HeartPlusUp", "Bosses"); + //AddMusic("Destroyer", "HeartPlusUp", "Bosses"); + //AddMusic("QueenSlime", "HeartPlusUp", "Bosses"); + AddMusic("WallofFlesh", "HeartPlusUp", "Bosses"); + AddMusic("Skeletron", "HeartPlusUp", "Bosses"); + //AddMusic("QueenBee", "HeartPlusUp", "Bosses"); + AddMusic("BrainofCthulhu", "HeartPlusUpFeature2", "Bosses"); + AddMusic("EaterofWorlds", "HeartPlusUp", "Bosses"); + AddMusic("EyeofCthulhu", "HeartPlusUpFeature1", "Bosses"); + AddMusic("KingSlime", "HeartPlusUp", "Bosses"); + //AddMusic("FrostMoon", "HeartPlusUp", "Events"); + //AddMusic("PumpkinMoon", "HeartPlusUp", "Events"); + //AddMusic("TorchGod", "HeartPlusUp", "Events"); + //AddMusic("LunarTowersSolar", "HeartPlusUp", "Events"); + //AddMusic("LunarTowersNebula", "HeartPlusUp", "Events"); + //AddMusic("LunarTowersVortex", "HeartPlusUp", "Events"); + //AddMusic("LunarTowersStardust", "HeartPlusUp", "Events"); + //AddMusic("MartianMadness", "HeartPlusUp", "Events"); + //AddMusic("PirateInvasion", "HeartPlusUp", "Events"); + //AddMusic("FrostLegion", "HeartPlusUp", "Events"); + //AddMusic("GoblinArmy", "HeartPlusUp", "Events"); + //AddMusic("SolarEclipse", "HeartPlusUp", "Events"); + AddMusic("BloodMoonDeath", "Thriplerex", "Events"); + AddMusic("BloodMoon", "Thriplerex", "Events"); + AddMusic("SlimeRain", "HeartPlusUp", "Events"); + //AddMusic("Blizzard", "Universe", "Events"); + //AddMusic("Sandstorm", "Universe", "Events"); + //AddMusic("Thunderstorm", "Universe", "Events"); + AddMusic("Rain", "HeartPlusUp", "Events"); + //AddMusic("WindyDay", "HeartPlusUp", "Events"); + AddMusic("LanternFestival", "HeartPlusUp", "Events"); + AddMusic("HardmodeInterlude", "Salvati", "Misc"); + AddMusic("FalseEpilogue", "HeartPlusUp", "Misc"); + //AddMusic("DragonsLull", "HeartPlusUp", "Misc"); + AddMusic("RainLegacy", "HeartPlusUp", "Misc"); + //AddMusic("ImpendingDoom", "HeartPlusUp", "Misc"); + //AddMusic("CultistRitual", "HeartPlusUp", "Misc"); + //AddMusic("ImminentDestruction", "HeartPlusUp", "Misc"); + } + } +} diff --git a/Common/Music/AmbienceScenes.cs b/Common/Music/AmbienceScenes.cs new file mode 100644 index 0000000..a464196 --- /dev/null +++ b/Common/Music/AmbienceScenes.cs @@ -0,0 +1,690 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.Music +{ + public class AmbienceRandomness : ModSystem + { + public int prevMusic; + + public bool rollAmbience; + + public override void PostUpdateEverything() + { + if (Main.curMusic != prevMusic) + { + if (ModContent.GetInstance().AmbienceFrequency > 0) + { + rollAmbience = Main.rand.NextFloat(1) <= ModContent.GetInstance().AmbienceFrequency / 100; + } + else + { + rollAmbience = false; + } + } + prevMusic = Main.curMusic; + } + } + public abstract class AmbienceBaseScene : ModSceneEffect + { + public virtual string Path { get; } + + public virtual SceneEffectPriority ScenePriority { get; } + + public override int Music => MusicPathing.GetAmbienceSlot(Path); + + public override SceneEffectPriority Priority => (Main.LocalPlayer.townNPCs > 2f || ModContent.GetInstance().IsSceneEffectActive(Main.LocalPlayer)) ? SceneEffectPriority.Environment : ScenePriority; + + public override float GetWeight(Player player) + { + if (ScenePriority == SceneEffectPriority.Environment) + { + return 0.63f; + } + if (ScenePriority == SceneEffectPriority.BiomeHigh) + { + return 0.62f; + } + if (ScenePriority == SceneEffectPriority.BiomeMedium) + { + return 0.61f; + } + + return 0.6f; + } + + public override bool IsSceneEffectActive(Player player) + { + return AreAmbienceConditionsMet(); + } + + public static bool AreAmbienceConditionsMet() + { + return ModContent.GetInstance().rollAmbience || ModContent.GetInstance().AmbienceFrequency == 100; + } + } + [JITWhenModsEnabled("CalamityMod")] + public class BioLab_Ambience : AmbienceBaseScene + { + public static float sunkenSeaLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.SunkenSeaLabCenter, Main.LocalPlayer.Center); + + public static float planetoidLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.PlanetoidLabCenter, Main.LocalPlayer.Center); + + public static float jungleLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.JungleLabCenter, Main.LocalPlayer.Center); + + public static float hellLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.HellLabCenter, Main.LocalPlayer.Center); + + public static float iceLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.IceLabCenter, Main.LocalPlayer.Center); + + public static float cavernLabDistance => Vector2.DistanceSquared(CalamityMod.World.CalamityWorld.CavernLabCenter, Main.LocalPlayer.Center); + + public override string Path => "BioLab"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + Tile backWall = Framing.GetTileSafely((int)(player.Center.X / 16), (int)(player.Center.Y / 16)); + + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + double labRadius = Math.Pow(80f * 16f, 2); + + bool behindLabWall; + bool nearBioLabPoint; + + if (calamityMod) + { + behindLabWall = + backWall.WallType == WallID.ObsidianBrick || + backWall.WallType == WallID.Glass || + backWall.WallType == WallID.SnowWallUnsafe || + backWall.WallType == WallID.IceUnsafe || + backWall.WallType == WallID.Waterfall || + backWall.WallType == WallID.Lavafall || + backWall.WallType == WallID.IronBrick || + backWall.WallType == calamity.Find("AstralIceWall").Type || + backWall.WallType == calamity.Find("AstralSnowWall").Type || + backWall.WallType == calamity.Find("HavocplateWall").Type || + backWall.WallType == calamity.Find("CinderplateWall").Type || + backWall.WallType == calamity.Find("ElumplateWall").Type || + backWall.WallType == calamity.Find("HazardChevronWall").Type || + backWall.WallType == calamity.Find("LaboratoryPanelWall").Type || + backWall.WallType == calamity.Find("LaboratoryPlateBeam").Type || + backWall.WallType == calamity.Find("LaboratoryPlatePillar").Type || + backWall.WallType == calamity.Find("LaboratoryPlatingWall").Type || + backWall.WallType == calamity.Find("NavyplateWall").Type || + backWall.WallType == calamity.Find("PlagueContainmentCellsWall").Type || + backWall.WallType == calamity.Find("PlaguedPlateWall").Type || + backWall.WallType == calamity.Find("RustedPlatePillar").Type || + backWall.WallType == calamity.Find("RustedPlatingWall").Type; + + nearBioLabPoint = + sunkenSeaLabDistance <= labRadius || + planetoidLabDistance <= labRadius || + jungleLabDistance <= labRadius || + hellLabDistance <= labRadius || + iceLabDistance <= labRadius || + cavernLabDistance <= labRadius; + } + else + { + behindLabWall = false; + nearBioLabPoint = false; + } + + return calamityMod && TileCounts.labTileCount > 150 && behindLabWall && nearBioLabPoint && base.IsSceneEffectActive(player); + } + } + public class Blizzard_Ambience : AmbienceBaseScene + { + public override string Path => "Tundra"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Sandstorm_Ambience : AmbienceBaseScene + { + public override string Path => "Sandstorm"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class RainHeavy_Ambience : AmbienceBaseScene + { + public override string Path => "RainHeavy"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && Main.maxRaining >= 0.6 && base.IsSceneEffectActive(player); + } + } + public class RainNormal_Ambience : AmbienceBaseScene + { + public override string Path => "RainNormal"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && Main.maxRaining >= 0.4 && Main.maxRaining < 0.6 && base.IsSceneEffectActive(player); + } + } + public class RainLight_Ambience : AmbienceBaseScene + { + public override string Path => "RainLight"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && Main.maxRaining < 0.4 && base.IsSceneEffectActive(player); + } + } + public class JungleTemple_Ambience : AmbienceBaseScene + { + public override string Path => "JungleTemple"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Dungeon_Ambience : AmbienceBaseScene + { + public override string Path => "Dungeon"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Space_Remix_Ambience : AmbienceBaseScene + { + public override string Path => "Space"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Space_Ambience : AmbienceBaseScene + { + public override string Path => "Space"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class BrimstoneCrags_Ambience : AmbienceBaseScene + { + public override string Path => "BrimstoneCrags"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneBrimstoneCrags && base.IsSceneEffectActive(player); + } + } + public class Underworld_Ambience : AmbienceBaseScene + { + public override string Path => "Underworld"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class AbyssLayer4_Ambience : AmbienceBaseScene + { + public override string Path => "AbyssLayer4"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneVoidAbyss && base.IsSceneEffectActive(player); + } + } + public class AbyssLayer3_Ambience : AmbienceBaseScene + { + public override string Path => "AbyssLayer3"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneDeepAbyss && base.IsSceneEffectActive(player); + } + } + public class AbyssLayer2_Ambience : AmbienceBaseScene + { + public override string Path => "AbyssLayer2"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneShallowAbyss && base.IsSceneEffectActive(player); + } + } + public class Aether_Ambience : AmbienceBaseScene + { + public override string Path => "HallowUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class AstralInfection_Ambience : AmbienceBaseScene + { + public override string Path => "AstralInfection"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneAstralInfection && player.ZoneOverworldHeight && base.IsSceneEffectActive(player); + } + } + public class AstralInfectionUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "AstralInfectionUnderground"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneAstralInfection && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && base.IsSceneEffectActive(player); + } + } + public class SulphurousSea_Ambience : AmbienceBaseScene + { + public override string Path => "SulphurousSea"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneSulfurSea && base.IsSceneEffectActive(player); + } + } + public class SunkenSea_Ambience : AmbienceBaseScene + { + public override string Path => "SunkenSea"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneSunkenSea && base.IsSceneEffectActive(player); + } + } + public class GlowingMushroomFields_Ambience : AmbienceBaseScene + { + public override string Path => Main.LocalPlayer.ZoneOverworldHeight ? "GlowingMushroomGrove" : "GlowingMushroomFields"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Corruption_Ambience : AmbienceBaseScene + { + public override string Path => "Corruption"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class CorruptionUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "CorruptionUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Crimson_Ambience : AmbienceBaseScene + { + public override string Path => "Crimson"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class CrimsonUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "CrimsonUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Meteorite_Ambience : AmbienceBaseScene + { + public override string Path => "Meteorite"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Graveyard_Ambience : AmbienceBaseScene + { + public override string Path => "Crimson"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class BeeHive_Remnants_Ambience : AmbienceBaseScene + { + public override string Path => "BeeHive"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneHive && !ModContent.GetInstance().DisableBeeHiveAmbience && base.IsSceneEffectActive(player); + } + } + public class BeeHive_Ambience : AmbienceBaseScene + { + public override string Path => "BeeHive"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + Tile backWall = Framing.GetTileSafely((int)(player.Center.X / 16), (int)(player.Center.Y / 16)); + + return backWall.WallType == WallID.HiveUnsafe && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor && !ModContent.GetInstance().DisableBeeHiveAmbience && base.IsSceneEffectActive(player); + } + } + public class SpiderCave_Ambience : AmbienceBaseScene + { + public override string Path => "SpiderCave"; + + public override SceneEffectPriority ScenePriority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + Tile backWall = Framing.GetTileSafely((int)(player.Center.X / 16), (int)(player.Center.Y / 16)); + + return backWall.WallType == WallID.SpiderUnsafe && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor && !ModContent.GetInstance().DisableSpiderCaveAmbience && base.IsSceneEffectActive(player); + } + } + public class Geodes_Remnants_Ambience : AmbienceBaseScene + { + public override string Path => "Caverns"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Geodes_Ambience : AmbienceBaseScene + { + public override string Path => "Caverns"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Jungle_Ambience : AmbienceBaseScene + { + public override string Path => "Jungle"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && base.IsSceneEffectActive(player); + } + } + public class JungleUnderground_Remnants_Ambience : AmbienceBaseScene + { + public override string Path => "JungleUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class JungleUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "JungleUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && base.IsSceneEffectActive(player); + } + } + public class Tundra_Ambience : AmbienceBaseScene + { + public override string Path => "Tundra"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class TundraUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "TundraUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Hallow_Ambience : AmbienceBaseScene + { + public override string Path => "Hallow"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class HallowUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "HallowUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Ocean_Ambience : AmbienceBaseScene + { + public override string Path => "Ocean"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && base.IsSceneEffectActive(player); + } + } + public class Desert_Remix_Ambience : AmbienceBaseScene + { + public override string Path => "Desert"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Desert_Ambience : AmbienceBaseScene + { + public override string Path => "Desert"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class DesertUnderground_Remnants_Ambience : AmbienceBaseScene + { + public override string Path => "DesertUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class DesertUnderground_Ambience : AmbienceBaseScene + { + public override string Path => "DesertUnderground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class ForestNight_Ambience : AmbienceBaseScene + { + public override string Path => "ForestNight"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class ForestDay_Ambience : AmbienceBaseScene + { + public override string Path => "ForestDay"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition3 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition4 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2 || condition3 || condition4) && base.IsSceneEffectActive(player); + } + } + public class Caverns_Ambience : AmbienceBaseScene + { + public override string Path => "Caverns"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = ModContent.GetInstance().IsSceneEffectActive(player); + bool condition2 = ModContent.GetInstance().IsSceneEffectActive(player); + + return (condition1 || condition2) && base.IsSceneEffectActive(player); + } + } + public class Underground_Ambience : AmbienceBaseScene + { + public override string Path => "Underground"; + + public override SceneEffectPriority ScenePriority => ModContent.GetInstance().Priority; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } +} \ No newline at end of file diff --git a/Common/Music/BiomeMusicScenes.cs b/Common/Music/BiomeMusicScenes.cs new file mode 100644 index 0000000..0ad08a8 --- /dev/null +++ b/Common/Music/BiomeMusicScenes.cs @@ -0,0 +1,701 @@ +using Terraria; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.Music +{ + public class JungleTemple : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("JungleTemple"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyDungeon : MusicID.Temple; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneLihzhardTemple; + } + } + public class Dungeon : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Dungeon"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneDungeon; + } + } + public class Aether : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("Aether"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyUGHallow : MusicID.Shimmer; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneShimmer; + } + } + public class WorkshopTier6 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier6"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = TileCounts.workbenchTileCount > 0 && TileCounts.draedonsForgeTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && TileCounts.draedonsForgeTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition3 = PlayerFlags.WorkshopTier6Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = PlayerFlags.WorkshopTier6Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4) && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class WorkshopTier5 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier5"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool noGreaterTierIsActive = !ModContent.GetInstance().IsSceneEffectActive(player); + + bool condition1 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && NPC.downedMoonlord && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && NPC.downedMoonlord && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + bool condition3 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.cosmicAnvilTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.cosmicAnvilTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition5 = PlayerFlags.WorkshopTier5Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition6 = PlayerFlags.WorkshopTier5Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4 || condition5 || condition6) && noGreaterTierIsActive && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class WorkshopTier4 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier4"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool noGreaterTierIsActive = + !(ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player)); + + bool condition1 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && NPC.downedPlantBoss && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && NPC.downedPlantBoss && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition3 = PlayerFlags.WorkshopTier4Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = PlayerFlags.WorkshopTier4Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4) && noGreaterTierIsActive && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class WorkshopTier3 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier3"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool noGreaterTierIsActive = + !(ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player)); + + bool condition1 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && TileCounts.adamantiteForgeTileCount > 0 && TileCounts.mythrilAnvilTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition3 = PlayerFlags.WorkshopTier3Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = PlayerFlags.WorkshopTier3Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4) && noGreaterTierIsActive && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class WorkshopTier2 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier2"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool noGreaterTierIsActive = + !(ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player)); + + bool condition1 = TileCounts.workbenchTileCount > 0 && (TileCounts.hellForgeTileCount > 0 || TileCounts.adamantiteForgeTileCount > 0) && TileCounts.ironAnvilTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && (TileCounts.hellForgeTileCount > 0 || TileCounts.adamantiteForgeTileCount > 0) && TileCounts.ironAnvilTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + bool condition3 = TileCounts.workbenchTileCount > 0 && TileCounts.hellForgeTileCount > 0 && (TileCounts.ironAnvilTileCount > 0 || TileCounts.mythrilAnvilTileCount > 0) && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = TileCounts.workbenchTileCount > 0 && TileCounts.hellForgeTileCount > 0 && (TileCounts.ironAnvilTileCount > 0 || TileCounts.mythrilAnvilTileCount > 0) && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition5 = PlayerFlags.WorkshopTier2Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition6 = PlayerFlags.WorkshopTier2Bosses && TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4 || condition5 || condition6) && noGreaterTierIsActive && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class WorkshopTier1 : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("WorkshopTier1"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool noGreaterTierIsActive = + !(ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player) || + ModContent.GetInstance().IsSceneEffectActive(player)); + + bool condition1 = TileCounts.workbenchTileCount > 0 && TileCounts.furnaceTileCount > 0 && TileCounts.ironAnvilTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition2 = TileCounts.workbenchTileCount > 0 && TileCounts.furnaceTileCount > 0 && TileCounts.ironAnvilTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + bool condition3 = TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (((PlayerFlags.notRaining && player.ZoneOverworldHeight) && (PlayerFlags.notInExcludedTownEvent && player.ZoneOverworldHeight) && (!LanternNight.LanternsUp && player.ZoneOverworldHeight)) || PlayerFlags.inSpace); + bool condition4 = TileCounts.storageHeartTileCount > 0 && TileCounts.craftingUnitTileCount > 0 && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + + return (condition1 || condition2 || condition3 || condition4) && noGreaterTierIsActive && PlayerFlags.notInExcludedTownBiome && ModContent.GetInstance().WorkshopThemes && ModContent.GetInstance().AmbienceFrequency != 100; + } + } + public class TownNight : ModSceneEffect + { + public override int Music => (PlayerFlags.inUgTown || PlayerFlags.inSpace) ? MusicPathing.GetMusicSlot("TownNight_Noiseless") : MusicPathing.GetMusicSlot("TownNight"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return !Main.dayTime && (PlayerFlags.inTown || PlayerFlags.inUgTown) && PlayerFlags.notInExcludedTownBiome && !PlayerFlags.WorkshopSceneActive; + } + } + public class TownDay : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("TownDay"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return Main.dayTime && (PlayerFlags.inTown || PlayerFlags.inUgTown) && PlayerFlags.notInExcludedTownBiome && !PlayerFlags.WorkshopSceneActive; + } + } + public class Space_Remix : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Space"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return Main.remixWorld && PlayerFlags.onSurface; + } + } + public class Space : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Space"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.inSpace && !(PlayerFlags.TownSceneActive || PlayerFlags.WorkshopSceneActive); + } + } + public class Underworld : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Underworld"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneUnderworldHeight && !(PlayerFlags.TownSceneActive || PlayerFlags.WorkshopSceneActive) && !(PlayerFlags.ZoneBrimstoneCrags || PlayerFlags.ZoneProfanedTemple); + } + } + public class AbyssLayer3Alt : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("AbyssLayer3Alt"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneDeepAbyss && !(PlayerFlags.TownSceneActive || PlayerFlags.WorkshopSceneActive) && ModContent.GetInstance().DeepAbyssAlt; + } + } + public class GlowingMushroomFields : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("GlowingMushroomFields"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneGlowshroom && !(PlayerFlags.ZoneAstralInfection || PlayerFlags.ZoneSunkenSea || PlayerFlags.ZoneAbyss); + } + } + public class Corruption : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Corruption"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneCorrupt && player.ZoneOverworldHeight && !(PlayerFlags.ZoneAstralInfection || PlayerFlags.ZoneSunkenSea || PlayerFlags.ZoneAbyss); + } + } + public class CorruptionUnderground : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("CorruptionUnderground"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneCorrupt && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !(PlayerFlags.ZoneAstralInfection || PlayerFlags.ZoneSunkenSea || PlayerFlags.ZoneAbyss); + } + } + public class Crimson : ModSceneEffect + { + public override int Music => ModContent.GetInstance().CrimsonAlt ? MusicPathing.GetMusicSlot("CrimsonAlt") : MusicPathing.GetMusicSlot("Crimson"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneCrimson && player.ZoneOverworldHeight && !(PlayerFlags.ZoneAstralInfection || PlayerFlags.ZoneSunkenSea || PlayerFlags.ZoneAbyss); + } + } + public class CrimsonUnderground : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("CrimsonUnderground"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneCrimson && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !(PlayerFlags.ZoneAstralInfection || PlayerFlags.ZoneSunkenSea || PlayerFlags.ZoneAbyss); + } + } + public class Meteorite : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Meteorite"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneMeteor; + } + } + public class Graveyard : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("Graveyard"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyEerie : MusicID.Graveyard; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneGraveyard; + } + } + public class Geodes_Remnants : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Geodes"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneGraniteCave || PlayerFlags.ZoneMarbleCave; + } + } + public class Geodes : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Geodes"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + Tile backWall = Framing.GetTileSafely((int)(player.Center.X / 16), (int)(player.Center.Y / 16)); + + bool condition1 = backWall.WallType == WallID.GraniteUnsafe && TileCounts.graniteTileCount >= 50; + bool condition2 = backWall.WallType == WallID.MarbleUnsafe && TileCounts.marbleTileCount >= 50; + bool condition3 = backWall.WallType == WallID.GraniteBlock && TileCounts.graniteTileCount >= 500; + bool condition4 = backWall.WallType == WallID.MarbleBlock && TileCounts.marbleTileCount >= 500; + + return (condition1 || condition2 || condition3 || condition4) && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor; + } + } + public class JungleNight : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("JungleNight"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return !Main.dayTime && player.ZoneJungle && (player.ZoneOverworldHeight || PlayerFlags.onRemixedSurface) && !player.ZoneMeteor && PlayerFlags.notRaining && !LanternNight.LanternsUp; + }*/ + } + public class JungleDay : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("JungleDay"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return Main.dayTime && player.ZoneJungle && (player.ZoneOverworldHeight || PlayerFlags.onRemixedSurface) && !player.ZoneMeteor && PlayerFlags.notRaining && !LanternNight.LanternsUp; + }*/ + } + public class JungleUndergroundHardmode : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("JungleUndergroundHardmode"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return Main.hardMode && player.ZoneJungle && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor; + }*/ + } + public class JungleUnderground_Remnants : ModSceneEffect + { + //public override int Music => /*Main.hardMode ? MusicPathing.GetMusicSlot("JungleUndergroundHardmode") : */MusicPathing.GetMusicSlot("JungleUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyJungle : MusicID.JungleUnderground; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZoneHive; + } + } + public class JungleUnderground : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("JungleUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyJungle : MusicID.JungleUnderground; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return /*!Main.hardMode && */player.ZoneJungle && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !player.ZoneMeteor; + } + } + public class Tundra : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Tundra"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneSnow && (player.ZoneOverworldHeight || PlayerFlags.onRemixedSurface); + } + } + public class TundraUnderground : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("TundraUnderground"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneSnow && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight); + } + } + public class Hallow : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("Hallow"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyHallow : MusicID.TheHallow; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.dayTime && player.ZoneHallow && player.ZoneOverworldHeight; + } + } + public class HallowUnderground : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("HallowUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyUGHallow : MusicID.UndergroundHallow; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneHallow && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight); + } + } + public class OceanNight : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("OceanNight"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return !Main.dayTime && player.ZoneBeach; + } + } + public class OceanDay : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("OceanDay"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.dayTime && player.ZoneBeach; + } + } + public class Desert_Remix : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Desert"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneDesert && PlayerFlags.onRemixedSurface; + } + } + public class Desert : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Desert"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneDesert && !PlayerFlags.ugDesertOriginalHeight; + } + } + public class DesertUnderground_Remnants : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("DesertUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyDesert : MusicID.UndergroundDesert; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeHigh; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return PlayerFlags.ZonePyramid; + } + } + public class DesertUnderground : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("DesertUnderground"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyDesert : MusicID.UndergroundDesert; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + bool ugDesertHeight = player.position.Y >= Main.worldSurface * 14 + (double)Main.screenHeight / 2; + + return player.ZoneUndergroundDesert && ugDesertHeight && !player.ZoneBeach; + } + } + public class ForestNight : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("ForestNight"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return !Main.dayTime && player.ZoneOverworldHeight && !player.ZoneBeach; + } + } + public class ForestDayEvening : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("ForestDayEvening"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.time >= 43200 && Main.dayTime && player.ZoneOverworldHeight && !(player.ZoneBeach || player.ZoneHallow); + } + } + public class ForestDayAfternoon : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("ForestDayAfternoon"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.time >= 27000 && Main.time < 43200 && Main.dayTime && player.ZoneOverworldHeight && !(player.ZoneBeach || player.ZoneHallow); + } + + public override void SpecialVisuals(Player player, bool isActive) + { + if (isActive && Main.time >= 27000 && Main.time < 27300 && Main.curMusic == Music && Main.musicFade[Main.curMusic] < 0.25f && Main.dayRate == 1) + { + Main.musicFade[Main.curMusic] = 0.25f; + } + } + } + public class ForestDayMorning : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("ForestDayMorning"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.time >= 10800 && Main.time < 27000 && Main.dayTime && player.ZoneOverworldHeight && !(player.ZoneBeach || player.ZoneHallow); + } + + public override void SpecialVisuals(Player player, bool isActive) + { + if (isActive && Main.time >= 10800 && Main.time < 11100 && Main.curMusic == Music && Main.musicFade[Main.curMusic] < 0.25f && Main.dayRate == 1) + { + Main.musicFade[Main.curMusic] = 0.25f; + } + } + } + public class ForestDayDawn : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("ForestDayDawn"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.time <= 10800 && Main.dayTime && player.ZoneOverworldHeight && !(player.ZoneBeach || player.ZoneHallow); + } + } + public class UndergroundHardmode : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("UndergroundHardmode"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return Main.hardMode && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !(player.ZoneBeach || player.ZoneHallow); + }*/ + } + public class Caverns : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Caverns"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = PlayerFlags.largeWorld && player.ZoneRockLayerHeight && player.position.Y > Main.rockLayer * 24.2 + Main.screenHeight / 2; + bool condition2 = PlayerFlags.mediumWorld && player.ZoneRockLayerHeight && player.position.Y > Main.rockLayer * 25.8 + Main.screenHeight / 2; + bool condition3 = PlayerFlags.smallWorld && player.ZoneRockLayerHeight && player.position.Y > Main.rockLayer * 25 + Main.screenHeight / 2; + + return /*!Main.hardMode && */(condition1 || condition2 || condition3) && !(player.ZoneBeach || player.ZoneHallow); + } + } + public class Underground : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("Underground"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeLow; + + public override bool IsSceneEffectActive(Player player) + { + return /*!Main.hardMode && */(player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight) && !(player.ZoneBeach || player.ZoneHallow); + } + } +} \ No newline at end of file diff --git a/Common/Music/BossMusicScenes.cs b/Common/Music/BossMusicScenes.cs new file mode 100644 index 0000000..5bfc76c --- /dev/null +++ b/Common/Music/BossMusicScenes.cs @@ -0,0 +1,341 @@ +using Microsoft.Xna.Framework; +using System; +using Terraria; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; +using UnCalamityModMusic.Common.ModCompatibility; + +namespace UnCalamityModMusic.Common.Music +{ + public class FalseEpilogue : ModSystem + { + public int FalseEpilogueMusicSlot = 0; + + public override void OnWorldLoad() + { + FalseEpilogueMusicSlot = MusicPathing.GetMusicSlot("FalseEpilogue"); + } + + public override void UpdateUI(GameTime gameTime) + { + Player player = Main.player[Main.myPlayer]; + + if (CreditsRollEvent.IsEventOngoing && !player.hasCreditsSceneMusicBox) + { + Main.musicBox2 = FalseEpilogueMusicSlot; + return; + } + } + } + public class MoonLord : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("MoonLord", "MoonLord"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossHigh); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.MoonLordCore) && Main.npc[NPC.FindFirstNPC(NPCID.MoonLordCore)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class ImpendingDoom : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("ImpendingDoom"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override bool IsSceneEffectActive(Player player) + { + return ImpendingDoomSystem.ImpendingDoomCountdown > 0 || NPC.MoonLordCountdown > 0; + } + + public override void SpecialVisuals(Player player, bool isActive) + { + if (NPC.MoonLordCountdown > 3540) + { + Main.musicFade[Main.curMusic] = 1f; + } + }*/ + } + public class LunaticCultist : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("LunaticCultist", "LunaticCultist"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.CultistBoss) && Main.npc[NPC.FindFirstNPC(NPCID.CultistBoss)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class CultistRitual : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("CultistRitual"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override bool IsSceneEffectActive(Player player) + { + return tablet.localAI[3] == 0f && NPC.AnyNPCs(NPCID.CultistTablet) && Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + return Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].localAI[3] != 0f && NPC.AnyNPCs(NPCID.CultistTablet) && Main.npc[NPC.FindFirstNPC(NPCID.CultistTablet)].Distance(player.Center) <= 1450f; + }*/ + } + public class EmpressofLight : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("EmpressofLight", "EmpressOfLight"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.HallowBoss) && Main.npc[NPC.FindFirstNPC(NPCID.HallowBoss)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class DukeFishron : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("DukeFishron", "DukeFishron"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.DukeFishron) && Main.npc[NPC.FindFirstNPC(NPCID.DukeFishron)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class Golem : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("Golem", "Golem"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.Golem) && Main.npc[NPC.FindFirstNPC(NPCID.Golem)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class Plantera : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("Plantera", "Plantera"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossMedium); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.Plantera) && Main.npc[NPC.FindFirstNPC(NPCID.Plantera)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class MechanicalTrio : ModSceneEffect + { + public static bool AllMechsActive = false; + + public override int Music => InfernumCompatibility.DecideOnMusicPath("MechanicalTrio", "MechBosses"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossMedium); + + public override bool IsSceneEffectActive(Player player) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + bool spazmatismActive = NPC.AnyNPCs(NPCID.Spazmatism) && Main.npc[NPC.FindFirstNPC(NPCID.Spazmatism)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool retinazerActive = NPC.AnyNPCs(NPCID.Retinazer) && Main.npc[NPC.FindFirstNPC(NPCID.Retinazer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool destroyerHeadActive = NPC.AnyNPCs(NPCID.TheDestroyer) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool destroyerBodyActive = NPC.AnyNPCs(NPCID.TheDestroyerBody) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerBody)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool destroyerTailActive = NPC.AnyNPCs(NPCID.TheDestroyerTail) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerTail)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool skeletronPrime1Active = NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool skeletronPrime2Active = calamityMod && calamity.Version >= new Version(2, 0, 4, 1) && NPC.AnyNPCs(calamity.Find("SkeletronPrime2").Type) && Main.npc[NPC.FindFirstNPC(calamity.Find("SkeletronPrime2").Type)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + bool skeletronPrimeActive = skeletronPrime1Active || skeletronPrime2Active; + bool twinsActive = spazmatismActive || retinazerActive; + bool destroyerActive = destroyerHeadActive || destroyerBodyActive || destroyerTailActive; + + if (destroyerActive && twinsActive && skeletronPrimeActive) + { + AllMechsActive = true; + } + else if (!destroyerActive && !twinsActive && !skeletronPrimeActive) + { + AllMechsActive = false; + } + + bool condition1 = AllMechsActive && skeletronPrimeActive; + bool condition2 = AllMechsActive && twinsActive; + bool condition3 = AllMechsActive && destroyerActive; + + return condition1 || condition2 || condition3; + } + } + public class SkeletronPrime : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("SkeletronPrime", "MechBosses"); + + public override SceneEffectPriority Priority => Main.masterMode && PlayerFlags.revengeanceMode ? InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossMedium) : InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + bool condition1 = NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition2 = calamityMod && calamity.Version >= new Version(2, 0, 4, 1) && NPC.AnyNPCs(calamity.Find("SkeletronPrime2").Type) && Main.npc[NPC.FindFirstNPC(calamity.Find("SkeletronPrime2").Type)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2; + } + } + public class Twins : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("Twins", "MechBosses"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = NPC.AnyNPCs(NPCID.Spazmatism) && Main.npc[NPC.FindFirstNPC(NPCID.Spazmatism)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition2 = NPC.AnyNPCs(NPCID.Retinazer) && Main.npc[NPC.FindFirstNPC(NPCID.Retinazer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2; + } + } + public class Destroyer : ModSceneEffect + { + public override int Music => ModContent.GetInstance().DestroyerAlt ? MusicPathing.GetMusicSlot("DestroyerAlt") : InfernumCompatibility.DecideOnMusicPath("Destroyer", "MechBosses"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = NPC.AnyNPCs(NPCID.TheDestroyer) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition2 = NPC.AnyNPCs(NPCID.TheDestroyerBody) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerBody)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = NPC.AnyNPCs(NPCID.TheDestroyerTail) && Main.npc[NPC.FindFirstNPC(NPCID.TheDestroyerTail)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3; + } + } + public class ImminentDestruction : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("ImminentDestruction"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override bool IsSceneEffectActive(Player player) + { + return ImminentDestructionSystem.ImminentDestructionCountdown > 0; + }*/ + } + public class QueenSlime : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("QueenSlime", "QueenSlime"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.QueenSlimeBoss) && Main.npc[NPC.FindFirstNPC(NPCID.QueenSlimeBoss)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class Dreadnautilus : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("BloodMoonDeath", "Dreadnautilus"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.BloodNautilus) && Main.npc[NPC.FindFirstNPC(NPCID.BloodNautilus)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class WallofFlesh : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("WallofFlesh", "WallOfFlesh"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = NPC.AnyNPCs(NPCID.WallofFlesh) && Main.npc[NPC.FindFirstNPC(NPCID.WallofFlesh)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition2 = NPC.AnyNPCs(NPCID.WallofFleshEye) && Main.npc[NPC.FindFirstNPC(NPCID.WallofFleshEye)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2; + } + } + public class Deerclops : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("Deerclops"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.Deerclops) && Main.npc[NPC.FindFirstNPC(NPCID.Deerclops)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + }*/ + } + public class Skeletron : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("Skeletron", "Skeletron"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.SkeletronHead) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronHead)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class QueenBee : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("QueenBee", "QueenBee"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.QueenBee) && Main.npc[NPC.FindFirstNPC(NPCID.QueenBee)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class BrainofCthulhu : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("BrainofCthulhu", "BrainOfCthulhu"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.BrainofCthulhu) && Main.npc[NPC.FindFirstNPC(NPCID.BrainofCthulhu)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class EaterofWorlds : ModSceneEffect + { + public override int Music => InfernumCompatibility.DecideOnMusicPath("EaterofWorlds", "EaterOfWorlds"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = NPC.AnyNPCs(NPCID.EaterofWorldsHead) && Main.npc[NPC.FindFirstNPC(NPCID.EaterofWorldsHead)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition2 = NPC.AnyNPCs(NPCID.EaterofWorldsBody) && Main.npc[NPC.FindFirstNPC(NPCID.EaterofWorldsBody)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = NPC.AnyNPCs(NPCID.EaterofWorldsTail) && Main.npc[NPC.FindFirstNPC(NPCID.EaterofWorldsTail)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3; + } + } + public class EyeofCthulhu : ModSceneEffect + { + public override int Music => ModContent.GetInstance().EyeofCthulhuAlt ? MusicPathing.GetMusicSlot("EyeofCthulhuAlt") : InfernumCompatibility.DecideOnMusicPath("EyeofCthulhu", "EyeOfCthulhu"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.EyeofCthulhu) && Main.npc[NPC.FindFirstNPC(NPCID.EyeofCthulhu)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } + public class KingSlime : ModSceneEffect + { + public override int Music => ModContent.GetInstance().KingSlimeAlt ? MusicPathing.GetMusicSlot("KingSlimeAlt") : InfernumCompatibility.DecideOnMusicPath("KingSlime", "KingSlime"); + + public override SceneEffectPriority Priority => InfernumCompatibility.DecideOnScenePriority(SceneEffectPriority.BossLow); + + public override bool IsSceneEffectActive(Player player) + { + return NPC.AnyNPCs(NPCID.KingSlime) && Main.npc[NPC.FindFirstNPC(NPCID.KingSlime)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + } + } +} diff --git a/Common/Music/EventMusicScenes.cs b/Common/Music/EventMusicScenes.cs new file mode 100644 index 0000000..6a73564 --- /dev/null +++ b/Common/Music/EventMusicScenes.cs @@ -0,0 +1,365 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.Music +{ + public class FrostMoon : ModSystem + { + /*public int FrostMoonMusicSlot = 0; + + public override void OnWorldLoad() + { + FrostMoonMusicSlot = MusicPathing.GetMusicSlot("FrostMoon"); + } + + public override void UpdateUI(GameTime gameTime) + { + Player player = Main.player[Main.myPlayer]; + + if (Main.snowMoon && Main.musicBox2 == -1 && (PlayerFlags.onSurface || Main.remixWorld)) + { + Main.musicBox2 = FrostMoonMusicSlot; + return; + } + }*/ + } + public class PumpkinMoon : ModSystem + { + /*public int PumpkinMoonMusicSlot = 0; + + public override void OnWorldLoad() + { + PumpkinMoonMusicSlot = MusicPathing.GetMusicSlot("PumpkinMoon"); + } + + public override void UpdateUI(GameTime gameTime) + { + Player player = Main.player[Main.myPlayer]; + + if (Main.pumpkinMoon && Main.musicBox2 == -1 && (PlayerFlags.onSurface || Main.remixWorld)) + { + Main.musicBox2 = PumpkinMoonMusicSlot; + return; + } + }*/ + } + public class TorchGod : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("TorchGod"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossHigh; + + public override bool IsSceneEffectActive(Player player) + { + return player.happyFunTorchTime || (NPC.AnyNPCs(NPCID.TorchGod) && Main.npc[NPC.FindFirstNPC(NPCID.TorchGod)].Distance(player.Center) <= PlayerFlags.MusicTileRange); + }*/ + } + public class LunarTowersSolar : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("LunarTowersSolar"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneTowerSolar; + }*/ + } + public class LunarTowersNebula : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("LunarTowersNebula"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneTowerNebula; + }*/ + } + public class LunarTowersVortex : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("LunarTowersVortex"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneTowerVortex; + }*/ + } + public class LunarTowersStardust : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("LunarTowersStardust"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override bool IsSceneEffectActive(Player player) + { + return player.ZoneTowerStardust; + }*/ + } + public class OldOnesArmy : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("OldOnesArmy"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = DD2Event.Ongoing && Main.invasionProgressNearInvasion; + bool condition2 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2EterniaCrystal) && Main.npc[NPC.FindFirstNPC(NPCID.DD2EterniaCrystal)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2LanePortal) && Main.npc[NPC.FindFirstNPC(NPCID.DD2LanePortal)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition4 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2Betsy) && Main.npc[NPC.FindFirstNPC(NPCID.DD2Betsy)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition5 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition6 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition7 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition8 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinBomberT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinBomberT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition9 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinBomberT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinBomberT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition10 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2GoblinBomberT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2GoblinBomberT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition11 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2WyvernT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2WyvernT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition12 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2WyvernT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2WyvernT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition13 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2WyvernT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2WyvernT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition14 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2JavelinstT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2JavelinstT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition15 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2JavelinstT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2JavelinstT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition16 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2JavelinstT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2JavelinstT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition17 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2DarkMageT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2DarkMageT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition18 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2DarkMageT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2DarkMageT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition19 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2SkeletonT1) && Main.npc[NPC.FindFirstNPC(NPCID.DD2SkeletonT1)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition20 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2SkeletonT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2SkeletonT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition21 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2WitherBeastT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2WitherBeastT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition22 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2WitherBeastT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2WitherBeastT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition23 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2DrakinT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2DrakinT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition24 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2DrakinT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2DrakinT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition25 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2KoboldWalkerT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2KoboldWalkerT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition26 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2KoboldWalkerT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2KoboldWalkerT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition27 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2KoboldFlyerT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2KoboldFlyerT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition28 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2KoboldFlyerT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2KoboldFlyerT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition29 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2OgreT2) && Main.npc[NPC.FindFirstNPC(NPCID.DD2OgreT2)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition30 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2OgreT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2OgreT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition31 = !DD2Event.Ongoing && NPC.AnyNPCs(NPCID.DD2LightningBugT3) && Main.npc[NPC.FindFirstNPC(NPCID.DD2LightningBugT3)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3 || condition4 || condition5 || condition6 || condition7 || condition8 || condition9 || condition10 || condition11 || condition12 || condition13 || condition14 || condition15 || condition16 || condition17 || condition18 || condition19 || condition20 || condition21 || condition22 || condition23 || condition24 || condition25 || condition26 || condition27 || condition28 || condition29 || condition30 || condition31; + }*/ + } + public class MartianMadness : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("MartianMadness"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = Main.invasionType == 4 && Main.invasionProgressNearInvasion; + bool condition2 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianSaucerCore) && Main.npc[NPC.FindFirstNPC(NPCID.MartianSaucerCore)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.ScutlixRider) && Main.npc[NPC.FindFirstNPC(NPCID.ScutlixRider)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition4 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.Scutlix) && Main.npc[NPC.FindFirstNPC(NPCID.Scutlix)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition5 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianWalker) && Main.npc[NPC.FindFirstNPC(NPCID.MartianWalker)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition6 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianDrone) && Main.npc[NPC.FindFirstNPC(NPCID.MartianDrone)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition7 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianTurret) && Main.npc[NPC.FindFirstNPC(NPCID.MartianTurret)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition8 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GigaZapper) && Main.npc[NPC.FindFirstNPC(NPCID.GigaZapper)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition9 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianEngineer) && Main.npc[NPC.FindFirstNPC(NPCID.MartianEngineer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition10 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MartianOfficer) && Main.npc[NPC.FindFirstNPC(NPCID.MartianOfficer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition11 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.RayGunner) && Main.npc[NPC.FindFirstNPC(NPCID.RayGunner)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition12 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GrayGrunt) && Main.npc[NPC.FindFirstNPC(NPCID.GrayGrunt)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition13 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.BrainScrambler) && Main.npc[NPC.FindFirstNPC(NPCID.BrainScrambler)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3 || condition4 || condition5 || condition6 || condition7 || condition8 || condition9 || condition10 || condition11 || condition12 || condition13; + }*/ + } + public class PirateInvasion : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("PirateInvasion"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = Main.invasionType == 3 && Main.invasionProgressNearInvasion; + bool condition2 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.Parrot) && Main.npc[NPC.FindFirstNPC(NPCID.Parrot)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateCaptain) && Main.npc[NPC.FindFirstNPC(NPCID.PirateCaptain)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition4 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateCorsair) && Main.npc[NPC.FindFirstNPC(NPCID.PirateCorsair)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition5 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateCrossbower) && Main.npc[NPC.FindFirstNPC(NPCID.PirateCrossbower)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition6 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateDeadeye) && Main.npc[NPC.FindFirstNPC(NPCID.PirateDeadeye)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition7 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateDeckhand) && Main.npc[NPC.FindFirstNPC(NPCID.PirateDeckhand)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition8 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.PirateShip) && Main.npc[NPC.FindFirstNPC(NPCID.PirateShip)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3 || condition4 || condition5 || condition6 || condition7 || condition8; + }*/ + } + public class FrostLegion : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("FrostLegion"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = Main.invasionType == 2 && Main.invasionProgressNearInvasion; + bool condition2 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.SnowmanGangsta) && Main.npc[NPC.FindFirstNPC(NPCID.SnowmanGangsta)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.MisterStabby) && Main.npc[NPC.FindFirstNPC(NPCID.MisterStabby)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition4 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.SnowBalla) && Main.npc[NPC.FindFirstNPC(NPCID.SnowBalla)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3 || condition4; + }*/ + } + public class GoblinArmy : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("GoblinArmy"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Event; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = Main.invasionType == 1 && Main.invasionProgressNearInvasion; + bool condition2 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinPeon) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinPeon)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition3 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinThief) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinThief)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition4 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinWarrior) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinWarrior)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition5 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinSorcerer) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinSorcerer)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition6 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinArcher) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinArcher)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + bool condition7 = Main.invasionType == 0 && NPC.AnyNPCs(NPCID.GoblinSummoner) && Main.npc[NPC.FindFirstNPC(NPCID.GoblinSummoner)].Distance(player.Center) <= PlayerFlags.MusicTileRange; + + return condition1 || condition2 || condition3 || condition4 || condition5 || condition6 || condition7; + }*/ + } + public class SolarEclipse : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("SolarEclipse"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyEerie : MusicID.Eclipse; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && Main.eclipse && PlayerFlags.onSurface; + bool condition2 = Main.remixWorld && Main.eclipse && (double)Main.LocalPlayer.position.Y > Main.rockLayer * 16.0 && !(PlayerFlags.ZoneBrimstoneCrags || PlayerFlags.ZoneProfanedTemple); + + return condition1 || condition2; + } + } + public class BloodMoon : ModSceneEffect + { + public override int Music => ModContent.GetInstance().BloodMoonAlt ? MusicPathing.GetMusicSlot("BloodMoonAlt") : (PlayerFlags.deathMode ? MusicPathing.GetMusicSlot("BloodMoonDeath") : MusicPathing.GetMusicSlot("BloodMoon")); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && Main.bloodMoon && PlayerFlags.onSurface && !(PlayerFlags.inSpace || player.ZoneCorrupt || player.ZoneCrimson || PlayerFlags.ZoneAstralInfection); + bool condition2 = Main.remixWorld && Main.bloodMoon && (double)Main.LocalPlayer.position.Y > Main.rockLayer * 16.0 && player.position.Y <= (float)(Main.UnderworldLayer * 16) && !(player.ZoneCorrupt || player.ZoneCrimson || PlayerFlags.ZoneAstralInfection); + bool condition3 = Main.remixWorld && Main.bloodMoon && player.position.Y > (float)(Main.UnderworldLayer * 16) && (double)(player.Center.X / 16f) > (double)Main.maxTilesX * 0.37 + 50.0 && (double)(player.Center.X / 16f) < (double)Main.maxTilesX * 0.63; + + return condition1 || condition2 || condition3; + } + } + public class Blizzard : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("Blizzard"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && PlayerFlags.isRaining && player.ZoneSnow && PlayerFlags.onSurface && !PlayerFlags.ZoneAstralInfection && !(Main.bloodMoon || Main.eclipse); + bool condition2 = Main.remixWorld && PlayerFlags.isRaining && player.ZoneSnow && PlayerFlags.onRemixedSurface && !PlayerFlags.ZoneAstralInfection && !(Main.bloodMoon || Main.eclipse); + + return condition1 || condition2; + }*/ + } + public class Sandstorm : ModSceneEffect + { + //public override int Music => MusicPathing.GetMusicSlot("Sandstorm"); + public override int Music + { + get + { + bool otherworldMusicActive = PlayerFlags.SwapMusic(); + return otherworldMusicActive ? MusicID.OtherworldlyDesert : MusicID.Sandstorm; + } + } + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && PlayerFlags.ZoneSandstorm && !PlayerFlags.ugDesertOriginalHeight && !PlayerFlags.ZoneAstralInfection && !(Main.bloodMoon || Main.eclipse); + bool condition2 = Main.remixWorld && PlayerFlags.ZoneSandstorm && PlayerFlags.onRemixedSurface && !PlayerFlags.ZoneAstralInfection && !(Main.bloodMoon || Main.eclipse); + + return condition1 || condition2; + } + } + public class SlimeRain : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("SlimeRain"); + + public override SceneEffectPriority Priority => SceneEffectPriority.Environment; + + public override bool IsSceneEffectActive(Player player) + { + return Main.slimeRain && PlayerFlags.onSurface && !(player.ZoneGraveyard || PlayerFlags.inSpace) && !(Main.bloodMoon || Main.eclipse); + } + } + public class Thunderstorm : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("Thunderstorm"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && Main._shouldUseStormMusic && PlayerFlags.ZoneOverworldHeightExtra && !(player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + bool condition2 = Main.remixWorld && Main._shouldUseStormMusic && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + + return condition1 || condition2; + }*/ + } + public class Rain : ModSceneEffect + { + public override int Music => ModContent.GetInstance().RainAlt ? MusicPathing.GetMusicSlot("RainAlt") : MusicPathing.GetMusicSlot("Rain"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && PlayerFlags.isRaining && PlayerFlags.ZoneOverworldHeightExtra && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + bool condition2 = Main.remixWorld && PlayerFlags.isRaining && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(/*Main._shouldUseStormMusic || */player.ZoneSnow || player.ZoneGraveyard || player.ZoneMeteor); + + return condition1 || condition2; + } + } + public class WindyDay : ModSceneEffect + { + /*public override int Music => MusicPathing.GetMusicSlot("WindyDay"); + + public override SceneEffectPriority Priority => SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + bool condition1 = !Main.remixWorld && Main._shouldUseWindyDayMusic && PlayerFlags.ZoneOverworldHeightExtra && !(player.ZoneDesert || player.ZoneBeach || player.ZoneSnow || player.ZoneJungle || player.ZoneGraveyard || player.ZoneMeteor); + bool condition2 = Main.remixWorld && Main._shouldUseWindyDayMusic && (double)(player.position.Y / 16f) > Main.rockLayer && player.position.Y / 16f < (float)(Main.maxTilesY - 350) && !(player.ZoneDesert || player.ZoneBeach || player.ZoneSnow || player.ZoneJungle || player.ZoneGraveyard || player.ZoneMeteor); + + return condition1 || condition2; + }*/ + } + public class LanternFestival : ModSceneEffect + { + public override int Music => MusicPathing.GetMusicSlot("LanternFestival"); + + public override SceneEffectPriority Priority => PlayerFlags.inTown ? SceneEffectPriority.Environment : SceneEffectPriority.BiomeMedium; + + public override bool IsSceneEffectActive(Player player) + { + return LanternNight.LanternsUp && PlayerFlags.ZoneOverworldHeightExtra && PlayerFlags.notRaining && !(player.ZoneGraveyard || player.ZoneMeteor); + } + } +} \ No newline at end of file diff --git a/Common/Music/LureOverrideMusicScenes.cs b/Common/Music/LureOverrideMusicScenes.cs new file mode 100644 index 0000000..8400f79 --- /dev/null +++ b/Common/Music/LureOverrideMusicScenes.cs @@ -0,0 +1,99 @@ +using Terraria; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common.Music +{ + public abstract class LureOverrideBaseScene : ModSceneEffect + { + public virtual string Path { get; } + + public override int Music => ModContent.GetInstance().AmbienceFrequency > 0 ? MusicPathing.GetAmbienceSlot(Path) : MusicPathing.GetMusicSlot(Path); + + public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; + + public override float GetWeight(Player player) => 0.51f; + + public override bool IsSceneEffectActive(Player player) + { + return IsAnahitaLureActive() && ModContent.GetInstance().OverrideAnahitasLure; + } + + public static bool IsAnahitaLureActive() + { + return ModLoader.TryGetMod("CalamityMod", out Mod calamity) && NPC.AnyNPCs(calamity.Find("LeviathanStart").Type); + } + } + public class RainHeavy_Ambience_LureOverride : LureOverrideBaseScene + { + public override string Path => "RainHeavy"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class RainNormal_Ambience_LureOverride : LureOverrideBaseScene + { + public override string Path => "RainNormal"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class RainLight_Ambience_LureOverride : LureOverrideBaseScene + { + public override string Path => "RainLight"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Ocean_Ambience_LureOverride : LureOverrideBaseScene + { + public override string Path => "Ocean"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && !(ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player)) && base.IsSceneEffectActive(player); + } + } + public class Thunderstorm_LureOverride : LureOverrideBaseScene + { + public override string Path => "Thunderstorm"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class Rain_LureOverride : LureOverrideBaseScene + { + public override string Path => ModContent.GetInstance().RainAlt ? "RainAlt" : "Rain"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && !ModContent.GetInstance().IsSceneEffectActive(player) && base.IsSceneEffectActive(player); + } + } + public class OceanNight_LureOverride : LureOverrideBaseScene + { + public override string Path => "OceanNight"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && !(ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player)) && base.IsSceneEffectActive(player); + } + } + public class OceanDay_LureOverride : LureOverrideBaseScene + { + public override string Path => "OceanDay"; + + public override bool IsSceneEffectActive(Player player) + { + return ModContent.GetInstance().IsSceneEffectActive(player) && !(ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player)) && base.IsSceneEffectActive(player); + } + } +} \ No newline at end of file diff --git a/Common/MusicBoxBase.cs b/Common/MusicBoxBase.cs new file mode 100644 index 0000000..20c22d8 --- /dev/null +++ b/Common/MusicBoxBase.cs @@ -0,0 +1,108 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent.Drawing; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using Terraria.ObjectData; +using Terraria.Utilities; + +namespace UnCalamityModMusic.Common +{ + public abstract class MusicBoxItem : ModItem + { + public abstract int MusicBoxTile { get; } + + public virtual int? MusicBoxTileAlt { get; } = null; + + public abstract string MusicFilePath { get; } + + public override void SetStaticDefaults() + { + ItemID.Sets.CanGetPrefixes[Type] = false; + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.MusicBox; + + if (!String.IsNullOrEmpty(MusicFilePath) && MusicPathing.GetMusicSlot(MusicFilePath) > 0) + { + if (MusicBoxTileAlt == null) + { + MusicLoader.AddMusicBox(Mod, MusicPathing.GetMusicSlot(MusicFilePath), Type, MusicBoxTile); + } + else + { + MusicLoader.AddMusicBox(Mod, MusicPathing.GetMusicSlot(MusicFilePath), Type, MusicBoxTileAlt.Value); + } + } + } + + public override void SetDefaults() + { + Item.DefaultToMusicBox(MusicBoxTile); + } + } + + public abstract class MusicBoxTile : ModTile + { + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileObsidianKill[Type] = true; + TileID.Sets.HasOutlines[Type] = true; + TileID.Sets.DisableSmartCursor[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.Origin = new Point16(0, 1); + TileObjectData.newTile.LavaDeath = false; + TileObjectData.newTile.DrawYOffset = 2; + TileObjectData.newTile.StyleLineSkip = 2; + TileObjectData.addTile(Type); + + AddMapEntry(new Color(191, 142, 111), Language.GetText("ItemName.MusicBox")); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = TileLoader.GetItemDropFromTypeAndStyle(Type); + } + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool CreateDust(int i, int j, ref int type) => false; + + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) + { + Tile tile = Main.tile[i, j]; + + if (Lighting.UpdateEveryFrame && new FastRandom(Main.TileFrameSeed).WithModifier(i, j).Next(4) != 0) + { + return; + } + + if (TileDrawing.IsVisible(tile) && tile.TileFrameX == 36 && tile.TileFrameY % 36 == 0 && (int)Main.timeForVisualEffects % 7 == 0 && Main.rand.NextBool(3)) + { + int goreType = Main.rand.Next(570, 573); + Vector2 position = new Vector2(i * 16 + 8, j * 16 - 8); + Vector2 velocity = new Vector2(Main.WindForVisuals * 2f, -0.5f); + velocity.X *= Main.rand.NextFloat(0.5f, 1.5f); + velocity.Y *= Main.rand.NextFloat(0.5f, 1.5f); + + if (goreType == 572) + { + position.X -= 8f; + } + else if (goreType == 571) + { + position.X -= 4f; + } + + Gore.NewGore(new EntitySource_TileUpdate(i, j), position, velocity, goreType, 0.8f); + } + } + } +} diff --git a/Common/MusicBoxConnecting.cs b/Common/MusicBoxConnecting.cs new file mode 100644 index 0000000..693f9a2 --- /dev/null +++ b/Common/MusicBoxConnecting.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using System.Reflection; +using Terraria; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class MusicBoxConnecting : ModSystem + { + private static void ConnectMusicBox(string musicKey, int musicBoxItem) + { + int musicPath = MusicPathing.GetMusicSlot(musicKey); + + if (musicPath > 0) + { + FieldInfo info = typeof(MusicLoader).GetField("musicToItem", BindingFlags.NonPublic | BindingFlags.Static); + var musicToItem = (Dictionary)info.GetValue(null); + + musicToItem[musicPath] = musicBoxItem; + } + } + + public override void PostSetupContent() + { + if (!Main.dedServ) + { + ConnectMusicBox("TownNight_Noiseless", ModContent.ItemType()); + } + } + } +} diff --git a/Common/MusicEvents.cs b/Common/MusicEvents.cs new file mode 100644 index 0000000..770e444 --- /dev/null +++ b/Common/MusicEvents.cs @@ -0,0 +1,321 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.IO; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Common +{ + //This system was created by Nycro for the main Calamity Mod + //An altered form of it is here so VCMM doesn't have to rely on external code + public record class MusicEventEntry(string Id, int Song, TimeSpan Length, TimeSpan IntroSilence, TimeSpan OutroSilence, Func ShouldPlay, Func Enabled); + + public class MusicEvents : ModSystem + { + #region Statics + + public static MusicEventEntry CurrentEvent { get; set; } = null; + + public static DateTime? TrackStart { get; set; } = null; + + public static DateTime? TrackEnd { get; set; } = null; + + public static int LastPlayedEvent { get; set; } = -1; + + public static TimeSpan? OutroSilence { get; set; } = null; + + public static bool NoFade { get; set; } = false; + + public static Thread EventTrackerThread { get; set; } = null; + + public static List PlayedEvents { get; set; } = []; + + public static List EventCollection { get; set; } = []; + + private static bool oldWorld { get; set; } = true; + + #endregion + + #region Events List + + public override void OnModLoad() + { + static void AddEntry(string eventId, string songName, TimeSpan length, Func shouldPlay, Func enabled, TimeSpan? introSilence = null, TimeSpan? outroSilence = null) + { + MusicEventEntry entry = new(eventId, MusicPathing.GetMusicSlot(songName), length, introSilence ?? TimeSpan.Zero, outroSilence ?? TimeSpan.Zero, shouldPlay, enabled); + EventCollection.Add(entry); + } + + // Hardmode Interlude + AddEntry("HardmodeStarted", "HardmodeInterlude", TimeSpan.FromSeconds(206.400d), () => Main.hardMode, () => ModContent.GetInstance().HardmodeInterlude); + } + + public override void Unload() => EventCollection.Clear(); + + #endregion + + #region Event Handling + + public override void PostUpdateTime() + { + // If the Boss Rush is active, any would-be music events should be cancelled out and marked as played + if (PlayerFlags.bossRushActive) + { + foreach (MusicEventEntry entry in EventCollection) + { + if (entry.ShouldPlay()) + PlayedEvents.Add(entry.Id); + } + + TrackStart = null; + LastPlayedEvent = -1; + OutroSilence = null; + + TrackEnd = null; + CurrentEvent = null; + + return; + } + + // If the player has already completed conditions to trigger certain music events, we don't + // want to queue a bunch of tracks to play as soon as they enter the world, so instead just mark them as played + if (oldWorld) + { + foreach (MusicEventEntry entry in EventCollection) + { + if (entry.ShouldPlay()) + PlayedEvents.Add(entry.Id); + } + + oldWorld = false; + } + + // If the event has just finished, we want a little silence before fading back to normal + if (TrackEnd is not null) + { + // `silence` is the time after a track ends before music goes back to normal + TimeSpan silence = OutroSilence.Value; + TimeSpan postTrack = DateTime.Now - TrackEnd.Value; + + // Play silence for the time specified + if (postTrack < silence) + { + int silenceSlot = MusicLoader.GetMusicSlot(Mod, "Assets/Sounds/Silence"); + Main.musicBox2 = silenceSlot; + } + + else + { + LastPlayedEvent = -1; + TrackEnd = null; + OutroSilence = null; + } + + return; + } + + // Only check for new events to play if none is currently playing + // This makes sure events always finish before a new one starts + if (CurrentEvent is null) + { + foreach (MusicEventEntry musicEvent in EventCollection) + { + // Make sure the event hasn't already played and SHOULD play + if (!PlayedEvents.Contains(musicEvent.Id) && musicEvent.ShouldPlay()) + { + // Even if an event isn't marked as enabled, it should be counted + // as "played" so it isn't played when the player doesn't expect it + PlayedEvents.Add(musicEvent.Id); + + // Events are always enabled on the server + if (Main.dedServ || musicEvent.Enabled()) + { + // Assign the current event and start time + CurrentEvent = musicEvent; + TrackStart = DateTime.Now + musicEvent.IntroSilence; + + // On clients, use a background thread to make sure the track always plays for exactly + // the specified length, regardless of if the game gets minimized, lags, or time becomes + // detangled from a consistent 60fps in any other way + if (!Main.dedServ) + { + EventTrackerThread = new(WatchMusicEvent); + EventTrackerThread.Start(); + } + + break; + } + } + } + } + + if (TrackStart is not null) + { + if (TrackStart > DateTime.Now) + { + int silenceSlot = MusicLoader.GetMusicSlot(Mod, "Assets/Sounds/Silence"); + Main.musicBox2 = silenceSlot; + NoFade = true; + } + + else + { + Main.musicBox2 = CurrentEvent.Song; + + if (NoFade) + { + Main.musicFade[CurrentEvent.Song] = 1f; + NoFade = false; + } + + // If the event has finished playing, mark the end as now and clear the current event + if (DateTime.Now - TrackStart >= CurrentEvent.Length) + { + int silenceSlot = MusicLoader.GetMusicSlot(Mod, "Assets/Sounds/Silence"); + Main.musicBox2 = silenceSlot; + Main.musicFade[CurrentEvent.Song] = 0f; + + TrackEnd = DateTime.Now; + LastPlayedEvent = CurrentEvent.Song; + OutroSilence = CurrentEvent.OutroSilence; + + TrackStart = null; + CurrentEvent = null; + } + } + } + } + + /// + /// Watches for the game minimizing at any point, and adjusts the amount of time to play the song for accordingly + /// + public static void WatchMusicEvent() + { + DateTime? minimized = null; + + while (CurrentEvent is not null) + { + bool musicPaused = !Main.instance.IsActive; + + if (musicPaused && !minimized.HasValue) + minimized = DateTime.Now; + + else if (!musicPaused && minimized.HasValue) + { + TrackStart += DateTime.Now - minimized.Value; + minimized = null; + } + } + + EventTrackerThread = null; + } + + #endregion + + #region Event Saving + + public override void SaveWorldData(TagCompound tag) + { + tag["VCMM:PlayedMusicEventCount"] = PlayedEvents.Count; + + for (int i = 0; i < PlayedEvents.Count; i++) + { + tag[$"VCMM:PlayedMusicEvent{i}"] = PlayedEvents[i]; + } + } + + public override void LoadWorldData(TagCompound tag) + { + PlayedEvents.Clear(); + + if (tag.TryGet("VCMM:PlayedMusicEventCount", out int playedMusicEventCount)) + { + for (int i = 0; i < playedMusicEventCount; i++) + { + if (tag.TryGet($"VCMM:PlayedMusicEvent{i}", out string playedEvent)) + PlayedEvents.Add(playedEvent); + } + } + + oldWorld = false; + } + + public override void OnWorldUnload() + { + oldWorld = true; + TrackStart = null; + TrackEnd = null; + CurrentEvent = null; + PlayedEvents.Clear(); + NoFade = false; + LastPlayedEvent = -1; + } + + #endregion + + #region Event Syncing + + public static void SendSyncRequest() + { + ModPacket packet = UnCalamityModMusic.Instance.GetPacket(); + packet.Write((byte)Netcode.VanillaCalamityModMusicMessageType.MusicEventSyncRequest); + packet.Send(); + } + + public static void FulfillSyncRequest(int requester) + { + // Only fulfill requests as the server host + if (!Main.dedServ) + { + return; + } + + ModPacket packet = UnCalamityModMusic.Instance.GetPacket(); + packet.Write((byte)Netcode.VanillaCalamityModMusicMessageType.MusicEventSyncResponse); + + int trackCount = PlayedEvents.Count; + packet.Write(trackCount); + + for (int i = 0; i < trackCount; i++) + { + packet.Write(PlayedEvents[i]); + } + + packet.Send(toClient: requester); + } + + public static void ReceiveSyncResponse(BinaryReader reader) + { + // Only receive info on clients + if (Main.dedServ) + { + return; + } + + PlayedEvents.Clear(); + int trackCount = reader.ReadInt32(); + + for (int i = 0; i < trackCount; i++) + { + PlayedEvents.Add(reader.ReadString()); + } + } + + #endregion + } + + public class MusicEventsPlayer : ModPlayer + { + public override void OnEnterWorld() + { + if (Main.netMode == NetmodeID.MultiplayerClient && Player.whoAmI != Main.myPlayer) + { + MusicEvents.SendSyncRequest(); + } + } + } +} diff --git a/Common/MusicPathing.cs b/Common/MusicPathing.cs new file mode 100644 index 0000000..f0a0510 --- /dev/null +++ b/Common/MusicPathing.cs @@ -0,0 +1,187 @@ +using System.Collections.Generic; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public static class MusicPathing + { + public static Dictionary musicPaths; + public static Dictionary ambiencePaths; + + public static void InitalizeMusicPaths(Mod mod) + { + musicPaths = new Dictionary + { + //Alternates + {"DestroyerAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/DestroyerAlt")}, + {"EyeofCthulhuAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/EyeofCthulhuAlt")}, + {"KingSlimeAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/KingSlimeAlt")}, + {"BloodMoonAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/BloodMoonAlt")}, + {"AbyssLayer3Alt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/AbyssLayer3Alt")}, + {"CrimsonAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/CrimsonAlt")}, + {"RainAlt", MusicLoader.GetMusicSlot(mod, "Assets/Music/Alternates/RainAlt")}, + + //Biomes + {"Space", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Space")}, + {"Underworld", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Underworld")}, + {"Aether", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Aether")}, + {"Graveyard", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Graveyard")}, + {"Meteorite", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Meteorite")}, + {"WorkshopTier6", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier6")}, + {"WorkshopTier5", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier5")}, + {"WorkshopTier4", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier4")}, + {"WorkshopTier3", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier3")}, + {"WorkshopTier2", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier2")}, + {"WorkshopTier1", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/WorkshopTier1")}, + {"TownNight_Noiseless", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/TownNight_Noiseless")}, + {"TownNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/TownNight")}, + {"TownDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/TownDay")}, + {"JungleTemple", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleTemple")}, + {"Dungeon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Dungeon")}, + {"GlowingMushroomGrove", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/GlowingMushroomGrove")}, + {"GlowingMushroomFields", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/GlowingMushroomFields")}, + {"Corruption", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Corruption")}, + {"CorruptionUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/CorruptionUnderground")}, + {"Crimson", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Crimson")}, + {"CrimsonUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/CrimsonUnderground")}, + {"Geodes", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Geodes")}, + {"Tundra", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Tundra")}, + {"TundraUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/TundraUnderground")}, + {"JungleNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleNight")}, + {"JungleDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleDay")}, + {"JungleUndergroundHardmode", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleUndergroundHardmode")}, + {"JungleUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/JungleUnderground")}, + {"Hallow", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Hallow")}, + {"HallowUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/HallowUnderground")}, + {"DesertUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/DesertUnderground")}, + {"UndergroundHardmode", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/UndergroundHardmode")}, + {"Caverns", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Caverns")}, + {"Underground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Underground")}, + {"OceanNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/OceanNight")}, + {"OceanDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/OceanDay")}, + {"Desert", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/Desert")}, + {"ForestNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/ForestNight")}, + {"ForestDayEvening", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/ForestDayEvening")}, + {"ForestDayAfternoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/ForestDayAfternoon")}, + {"ForestDayMorning", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/ForestDayMorning")}, + {"ForestDayDawn", MusicLoader.GetMusicSlot(mod, "Assets/Music/Biomes/ForestDayDawn")}, + + //Bosses + {"MoonLord", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/MoonLord")}, + {"LunaticCultist", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/LunaticCultist")}, + {"EmpressofLight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/EmpressofLight")}, + {"DukeFishron", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/DukeFishron")}, + {"Golem", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Golem")}, + {"Plantera", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Plantera")}, + {"MechanicalTrio", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/MechanicalTrio")}, + {"SkeletronPrime", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/SkeletronPrime")}, + {"Twins", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Twins")}, + {"Destroyer", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Destroyer")}, + {"QueenSlime", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/QueenSlime")}, + {"WallofFlesh", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/WallofFlesh")}, + {"Deerclops", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Deerclops")}, + {"Skeletron", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/Skeletron")}, + {"QueenBee", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/QueenBee")}, + {"BrainofCthulhu", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/BrainofCthulhu")}, + {"EaterofWorlds", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/EaterofWorlds")}, + {"EyeofCthulhu", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/EyeofCthulhu")}, + {"KingSlime", MusicLoader.GetMusicSlot(mod, "Assets/Music/Bosses/KingSlime")}, + + //Events + {"FrostMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/FrostMoon")}, + {"PumpkinMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/PumpkinMoon")}, + {"TorchGod", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/TorchGod")}, + {"LunarTowersSolar", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LunarTowersSolar")}, + {"LunarTowersNebula", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LunarTowersNebula")}, + {"LunarTowersVortex", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LunarTowersVortex")}, + {"LunarTowersStardust", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LunarTowersStardust")}, + {"OldOnesArmy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/OldOnesArmy")}, + {"MartianMadness", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/MartianMadness")}, + {"PirateInvasion", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/PirateInvasion")}, + {"FrostLegion", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/FrostLegion")}, + {"GoblinArmy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/GoblinArmy")}, + {"SolarEclipse", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/SolarEclipse")}, + {"BloodMoonDeath", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/BloodMoonDeath")}, + {"BloodMoon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/BloodMoon")}, + {"SlimeRain", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/SlimeRain")}, + {"Blizzard", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Blizzard")}, + {"Sandstorm", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Sandstorm")}, + {"Thunderstorm", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Thunderstorm")}, + {"Rain", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/Rain")}, + {"WindyDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/WindyDay")}, + {"LanternFestival", MusicLoader.GetMusicSlot(mod, "Assets/Music/Events/LanternFestival")}, + + //Misc + {"HardmodeInterlude", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/HardmodeInterlude")}, + {"FalseEpilogue", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/FalseEpilogue")}, + {"DragonsLull", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/DragonsLull")}, + {"RainLegacy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/RainLegacy")}, + {"ImpendingDoom", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/ImpendingDoom")}, + {"CultistRitual", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/CultistRitual")}, + {"ImminentDestruction", MusicLoader.GetMusicSlot(mod, "Assets/Music/Misc/ImminentDestruction")} + }; + + ambiencePaths = new Dictionary + { + //Ambience + {"BioLab", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/BioLab")}, + {"Sandstorm", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Sandstorm")}, + {"RainHeavy", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/RainHeavy")}, + {"RainNormal", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/RainNormal")}, + {"RainLight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/RainLight")}, + {"Space", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Space")}, + {"BrimstoneCrags", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/BrimstoneCrags")}, + {"Underworld", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Underworld")}, + {"Meteorite", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Meteorite")}, + {"JungleTemple", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/JungleTemple")}, + {"Dungeon", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Dungeon")}, + {"AstralInfection", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/AstralInfection")}, + {"AstralInfectionUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/AstralInfectionUnderground")}, + {"SulphurousSea", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/SulphurousSea")}, + {"AbyssLayer4", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/AbyssLayer4")}, + {"AbyssLayer3", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/AbyssLayer3")}, + {"AbyssLayer2", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/AbyssLayer2")}, + {"SunkenSea", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/SunkenSea")}, + {"GlowingMushroomGrove", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/GlowingMushroomGrove")}, + {"GlowingMushroomFields", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/GlowingMushroomFields")}, + {"Corruption", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Corruption")}, + {"CorruptionUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/CorruptionUnderground")}, + {"Crimson", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Crimson")}, + {"CrimsonUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/CrimsonUnderground")}, + {"BeeHive", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/BeeHive")}, + {"SpiderCave", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/SpiderCave")}, + {"Tundra", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Tundra")}, + {"TundraUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/TundraUnderground")}, + {"Jungle", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Jungle")}, + {"JungleUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/JungleUnderground")}, + {"Hallow", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Hallow")}, + {"HallowUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/HallowUnderground")}, + {"DesertUnderground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/DesertUnderground")}, + {"Caverns", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Caverns")}, + {"Underground", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Underground")}, + {"Ocean", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Ocean")}, + {"Desert", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/Desert")}, + {"ForestNight", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/ForestNight")}, + {"ForestDay", MusicLoader.GetMusicSlot(mod, "Assets/Music/Ambience/ForestDay")} + }; + } + + public static int GetMusicSlot(string key) + { + if (musicPaths.TryGetValue(key, out int slot)) + { + return slot; + } + return -1; + } + + public static int GetAmbienceSlot(string key) + { + if (ambiencePaths.TryGetValue(key, out int slot)) + { + return slot; + } + return -1; + } + } +} \ No newline at end of file diff --git a/Common/NPCShops.cs b/Common/NPCShops.cs new file mode 100644 index 0000000..66fe99d --- /dev/null +++ b/Common/NPCShops.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class NPCShops : GlobalNPC + { + public override void ModifyShop(NPCShop shop) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod && shop.NpcType == calamity.Find("FAP").Type) + { + shop.Add(ModContent.ItemType(), Condition.Hardmode); + shop.Add(ModContent.ItemType(), Condition.DownedMoonLord); + } + + if (!calamityMod && shop.NpcType == NPCID.Princess) + { + shop.Add(ModContent.ItemType(), Condition.Hardmode); + shop.Add(ModContent.ItemType(), Condition.DownedMoonLord); + } + } + } +} diff --git a/Common/Netcode.cs b/Common/Netcode.cs new file mode 100644 index 0000000..af1fe0e --- /dev/null +++ b/Common/Netcode.cs @@ -0,0 +1,62 @@ +using System.IO; +using System; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class Netcode + { + public enum VanillaCalamityModMusicMessageType : byte + { + MusicEventSyncRequest, + MusicEventSyncResponse + } + + public static void HandlePacket(Mod mod, BinaryReader reader, int whoAmI) + { + try + { + VanillaCalamityModMusicMessageType msgType = (VanillaCalamityModMusicMessageType)reader.ReadByte(); + switch (msgType) + { + case VanillaCalamityModMusicMessageType.MusicEventSyncRequest: + { + MusicEvents.FulfillSyncRequest(whoAmI); + break; + } + + case VanillaCalamityModMusicMessageType.MusicEventSyncResponse: + { + MusicEvents.ReceiveSyncResponse(reader); + break; + } + + default: + { + UnCalamityModMusic.Instance.Logger.Error($"Failed to parse VCMM packet: No VCMM packet exists with ID {msgType}."); + throw new Exception("Failed to parse VCMM packet: Invalid VCMM packet ID."); + } + } + } + catch (Exception e) + { + if (e is EndOfStreamException eose) + { + UnCalamityModMusic.Instance.Logger.Error("Failed to parse VCMM packet: Packet was too short, missing data, or otherwise corrupt.", eose); + } + else if (e is ObjectDisposedException ode) + { + UnCalamityModMusic.Instance.Logger.Error("Failed to parse VCMM packet: Packet reader disposed or destroyed.", ode); + } + else if (e is IOException ioe) + { + UnCalamityModMusic.Instance.Logger.Error("Failed to parse VCMM packet: An unknown I/O error occurred.", ioe); + } + else + { + throw; + } + } + } + } +} diff --git a/Common/PlayerFlags.cs b/Common/PlayerFlags.cs new file mode 100644 index 0000000..d5f5708 --- /dev/null +++ b/Common/PlayerFlags.cs @@ -0,0 +1,206 @@ +using System.Reflection; +using Terraria; +using Terraria.GameContent.Events; +using Terraria.ID; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class PlayerFlags : ModPlayer + { + public static bool onSurface; + public static bool onRemixedSurface; + public static bool inSpace; + public static bool inTown; + public static bool inUgTown; + public static bool isRaining; + public static bool notRaining; + public static bool largeWorld; + public static bool mediumWorld; + public static bool smallWorld; + public static bool notInExcludedTownBiome; + public static bool notInExcludedTownEvent; + public static bool ugDesertOriginalHeight; + public static bool ZoneSandstorm; + public static bool ZoneOverworldHeightExtra; + public static bool TownSceneActive; + public static bool WorkshopSceneActive; + + public static bool infernumMode; + public static bool deathMode; + public static bool revengeanceMode; + public static bool bossRushActive; + + public static bool ZoneBrimstoneCrags; + public static bool ZoneProfanedTemple; + public static bool ZoneAstralInfection; + public static bool ZoneSulfurSea; + public static bool ZoneAbyss; + public static bool ZoneShallowAbyss; + public static bool ZoneDeepAbyss; + public static bool ZoneVoidAbyss; + public static bool ZoneSunkenSea; + public static bool ZoneLostColosseum; + + public static bool downedSupremeCalamitas; + public static bool downedExoMechs; + public static bool downedYharon; + public static bool downedDevourerofGods; + public static bool downedOldDuke; + public static bool downedPolterghast; + public static bool downedSignus; + public static bool downedStormWeaver; + public static bool downedCeaselessVoid; + public static bool downedProvidence; + public static bool downedProfanedGuardians; + public static bool downedDragonfolly; + public static bool downedAstrumDeus; + public static bool downedRavager; + public static bool downedPlaguebringerGoliath; + public static bool downedAstrumAureus; + public static bool downedLeviathan; + public static bool downedCalamitasClone; + public static bool downedBrimstoneElemental; + public static bool downedAquaticScourge; + public static bool downedCryogen; + public static bool downedSlimeGod; + public static bool downedPerforators; + public static bool downedHiveMind; + + public static bool WorkshopTier6Bosses; + public static bool WorkshopTier5Bosses; + public static bool WorkshopTier4Bosses; + public static bool WorkshopTier3Bosses; + public static bool WorkshopTier2Bosses; + + public static bool ZonePyramid; + public static bool ZoneGraniteCave; + public static bool ZoneMarbleCave; + public static bool ZoneHive; + + public static float MusicTileRange = 525f * 16f; + + public override void PreUpdate() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + var infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + var remnantsMod = ModLoader.TryGetMod("Remnants", out Mod remnants); + var noTownMusic = ModLoader.TryGetMod("NoTownMusic", out Mod notownmusic); + + float spacef = remnantsMod ? 17f : 16f; + float spaceh = (float)Main.maxTilesX / 4200f; + spaceh *= spaceh; + + Player player = Main.player[Main.myPlayer]; + + onSurface = player.position.Y < Main.worldSurface * 16.0 + (double)Main.screenHeight / 2; + onRemixedSurface = Main.remixWorld && (double)player.position.Y / 16f > Main.rockLayer && player.position.Y / 16f < (float)Main.maxTilesY - 350; + inSpace = (float)((double)((Main.screenPosition.Y + (float)(Main.screenHeight / 2)) / spacef - (65f + 10f * spaceh)) / (Main.worldSurface / 5.0)) < 1f; + isRaining = Main.cloudAlpha > 0f; + notRaining = Main.cloudAlpha <= 0.01f; + largeWorld = Main.maxTilesY == 2400; + mediumWorld = Main.maxTilesY == 1800; + smallWorld = Main.maxTilesY == 1200; + notInExcludedTownBiome = !(player.ZoneGraveyard || player.ZoneShimmer || player.ZoneDungeon || player.ZoneLihzhardTemple || ZoneBrimstoneCrags || ZoneAbyss); + notInExcludedTownEvent = !(/*Main._shouldUseWindyDayMusic || */Main.slimeRain || ZoneSandstorm || Main.bloodMoon || Main.eclipse); + ugDesertOriginalHeight = (double)player.position.Y >= Main.worldSurface * 16.0 + (double)(Main.screenHeight / 2); + ZoneSandstorm = Sandstorm.Happening && player.ZoneDesert && !player.ZoneBeach; + ZoneOverworldHeightExtra = (!player.ZoneDesert && player.ZoneOverworldHeight) || (player.ZoneDesert && !ugDesertOriginalHeight); + TownSceneActive = ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player); + WorkshopSceneActive = ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player) || ModContent.GetInstance().IsSceneEffectActive(player); + + WorkshopTier6Bosses = downedExoMechs || downedSupremeCalamitas; + WorkshopTier5Bosses = NPC.downedMoonlord || downedProfanedGuardians || downedDragonfolly || downedProvidence || downedCeaselessVoid || downedStormWeaver || downedSignus || downedPolterghast || downedOldDuke || downedDevourerofGods || downedYharon; + WorkshopTier4Bosses = NPC.downedPlantBoss || downedLeviathan || downedAstrumAureus || NPC.downedGolemBoss || downedPlaguebringerGoliath || NPC.downedFishron || downedRavager || NPC.downedEmpressOfLight || NPC.downedAncientCultist || downedAstrumDeus; + WorkshopTier3Bosses = Main.hardMode || NPC.downedQueenSlime || downedCryogen || NPC.downedMechBossAny || downedAquaticScourge || downedBrimstoneElemental || downedCalamitasClone; + WorkshopTier2Bosses = downedHiveMind || downedPerforators || NPC.downedQueenBee || NPC.downedBoss3 || NPC.downedDeerclops || downedSlimeGod; + + if (noTownMusic) + { + inTown = false; + inUgTown = false; + } + else + { + if (player.ZoneShadowCandle || player.inventory[player.selectedItem].type == ItemID.ShadowCandle) + { + inTown = false; + inUgTown = false; + } + else + { + inTown = player.townNPCs > 2f && (((notRaining && player.ZoneOverworldHeight) && (notInExcludedTownEvent && player.ZoneOverworldHeight)) || inSpace); + inUgTown = player.townNPCs > 2f && (player.ZoneDirtLayerHeight || player.ZoneRockLayerHeight || player.ZoneUnderworldHeight); + } + } + + if (calamityMod) + { + ZoneBrimstoneCrags = (bool)calamity.Call("GetInZone", player, "crags"); + ZoneAstralInfection = (bool)calamity.Call("GetInZone", player, "astral"); + ZoneSulfurSea = (bool)calamity.Call("GetInZone", player, "sulfur") && !ZoneAbyss; + ZoneAbyss = (bool)calamity.Call("GetInZone", player, "abyss"); + ZoneShallowAbyss = (bool)calamity.Call("GetInZone", player, "layer1") || (bool)calamity.Call("GetInZone", player, "layer2"); + ZoneDeepAbyss = (bool)calamity.Call("GetInZone", player, "layer3"); + ZoneVoidAbyss = (bool)calamity.Call("GetInZone", player, "layer4"); + ZoneSunkenSea = (bool)calamity.Call("GetInZone", player, "sunkensea"); + + downedSupremeCalamitas = (bool)calamity.Call("GetBossDowned", "supremecalamitas"); + downedExoMechs = (bool)calamity.Call("GetBossDowned", "draedon"); + downedYharon = (bool)calamity.Call("GetBossDowned", "yharon"); + downedDevourerofGods = (bool)calamity.Call("GetBossDowned", "devourerofgods"); + downedOldDuke = (bool)calamity.Call("GetBossDowned", "oldduke"); + downedPolterghast = (bool)calamity.Call("GetBossDowned", "polterghast"); + downedSignus = (bool)calamity.Call("GetBossDowned", "signus"); + downedStormWeaver = (bool)calamity.Call("GetBossDowned", "stormweaver"); + downedCeaselessVoid = (bool)calamity.Call("GetBossDowned", "ceaselessvoid"); + downedProvidence = (bool)calamity.Call("GetBossDowned", "providence"); + downedProfanedGuardians = (bool)calamity.Call("GetBossDowned", "guardians"); + downedDragonfolly = (bool)calamity.Call("GetBossDowned", "dragonfolly"); + downedAstrumDeus = (bool)calamity.Call("GetBossDowned", "astrumdeus"); + downedRavager = (bool)calamity.Call("GetBossDowned", "ravager"); + downedPlaguebringerGoliath = (bool)calamity.Call("GetBossDowned", "plaguebringergoliath"); + downedAstrumAureus = (bool)calamity.Call("GetBossDowned", "astrumaureus"); + downedLeviathan = (bool)calamity.Call("GetBossDowned", "anahitaleviathan"); + downedCalamitasClone = (bool)calamity.Call("GetBossDowned", "calamitasclone"); + downedBrimstoneElemental = (bool)calamity.Call("GetBossDowned", "brimstoneelemental"); + downedAquaticScourge = (bool)calamity.Call("GetBossDowned", "aquaticscourge"); + downedCryogen = (bool)calamity.Call("GetBossDowned", "cryogen"); + downedSlimeGod = (bool)calamity.Call("GetBossDowned", "slimegod"); + downedPerforators = (bool)calamity.Call("GetBossDowned", "perforator"); + downedHiveMind = (bool)calamity.Call("GetBossDowned", "hivemind"); + + deathMode = (bool)calamity.Call("DifficultyActive", "death"); + revengeanceMode = (bool)calamity.Call("DifficultyActive", "revengeance"); + bossRushActive = (bool)calamity.Call("DifficultyActive", "bossrush"); + } + + if (infernumMod) + { + infernumMode = (bool)infernum.Call("GetInfernumActive"); + ZoneProfanedTemple = player.InModBiome(infernum.Find("ProfanedTempleBiome")); + ZoneLostColosseum = player.InModBiome(infernum.Find("LostColosseumBiome")); + } + + if (remnantsMod) + { + ZonePyramid = player.InModBiome(remnants.Find("Pyramid")); + ZoneGraniteCave = player.InModBiome(remnants.Find("GraniteCave")); + ZoneMarbleCave = player.InModBiome(remnants.Find("MarbleCave")); + ZoneHive = player.InModBiome(remnants.Find("Hive")); + } + } + + public static bool SwapMusic() + { + FieldInfo swapMusic = typeof(Main).GetField("swapMusic", BindingFlags.Static | BindingFlags.NonPublic); + + if (swapMusic != null) + { + return (bool)swapMusic.GetValue(null); + } + + return false; + } + } +} \ No newline at end of file diff --git a/Common/TileCounts.cs b/Common/TileCounts.cs new file mode 100644 index 0000000..6bff810 --- /dev/null +++ b/Common/TileCounts.cs @@ -0,0 +1,87 @@ +using System; +using Terraria.ID; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Common +{ + public class TileCounts : ModSystem + { + public static int graniteTileCount; + public static int marbleTileCount; + + public static int workbenchTileCount; + public static int furnaceTileCount; + public static int ironAnvilTileCount; + public static int hellForgeTileCount; + public static int mythrilAnvilTileCount; + public static int adamantiteForgeTileCount; + + public static int cosmicAnvilTileCount; + public static int draedonsForgeTileCount; + + public static int labTileCount; + + public static int storageHeartTileCount; + public static int craftingUnitTileCount; + + public override void TileCountsAvailable(ReadOnlySpan tileCounts) + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + var calamityVanities = ModLoader.TryGetMod("CalValEX", out Mod calval); + var magicStorage = ModLoader.TryGetMod("MagicStorage", out Mod storage); + + graniteTileCount = tileCounts[TileID.Granite]; + marbleTileCount = tileCounts[TileID.Marble]; + + workbenchTileCount = tileCounts[TileID.WorkBenches]; + furnaceTileCount = tileCounts[TileID.Furnaces]; + ironAnvilTileCount = tileCounts[TileID.Anvils]; + hellForgeTileCount = tileCounts[TileID.Hellforge]; + mythrilAnvilTileCount = tileCounts[TileID.MythrilAnvil]; + adamantiteForgeTileCount = tileCounts[TileID.AdamantiteForge]; + + if (calamityMod) + { + workbenchTileCount += tileCounts[calamity.Find("AbyssWorkBench").Type] + + tileCounts[calamity.Find("AcidwoodWorkBenchTile").Type] + + tileCounts[calamity.Find("AncientWorkBench").Type] + + tileCounts[calamity.Find("AshenWorkBench").Type] + + tileCounts[calamity.Find("BotanicWorkBench").Type] + + tileCounts[calamity.Find("CosmiliteWorkBench").Type] + + tileCounts[calamity.Find("EutrophicWorkBench").Type] + + tileCounts[calamity.Find("ExoWorkbenchTile").Type] + + tileCounts[calamity.Find("MonolithWorkBench").Type] + + tileCounts[calamity.Find("OtherworldlyWorkBench").Type] + + tileCounts[calamity.Find("PlaguedPlateWorkbench").Type] + + tileCounts[calamity.Find("ProfanedWorkbench").Type] + + tileCounts[calamity.Find("SacrilegiousWorkBenchTile").Type] + + tileCounts[calamity.Find("SilvaWorkBench").Type] + + tileCounts[calamity.Find("StatigelWorkbench").Type] + + tileCounts[calamity.Find("StratusWorkbench").Type] + + tileCounts[calamity.Find("VoidWorkbench").Type] + + tileCounts[calamity.Find("WulfrumWorkbench").Type]; + + cosmicAnvilTileCount = tileCounts[calamity.Find("CosmicAnvil").Type]; + draedonsForgeTileCount = tileCounts[calamity.Find("DraedonsForge").Type]; + + labTileCount = tileCounts[calamity.Find("LaboratoryPanels").Type] + + tileCounts[calamity.Find("LaboratoryPlating").Type] + + tileCounts[calamity.Find("HazardChevronPanels").Type]; + } + + if (calamityVanities) + { + workbenchTileCount += tileCounts[calval.Find("OldAstralWorkbench").Type] + + tileCounts[calval.Find("PhantowaxWorkbench").Type] + + tileCounts[calval.Find("BloodstoneWorkbench").Type] + + tileCounts[calval.Find("AuricWorkbench").Type]; + } + + if (magicStorage) + { + storageHeartTileCount = tileCounts[storage.Find("StorageHeart").Type]; + craftingUnitTileCount = tileCounts[storage.Find("CraftingAccess").Type]; + } + } + } +} \ No newline at end of file diff --git a/Content/Items/AbyssLayer3AltMusicBox.cs b/Content/Items/AbyssLayer3AltMusicBox.cs new file mode 100644 index 0000000..0a5ac78 --- /dev/null +++ b/Content/Items/AbyssLayer3AltMusicBox.cs @@ -0,0 +1,39 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("AbyssLowAltMusicBox")] + public class AbyssLayer3AltMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "AbyssLayer3Alt"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddIngredient(calamity, "PyreMantleMolten", 10) + .AddIngredient(calamity, "DepthCells", 10) + .AddIngredient(calamity, "ChaoticOre", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + } + } +} \ No newline at end of file diff --git a/Content/Items/AbyssLayer3AltMusicBox.png b/Content/Items/AbyssLayer3AltMusicBox.png new file mode 100644 index 0000000..1232fa2 Binary files /dev/null and b/Content/Items/AbyssLayer3AltMusicBox.png differ diff --git a/Content/Items/BloodMoonDeathMusicBox.cs b/Content/Items/BloodMoonDeathMusicBox.cs new file mode 100644 index 0000000..516036d --- /dev/null +++ b/Content/Items/BloodMoonDeathMusicBox.cs @@ -0,0 +1,48 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("BloodMoon2MusicBox")] + public class BloodMoonDeathMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "BloodMoonDeath"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddRecipeGroup("VCMM:EvilPowderGroup", 10) + .AddIngredient(calamity, "BloodOrb", 10) + .AddIngredient(ItemID.Deathweed, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + else + { + Recipe.Create(Type, 1) + .AddRecipeGroup("VCMM:EvilPowderGroup", 10) + .AddIngredient(ItemID.Deathweed, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } + } +} diff --git a/Content/Items/BloodMoonDeathMusicBox.png b/Content/Items/BloodMoonDeathMusicBox.png new file mode 100644 index 0000000..640c3ad Binary files /dev/null and b/Content/Items/BloodMoonDeathMusicBox.png differ diff --git a/Content/Items/BloodMoonMusicBox.cs b/Content/Items/BloodMoonMusicBox.cs new file mode 100644 index 0000000..b23b8fd --- /dev/null +++ b/Content/Items/BloodMoonMusicBox.cs @@ -0,0 +1,53 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("BloodMoon1MusicBox")] + public class BloodMoonMusicBox : MusicBoxItem + { + public override LocalizedText DisplayName => ModContent.GetInstance().BloodMoonAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.BloodMoonMusicBox.DisplayNameAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.BloodMoonMusicBox.DisplayName"); + + public override LocalizedText Tooltip => ModContent.GetInstance().BloodMoonAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.BloodMoonMusicBox.TooltipAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.BloodMoonMusicBox.Tooltip"); + + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => ModContent.GetInstance().BloodMoonAlt ? "BloodMoonAlt" : "BloodMoon"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddRecipeGroup("VCMM:EvilPowderGroup", 10) + .AddIngredient(calamity, "BloodOrb", 10) + .AddIngredient(ItemID.FallenStar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + else + { + Recipe.Create(Type, 1) + .AddRecipeGroup("VCMM:EvilPowderGroup", 10) + .AddIngredient(ItemID.FallenStar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } + } +} diff --git a/Content/Items/BloodMoonMusicBox.png b/Content/Items/BloodMoonMusicBox.png new file mode 100644 index 0000000..97ed332 Binary files /dev/null and b/Content/Items/BloodMoonMusicBox.png differ diff --git a/Content/Items/BrainofCthulhuMusicBox.cs b/Content/Items/BrainofCthulhuMusicBox.cs new file mode 100644 index 0000000..64d993b --- /dev/null +++ b/Content/Items/BrainofCthulhuMusicBox.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class BrainofCthulhuMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "BrainofCthulhu"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.BrainofCthulhuTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/BrainofCthulhuMusicBox.png b/Content/Items/BrainofCthulhuMusicBox.png new file mode 100644 index 0000000..4436e1b Binary files /dev/null and b/Content/Items/BrainofCthulhuMusicBox.png differ diff --git a/Content/Items/CavernsMusicBox.cs b/Content/Items/CavernsMusicBox.cs new file mode 100644 index 0000000..b88a9b8 --- /dev/null +++ b/Content/Items/CavernsMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Underground2MusicBox")] + public class CavernsMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Caverns"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.StoneBlock, 10) + .AddIngredient(ItemID.SiltBlock, 10) + .AddRecipeGroup("VCMM:GoldOreGroup", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/CavernsMusicBox.png b/Content/Items/CavernsMusicBox.png new file mode 100644 index 0000000..b8f6255 Binary files /dev/null and b/Content/Items/CavernsMusicBox.png differ diff --git a/Content/Items/CorruptionMusicBox.cs b/Content/Items/CorruptionMusicBox.cs new file mode 100644 index 0000000..16f6fda --- /dev/null +++ b/Content/Items/CorruptionMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class CorruptionMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Corruption"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Ebonwood, 10) + .AddIngredient(ItemID.RottenChunk, 10) + .AddIngredient(ItemID.VileMushroom, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/CorruptionMusicBox.png b/Content/Items/CorruptionMusicBox.png new file mode 100644 index 0000000..4747a96 Binary files /dev/null and b/Content/Items/CorruptionMusicBox.png differ diff --git a/Content/Items/CorruptionUndergroundMusicBox.cs b/Content/Items/CorruptionUndergroundMusicBox.cs new file mode 100644 index 0000000..92507b1 --- /dev/null +++ b/Content/Items/CorruptionUndergroundMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("CorruptionUgMusicBox")] + public class CorruptionUndergroundMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "CorruptionUnderground"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.EbonstoneBlock, 10) + .AddIngredient(ItemID.RottenChunk, 10) + .AddIngredient(ItemID.ShadowOrb, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/CorruptionUndergroundMusicBox.png b/Content/Items/CorruptionUndergroundMusicBox.png new file mode 100644 index 0000000..c0922e3 Binary files /dev/null and b/Content/Items/CorruptionUndergroundMusicBox.png differ diff --git a/Content/Items/CrimsonMusicBox.cs b/Content/Items/CrimsonMusicBox.cs new file mode 100644 index 0000000..6831820 --- /dev/null +++ b/Content/Items/CrimsonMusicBox.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items +{ + public class CrimsonMusicBox : MusicBoxItem + { + public override LocalizedText DisplayName => ModContent.GetInstance().CrimsonAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.CrimsonMusicBox.DisplayNameAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.CrimsonMusicBox.DisplayName"); + + public override LocalizedText Tooltip => ModContent.GetInstance().CrimsonAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.CrimsonMusicBox.TooltipAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.CrimsonMusicBox.Tooltip"); + + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => ModContent.GetInstance().CrimsonAlt ? "CrimsonAlt" : "Crimson"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Shadewood, 10) + .AddIngredient(ItemID.Vertebrae, 10) + .AddIngredient(ItemID.ViciousMushroom, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/CrimsonMusicBox.png b/Content/Items/CrimsonMusicBox.png new file mode 100644 index 0000000..589f27c Binary files /dev/null and b/Content/Items/CrimsonMusicBox.png differ diff --git a/Content/Items/CrimsonUndergroundMusicBox.cs b/Content/Items/CrimsonUndergroundMusicBox.cs new file mode 100644 index 0000000..8c0b32a --- /dev/null +++ b/Content/Items/CrimsonUndergroundMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("CrimsonUgMusicBox")] + public class CrimsonUndergroundMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "CrimsonUnderground"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.CrimstoneBlock, 10) + .AddIngredient(ItemID.Vertebrae, 10) + .AddIngredient(ItemID.CrimsonHeart, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/CrimsonUndergroundMusicBox.png b/Content/Items/CrimsonUndergroundMusicBox.png new file mode 100644 index 0000000..b6243b9 Binary files /dev/null and b/Content/Items/CrimsonUndergroundMusicBox.png differ diff --git a/Content/Items/DesertMusicBox.cs b/Content/Items/DesertMusicBox.cs new file mode 100644 index 0000000..f3746ed --- /dev/null +++ b/Content/Items/DesertMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class DesertMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Desert"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Cactus, 10) + .AddIngredient(ItemID.SandBlock, 10) + .AddIngredient(ItemID.Waterleaf, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/DesertMusicBox.png b/Content/Items/DesertMusicBox.png new file mode 100644 index 0000000..1337d10 Binary files /dev/null and b/Content/Items/DesertMusicBox.png differ diff --git a/Content/Items/DungeonMusicBox.cs b/Content/Items/DungeonMusicBox.cs new file mode 100644 index 0000000..28f1cc7 --- /dev/null +++ b/Content/Items/DungeonMusicBox.cs @@ -0,0 +1,41 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class DungeonMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Dungeon"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.BlueBrick, 10) + .AddIngredient(ItemID.Bone, 10) + .AddIngredient(ItemID.GoldenKey, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + + Recipe.Create(Type, 1) + .AddIngredient(ItemID.GreenBrick, 10) + .AddIngredient(ItemID.Bone, 10) + .AddIngredient(ItemID.GoldenKey, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + + Recipe.Create(Type, 1) + .AddIngredient(ItemID.PinkBrick, 10) + .AddIngredient(ItemID.Bone, 10) + .AddIngredient(ItemID.GoldenKey, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/DungeonMusicBox.png b/Content/Items/DungeonMusicBox.png new file mode 100644 index 0000000..80c6c30 Binary files /dev/null and b/Content/Items/DungeonMusicBox.png differ diff --git a/Content/Items/EaterofWorldsMusicBox.cs b/Content/Items/EaterofWorldsMusicBox.cs new file mode 100644 index 0000000..6ecb1c3 --- /dev/null +++ b/Content/Items/EaterofWorldsMusicBox.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class EaterofWorldsMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "EaterofWorlds"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.EaterofWorldsTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/EaterofWorldsMusicBox.png b/Content/Items/EaterofWorldsMusicBox.png new file mode 100644 index 0000000..d7da005 Binary files /dev/null and b/Content/Items/EaterofWorldsMusicBox.png differ diff --git a/Content/Items/External/MusicBox.cs b/Content/Items/External/MusicBox.cs new file mode 100644 index 0000000..7e728cb --- /dev/null +++ b/Content/Items/External/MusicBox.cs @@ -0,0 +1,36 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items.External +{ + public class MusicBox : GlobalItem + { + public override void SetDefaults(Item item) + { + //Make all music boxes stack to 9999 instead of 1 + if (item.Name.Contains("Music Box")) + { + item.maxStack = 9999; + } + + if (item.type == ItemID.MusicBox) + { + if (ModContent.GetInstance().MusicBoxResprite) + { + item.useStyle = ItemUseStyleID.Swing; + item.useTurn = true; + item.useAnimation = 15; + item.useTime = 10; + item.autoReuse = true; + item.consumable = true; + item.createTile = ModContent.TileType(); + } + //item.value = Item.buyPrice(1, 0, 0, 0); + } + } + } +} diff --git a/Content/Items/External/MusicBox.png b/Content/Items/External/MusicBox.png new file mode 100644 index 0000000..cec9972 Binary files /dev/null and b/Content/Items/External/MusicBox.png differ diff --git a/Content/Items/EyeofCthulhuMusicBox.cs b/Content/Items/EyeofCthulhuMusicBox.cs new file mode 100644 index 0000000..42c3ba3 --- /dev/null +++ b/Content/Items/EyeofCthulhuMusicBox.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items +{ + public class EyeofCthulhuMusicBox : MusicBoxItem + { + public override LocalizedText DisplayName => ModContent.GetInstance().EyeofCthulhuAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.EyeofCthulhuMusicBox.DisplayNameAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.EyeofCthulhuMusicBox.DisplayName"); + + public override LocalizedText Tooltip => ModContent.GetInstance().EyeofCthulhuAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.EyeofCthulhuMusicBox.TooltipAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.EyeofCthulhuMusicBox.Tooltip"); + + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => ModContent.GetInstance().EyeofCthulhuAlt ? "EyeofCthulhuAlt" : "EyeofCthulhu"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.EyeofCthulhuTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/EyeofCthulhuMusicBox.png b/Content/Items/EyeofCthulhuMusicBox.png new file mode 100644 index 0000000..f18cf22 Binary files /dev/null and b/Content/Items/EyeofCthulhuMusicBox.png differ diff --git a/Content/Items/FalseEpilogueMusicBox.cs b/Content/Items/FalseEpilogueMusicBox.cs new file mode 100644 index 0000000..4d7bf0b --- /dev/null +++ b/Content/Items/FalseEpilogueMusicBox.cs @@ -0,0 +1,13 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("MemoryMusicBox")] + public class FalseEpilogueMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "FalseEpilogue"; + } +} diff --git a/Content/Items/FalseEpilogueMusicBox.png b/Content/Items/FalseEpilogueMusicBox.png new file mode 100644 index 0000000..9939332 Binary files /dev/null and b/Content/Items/FalseEpilogueMusicBox.png differ diff --git a/Content/Items/ForestDayAfternoonMusicBox.cs b/Content/Items/ForestDayAfternoonMusicBox.cs new file mode 100644 index 0000000..f5cbad8 --- /dev/null +++ b/Content/Items/ForestDayAfternoonMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Day3MusicBox")] + public class ForestDayAfternoonMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "ForestDayAfternoon"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Wood, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddIngredient(ItemID.Sunflower, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/ForestDayAfternoonMusicBox.png b/Content/Items/ForestDayAfternoonMusicBox.png new file mode 100644 index 0000000..2f7b49f Binary files /dev/null and b/Content/Items/ForestDayAfternoonMusicBox.png differ diff --git a/Content/Items/ForestDayDawnMusicBox.cs b/Content/Items/ForestDayDawnMusicBox.cs new file mode 100644 index 0000000..971a715 --- /dev/null +++ b/Content/Items/ForestDayDawnMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Day1MusicBox")] + public class ForestDayDawnMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "ForestDayDawn"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Wood, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddIngredient(ItemID.Daybloom, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/ForestDayDawnMusicBox.png b/Content/Items/ForestDayDawnMusicBox.png new file mode 100644 index 0000000..2efb03c Binary files /dev/null and b/Content/Items/ForestDayDawnMusicBox.png differ diff --git a/Content/Items/ForestDayEveningMusicBox.cs b/Content/Items/ForestDayEveningMusicBox.cs new file mode 100644 index 0000000..adca27a --- /dev/null +++ b/Content/Items/ForestDayEveningMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Day4MusicBox")] + public class ForestDayEveningMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "ForestDayEvening"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Wood, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddIngredient(ItemID.Mushroom, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/ForestDayEveningMusicBox.png b/Content/Items/ForestDayEveningMusicBox.png new file mode 100644 index 0000000..40e3fe5 Binary files /dev/null and b/Content/Items/ForestDayEveningMusicBox.png differ diff --git a/Content/Items/ForestDayMorningMusicBox.cs b/Content/Items/ForestDayMorningMusicBox.cs new file mode 100644 index 0000000..3c79459 --- /dev/null +++ b/Content/Items/ForestDayMorningMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Day2MusicBox")] + public class ForestDayMorningMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "ForestDayMorning"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Wood, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddIngredient(ItemID.YellowMarigold, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/ForestDayMorningMusicBox.png b/Content/Items/ForestDayMorningMusicBox.png new file mode 100644 index 0000000..67f4656 Binary files /dev/null and b/Content/Items/ForestDayMorningMusicBox.png differ diff --git a/Content/Items/ForestNightMusicBox.cs b/Content/Items/ForestNightMusicBox.cs new file mode 100644 index 0000000..d5923f2 --- /dev/null +++ b/Content/Items/ForestNightMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("NightMusicBox")] + public class ForestNightMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "ForestNight"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Wood, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddIngredient(ItemID.FallenStar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/ForestNightMusicBox.png b/Content/Items/ForestNightMusicBox.png new file mode 100644 index 0000000..357af79 Binary files /dev/null and b/Content/Items/ForestNightMusicBox.png differ diff --git a/Content/Items/GeodesMusicBox.cs b/Content/Items/GeodesMusicBox.cs new file mode 100644 index 0000000..213ca91 --- /dev/null +++ b/Content/Items/GeodesMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class GeodesMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Geodes"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Granite, 10) + .AddIngredient(ItemID.Marble, 10) + .AddRecipeGroup("VCMM:GoldBarGroup", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/GeodesMusicBox.png b/Content/Items/GeodesMusicBox.png new file mode 100644 index 0000000..6ab86d2 Binary files /dev/null and b/Content/Items/GeodesMusicBox.png differ diff --git a/Content/Items/GlowingMushroomFieldsMusicBox.cs b/Content/Items/GlowingMushroomFieldsMusicBox.cs new file mode 100644 index 0000000..18a29b7 --- /dev/null +++ b/Content/Items/GlowingMushroomFieldsMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class GlowingMushroomFieldsMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "GlowingMushroomFields"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.GlowingMushroom, 10) + .AddIngredient(ItemID.MudBlock, 10) + .AddIngredient(ItemID.MushroomGrassSeeds, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/GlowingMushroomFieldsMusicBox.png b/Content/Items/GlowingMushroomFieldsMusicBox.png new file mode 100644 index 0000000..cb7edad Binary files /dev/null and b/Content/Items/GlowingMushroomFieldsMusicBox.png differ diff --git a/Content/Items/HardmodeInterludeMusicBox.cs b/Content/Items/HardmodeInterludeMusicBox.cs new file mode 100644 index 0000000..cc1ba79 --- /dev/null +++ b/Content/Items/HardmodeInterludeMusicBox.cs @@ -0,0 +1,13 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("ResurrectionMusicBox")] + public class HardmodeInterludeMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "HardmodeInterlude"; + } +} diff --git a/Content/Items/HardmodeInterludeMusicBox.png b/Content/Items/HardmodeInterludeMusicBox.png new file mode 100644 index 0000000..175fb34 Binary files /dev/null and b/Content/Items/HardmodeInterludeMusicBox.png differ diff --git a/Content/Items/KingSlimeMusicBox.cs b/Content/Items/KingSlimeMusicBox.cs new file mode 100644 index 0000000..a502015 --- /dev/null +++ b/Content/Items/KingSlimeMusicBox.cs @@ -0,0 +1,29 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items +{ + public class KingSlimeMusicBox : MusicBoxItem + { + public override LocalizedText DisplayName => ModContent.GetInstance().KingSlimeAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.KingSlimeMusicBox.DisplayNameAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.KingSlimeMusicBox.DisplayName"); + + public override LocalizedText Tooltip => ModContent.GetInstance().KingSlimeAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.KingSlimeMusicBox.TooltipAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.KingSlimeMusicBox.Tooltip"); + + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => ModContent.GetInstance().KingSlimeAlt ? "KingSlimeAlt" : "KingSlime"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.KingSlimeTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/KingSlimeMusicBox.png b/Content/Items/KingSlimeMusicBox.png new file mode 100644 index 0000000..032d300 Binary files /dev/null and b/Content/Items/KingSlimeMusicBox.png differ diff --git a/Content/Items/LanternFestivalMusicBox.cs b/Content/Items/LanternFestivalMusicBox.cs new file mode 100644 index 0000000..3243586 --- /dev/null +++ b/Content/Items/LanternFestivalMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class LanternFestivalMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "LanternFestival"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 10) + .AddIngredient(ItemID.ReleaseLantern, 10) + .AddIngredient(ItemID.FallenStar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/LanternFestivalMusicBox.png b/Content/Items/LanternFestivalMusicBox.png new file mode 100644 index 0000000..3f1f1f3 Binary files /dev/null and b/Content/Items/LanternFestivalMusicBox.png differ diff --git a/Content/Items/MeteoriteMusicBox.cs b/Content/Items/MeteoriteMusicBox.cs new file mode 100644 index 0000000..cb54e7d --- /dev/null +++ b/Content/Items/MeteoriteMusicBox.cs @@ -0,0 +1,24 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class MeteoriteMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Meteorite"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Meteorite, 10) + .AddIngredient(ItemID.FallenStar, 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/MeteoriteMusicBox.png b/Content/Items/MeteoriteMusicBox.png new file mode 100644 index 0000000..03f5edc Binary files /dev/null and b/Content/Items/MeteoriteMusicBox.png differ diff --git a/Content/Items/MoonLordMusicBox.cs b/Content/Items/MoonLordMusicBox.cs new file mode 100644 index 0000000..64762a7 --- /dev/null +++ b/Content/Items/MoonLordMusicBox.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class MoonLordMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "MoonLord"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.MoonLordTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/MoonLordMusicBox.png b/Content/Items/MoonLordMusicBox.png new file mode 100644 index 0000000..36df361 Binary files /dev/null and b/Content/Items/MoonLordMusicBox.png differ diff --git a/Content/Items/OceanDayMusicBox.cs b/Content/Items/OceanDayMusicBox.cs new file mode 100644 index 0000000..176f543 --- /dev/null +++ b/Content/Items/OceanDayMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class OceanDayMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "OceanDay"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.PalmWood, 10) + .AddIngredient(ItemID.SandBlock, 10) + .AddIngredient(ItemID.Seashell, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/OceanDayMusicBox.png b/Content/Items/OceanDayMusicBox.png new file mode 100644 index 0000000..d62170a Binary files /dev/null and b/Content/Items/OceanDayMusicBox.png differ diff --git a/Content/Items/OceanNightMusicBox.cs b/Content/Items/OceanNightMusicBox.cs new file mode 100644 index 0000000..b4cf022 --- /dev/null +++ b/Content/Items/OceanNightMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class OceanNightMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "OceanNight"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.PalmWood, 10) + .AddIngredient(ItemID.SandBlock, 10) + .AddIngredient(ItemID.Starfish, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/OceanNightMusicBox.png b/Content/Items/OceanNightMusicBox.png new file mode 100644 index 0000000..7f97cb9 Binary files /dev/null and b/Content/Items/OceanNightMusicBox.png differ diff --git a/Content/Items/RainLegacyMusicBox.cs b/Content/Items/RainLegacyMusicBox.cs new file mode 100644 index 0000000..869dbbc --- /dev/null +++ b/Content/Items/RainLegacyMusicBox.cs @@ -0,0 +1,26 @@ +using System; +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("GreySkyMusicBox")] + public class RainLegacyMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "RainLegacy"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ModContent.ItemType(), 1) + .AddIngredient(ModContent.ItemType(), 1) + .AddTile(Recipes.musicBoxCraftingStationVanilla) + .Register(); + } + } +} diff --git a/Content/Items/RainLegacyMusicBox.png b/Content/Items/RainLegacyMusicBox.png new file mode 100644 index 0000000..82f189c Binary files /dev/null and b/Content/Items/RainLegacyMusicBox.png differ diff --git a/Content/Items/RainMusicBox.cs b/Content/Items/RainMusicBox.cs new file mode 100644 index 0000000..6653b28 --- /dev/null +++ b/Content/Items/RainMusicBox.cs @@ -0,0 +1,31 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic.Content.Items +{ + public class RainMusicBox : MusicBoxItem + { + public override LocalizedText DisplayName => ModContent.GetInstance().RainAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.RainMusicBox.DisplayNameAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.RainMusicBox.DisplayName"); + + public override LocalizedText Tooltip => ModContent.GetInstance().RainAlt ? Language.GetOrRegister("Mods.UnCalamityModMusic.Items.RainMusicBox.TooltipAlt") : Language.GetOrRegister("Mods.UnCalamityModMusic.Items.RainMusicBox.Tooltip"); + + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => ModContent.GetInstance().RainAlt ? "RainAlt" : "Rain"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Glowstick, 10) + .AddIngredient(ItemID.RainCloud, 10) + .AddIngredient(ItemID.WaterBucket, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/RainMusicBox.png b/Content/Items/RainMusicBox.png new file mode 100644 index 0000000..a72c6cb Binary files /dev/null and b/Content/Items/RainMusicBox.png differ diff --git a/Content/Items/SkeletronMusicBox.cs b/Content/Items/SkeletronMusicBox.cs new file mode 100644 index 0000000..376c71a --- /dev/null +++ b/Content/Items/SkeletronMusicBox.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class SkeletronMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Skeletron"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.SkeletronTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/SkeletronMusicBox.png b/Content/Items/SkeletronMusicBox.png new file mode 100644 index 0000000..949ef81 Binary files /dev/null and b/Content/Items/SkeletronMusicBox.png differ diff --git a/Content/Items/SlimeRainMusicBox.cs b/Content/Items/SlimeRainMusicBox.cs new file mode 100644 index 0000000..84dfe90 --- /dev/null +++ b/Content/Items/SlimeRainMusicBox.cs @@ -0,0 +1,33 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class SlimeRainMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "SlimeRain"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Gel, 10) + .AddIngredient(ItemID.PinkGel, 10) + .AddIngredient(ItemID.GoldCrown, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Gel, 10) + .AddIngredient(ItemID.PinkGel, 10) + .AddIngredient(ItemID.PlatinumCrown, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/SlimeRainMusicBox.png b/Content/Items/SlimeRainMusicBox.png new file mode 100644 index 0000000..3007900 Binary files /dev/null and b/Content/Items/SlimeRainMusicBox.png differ diff --git a/Content/Items/SpaceMusicBox.cs b/Content/Items/SpaceMusicBox.cs new file mode 100644 index 0000000..a3da47e --- /dev/null +++ b/Content/Items/SpaceMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class SpaceMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Space"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.Cloud, 10) + .AddIngredient(ItemID.RainCloud, 10) + .AddIngredient(ItemID.SunplateBlock, 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/SpaceMusicBox.png b/Content/Items/SpaceMusicBox.png new file mode 100644 index 0000000..d022274 Binary files /dev/null and b/Content/Items/SpaceMusicBox.png differ diff --git a/Content/Items/TownDayMusicBox.cs b/Content/Items/TownDayMusicBox.cs new file mode 100644 index 0000000..419a578 --- /dev/null +++ b/Content/Items/TownDayMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class TownDayMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "TownDay"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 10) + .AddIngredient(ItemID.SilverCoin, 10) + .AddIngredient(ItemID.Sunflower, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/TownDayMusicBox.png b/Content/Items/TownDayMusicBox.png new file mode 100644 index 0000000..ac204ca Binary files /dev/null and b/Content/Items/TownDayMusicBox.png differ diff --git a/Content/Items/TownNightMusicBox.cs b/Content/Items/TownNightMusicBox.cs new file mode 100644 index 0000000..eae89bd --- /dev/null +++ b/Content/Items/TownNightMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class TownNightMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "TownNight"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 10) + .AddIngredient(ItemID.SilverCoin, 10) + .AddIngredient(ItemID.FallenStar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/TownNightMusicBox.png b/Content/Items/TownNightMusicBox.png new file mode 100644 index 0000000..ff52c48 Binary files /dev/null and b/Content/Items/TownNightMusicBox.png differ diff --git a/Content/Items/TundraMusicBox.cs b/Content/Items/TundraMusicBox.cs new file mode 100644 index 0000000..b474a0a --- /dev/null +++ b/Content/Items/TundraMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class TundraMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Tundra"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.BorealWood, 10) + .AddIngredient(ItemID.SnowBlock, 10) + .AddIngredient(ItemID.Shiverthorn, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/TundraMusicBox.png b/Content/Items/TundraMusicBox.png new file mode 100644 index 0000000..a0406e6 Binary files /dev/null and b/Content/Items/TundraMusicBox.png differ diff --git a/Content/Items/TundraUndergroundMusicBox.cs b/Content/Items/TundraUndergroundMusicBox.cs new file mode 100644 index 0000000..bbadbe5 --- /dev/null +++ b/Content/Items/TundraUndergroundMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class TundraUndergroundMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "TundraUnderground"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.IceBlock, 10) + .AddIngredient(ItemID.SlushBlock, 10) + .AddIngredient(ItemID.FlinxFur, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/TundraUndergroundMusicBox.png b/Content/Items/TundraUndergroundMusicBox.png new file mode 100644 index 0000000..0dcab92 Binary files /dev/null and b/Content/Items/TundraUndergroundMusicBox.png differ diff --git a/Content/Items/UndergroundMusicBox.cs b/Content/Items/UndergroundMusicBox.cs new file mode 100644 index 0000000..89f8743 --- /dev/null +++ b/Content/Items/UndergroundMusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Underground1MusicBox")] + public class UndergroundMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Underground"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.StoneBlock, 10) + .AddIngredient(ItemID.DirtBlock, 10) + .AddRecipeGroup("VCMM:CopperOreGroup", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/UndergroundMusicBox.png b/Content/Items/UndergroundMusicBox.png new file mode 100644 index 0000000..cc56e6a Binary files /dev/null and b/Content/Items/UndergroundMusicBox.png differ diff --git a/Content/Items/UnderworldMusicBox.cs b/Content/Items/UnderworldMusicBox.cs new file mode 100644 index 0000000..4e33b49 --- /dev/null +++ b/Content/Items/UnderworldMusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class UnderworldMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "Underworld"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.AshWood, 10) + .AddIngredient(ItemID.ObsidianBrick, 10) + .AddIngredient(ItemID.Fireblossom, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/UnderworldMusicBox.png b/Content/Items/UnderworldMusicBox.png new file mode 100644 index 0000000..2800a83 Binary files /dev/null and b/Content/Items/UnderworldMusicBox.png differ diff --git a/Content/Items/WallofFleshMusicBox.cs b/Content/Items/WallofFleshMusicBox.cs new file mode 100644 index 0000000..1e36f79 --- /dev/null +++ b/Content/Items/WallofFleshMusicBox.cs @@ -0,0 +1,23 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + public class WallofFleshMusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WallofFlesh"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.WallofFleshTrophy, 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/WallofFleshMusicBox.png b/Content/Items/WallofFleshMusicBox.png new file mode 100644 index 0000000..551cc47 Binary files /dev/null and b/Content/Items/WallofFleshMusicBox.png differ diff --git a/Content/Items/WorkshopTier1MusicBox.cs b/Content/Items/WorkshopTier1MusicBox.cs new file mode 100644 index 0000000..8a6c8be --- /dev/null +++ b/Content/Items/WorkshopTier1MusicBox.cs @@ -0,0 +1,26 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop1MusicBox")] + public class WorkshopTier1MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier1"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 10) + .AddIngredient(ItemID.Torch, 10) + .AddRecipeGroup(RecipeGroupID.IronBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/WorkshopTier1MusicBox.png b/Content/Items/WorkshopTier1MusicBox.png new file mode 100644 index 0000000..0e73504 Binary files /dev/null and b/Content/Items/WorkshopTier1MusicBox.png differ diff --git a/Content/Items/WorkshopTier2MusicBox.cs b/Content/Items/WorkshopTier2MusicBox.cs new file mode 100644 index 0000000..44bc780 --- /dev/null +++ b/Content/Items/WorkshopTier2MusicBox.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop2MusicBox")] + public class WorkshopTier2MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier2"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddIngredient(calamity, "AerialiteBar", 3) + .AddIngredient(ItemID.HellstoneBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + else + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.SunplateBlock, 10) + .AddIngredient(ItemID.HellstoneBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } + } +} diff --git a/Content/Items/WorkshopTier2MusicBox.png b/Content/Items/WorkshopTier2MusicBox.png new file mode 100644 index 0000000..e78fa43 Binary files /dev/null and b/Content/Items/WorkshopTier2MusicBox.png differ diff --git a/Content/Items/WorkshopTier3MusicBox.cs b/Content/Items/WorkshopTier3MusicBox.cs new file mode 100644 index 0000000..4dd6fad --- /dev/null +++ b/Content/Items/WorkshopTier3MusicBox.cs @@ -0,0 +1,25 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop3MusicBox")] + public class WorkshopTier3MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier3"; + + public override void AddRecipes() + { + Recipe.Create(Type, 1) + .AddRecipeGroup("VCMM:MythrilBarGroup", 3) + .AddRecipeGroup("VCMM:AdamantiteBarGroup", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } +} diff --git a/Content/Items/WorkshopTier3MusicBox.png b/Content/Items/WorkshopTier3MusicBox.png new file mode 100644 index 0000000..513946f Binary files /dev/null and b/Content/Items/WorkshopTier3MusicBox.png differ diff --git a/Content/Items/WorkshopTier4MusicBox.cs b/Content/Items/WorkshopTier4MusicBox.cs new file mode 100644 index 0000000..4bd8274 --- /dev/null +++ b/Content/Items/WorkshopTier4MusicBox.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop4MusicBox")] + public class WorkshopTier4MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier4"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddIngredient(calamity, "LivingShard", 3) + .AddIngredient(calamity, "DraedonBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + else + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.TempleKey, 1) + .AddIngredient(ItemID.ChlorophyteBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } + } +} diff --git a/Content/Items/WorkshopTier4MusicBox.png b/Content/Items/WorkshopTier4MusicBox.png new file mode 100644 index 0000000..35cd1b7 Binary files /dev/null and b/Content/Items/WorkshopTier4MusicBox.png differ diff --git a/Content/Items/WorkshopTier5MusicBox.cs b/Content/Items/WorkshopTier5MusicBox.cs new file mode 100644 index 0000000..29290de --- /dev/null +++ b/Content/Items/WorkshopTier5MusicBox.cs @@ -0,0 +1,51 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop5MusicBox")] + public class WorkshopTier5MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier5"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddIngredient(calamity, "BarofLife", 3) + .AddIngredient(calamity, "GalacticaSingularity", 3) + .AddIngredient(ItemID.LunarBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + else + { + Recipe.Create(Type, 1) + .AddIngredient(ItemID.FragmentSolar, 3) + .AddIngredient(ItemID.FragmentVortex, 3) + .AddIngredient(ItemID.FragmentStardust, 3) + .AddIngredient(ItemID.FragmentNebula, 3) + .AddIngredient(ItemID.LunarBar, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + } + } +} diff --git a/Content/Items/WorkshopTier5MusicBox.png b/Content/Items/WorkshopTier5MusicBox.png new file mode 100644 index 0000000..92d08d7 Binary files /dev/null and b/Content/Items/WorkshopTier5MusicBox.png differ diff --git a/Content/Items/WorkshopTier6MusicBox.cs b/Content/Items/WorkshopTier6MusicBox.cs new file mode 100644 index 0000000..6971748 --- /dev/null +++ b/Content/Items/WorkshopTier6MusicBox.cs @@ -0,0 +1,39 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Items +{ + [LegacyName("Workshop6MusicBox")] + public class WorkshopTier6MusicBox : MusicBoxItem + { + public override int MusicBoxTile => ModContent.TileType(); + + public override string MusicFilePath => "WorkshopTier6"; + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + + if (calamityMod) + { + try + { + Recipe.Create(Type, 1) + .AddIngredient(calamity, "ExoPrism", 3) + .AddIngredient(calamity, "AscendantSpiritEssence", 3) + .AddIngredient(calamity, "AuricBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(Recipes.musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + } + } +} diff --git a/Content/Items/WorkshopTier6MusicBox.png b/Content/Items/WorkshopTier6MusicBox.png new file mode 100644 index 0000000..5903e1e Binary files /dev/null and b/Content/Items/WorkshopTier6MusicBox.png differ diff --git a/Content/Menus/Blank.png b/Content/Menus/Blank.png new file mode 100644 index 0000000..5064c2f Binary files /dev/null and b/Content/Menus/Blank.png differ diff --git a/Content/Menus/Logo.png b/Content/Menus/Logo.png new file mode 100644 index 0000000..8cf6fe8 Binary files /dev/null and b/Content/Menus/Logo.png differ diff --git a/Content/Menus/MemoryBackground.png b/Content/Menus/MemoryBackground.png new file mode 100644 index 0000000..67a4cf5 Binary files /dev/null and b/Content/Menus/MemoryBackground.png differ diff --git a/Content/Menus/Menus.cs b/Content/Menus/Menus.cs new file mode 100644 index 0000000..551c653 --- /dev/null +++ b/Content/Menus/Menus.cs @@ -0,0 +1,362 @@ +using System; +using System.Collections.Generic; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Localization; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Menus +{ + public class ResurrectionMenu : ModMenu + { + public override int Music => MusicPathing.GetMusicSlot("HardmodeInterlude"); + + public override string DisplayName => Language.GetTextValue("Mods.UnCalamityModMusic.Menus.ResurrectionMenu"); + + public class Ember + { + public int Time; + + public int LifeTime; + + public int IdentityIndex; + + public float Scale; + + public float Depth; + + public Color DrawColor; + + public Vector2 Velocity; + + public Vector2 Center; + + public Ember(int lifetime, int identity, float depth, Color color, Vector2 startingPosition, Vector2 startingVelocity) + { + LifeTime = lifetime; + IdentityIndex = identity; + Depth = depth; + DrawColor = color; + Center = startingPosition; + Velocity = startingVelocity; + } + } + + public static List Embers { get; internal set; } = new List(); + + public override Asset Logo => ModContent.Request("UnCalamityModMusic/Content/Menus/Logo", AssetRequestMode.AsyncLoad); + + public override Asset SunTexture => ModContent.Request("UnCalamityModMusic/Content/Menus/Blank", AssetRequestMode.AsyncLoad); + + public override Asset MoonTexture => ModContent.Request("UnCalamityModMusic/Content/Menus/Blank", AssetRequestMode.AsyncLoad); + + public override ModSurfaceBackgroundStyle MenuBackgroundStyle => ModContent.GetInstance(); + + public override bool PreDrawLogo(SpriteBatch spriteBatch, ref Vector2 logoDrawCenter, ref float logoRotation, ref float logoScale, ref Color drawColor) + { + Texture2D texture = ModContent.Request("UnCalamityModMusic/Content/Menus/ResurrectionBackground", AssetRequestMode.AsyncLoad).Value; + Vector2 drawOffset = Vector2.Zero; + + float scaleX = (float)Main.screenWidth / (float)texture.Width; + float scaleY = (float)Main.screenHeight / (float)texture.Height; + float scale = scaleX; + if (scaleX != scaleY) + { + if (scaleY > scaleX) + { + scale = scaleY; + drawOffset.X -= (texture.Width * scale - Main.screenWidth) * 0.5f; + } + else + { + drawOffset.Y -= (texture.Height * scale - Main.screenHeight) * 0.5f; + } + } + + spriteBatch.Draw + ( + texture, + drawOffset, + null, + Color.White, + 0f, + Vector2.Zero, + scale, + 0, + 0f + ); + + Vector2 startingPosition = default(Vector2); + for (int k = 0; k < 5; k++) + { + if (Main.rand.NextBool(4)) + { + int lifetime = Main.rand.Next(200, 300); + float depth = Main.rand.NextFloat(1.8f, 5f); + startingPosition = new(Main.screenWidth * Main.rand.NextFloat(-0.1f, 1.1f), Main.screenHeight * 1.05f); + Vector2 startingVelocity = -Vector2.UnitY.RotatedBy(Main.rand.NextFloat(-0.9f, 0.9f)) * 4f; + Color EmberColor = selectEmberColor(); + Embers.Add(new Ember(lifetime, Embers.Count, depth, EmberColor, startingPosition, startingVelocity)); + } + } + for (int j = 0; j < Embers.Count; j++) + { + Embers[j].Scale = Utils.GetLerpValue(Embers[j].LifeTime, Embers[j].LifeTime / 3, Embers[j].Time, clamped: true); + Embers[j].Scale *= MathHelper.Lerp(0.6f, 0.9f, Embers[j].IdentityIndex % 6f / 6f); + if (Embers[j].IdentityIndex % 13 == 12) + { + Embers[j].Scale *= 2f; + } + float flySpeed = MathHelper.Lerp(3.2f, 14f, Embers[j].IdentityIndex % 21f / 21f); + Vector2 idealVelocity = -Vector2.UnitY.RotatedBy(MathHelper.Lerp(-0.44f, 0.44f, (float)Math.Sin((double)(Embers[j].Time / 16f + Embers[j].IdentityIndex)) * 0.5f + 0.5f)); + idealVelocity = (idealVelocity + Vector2.UnitX).SafeNormalize(Vector2.UnitY) * flySpeed; + float movementInterpolant = MathHelper.Lerp(0.01f, 0.08f, Utils.GetLerpValue(45f, 145f, Embers[j].Time, clamped: true)); + Embers[j].Velocity = Vector2.Lerp(Embers[j].Velocity, idealVelocity, movementInterpolant); + Embers[j].Time++; + Ember Ember = Embers[j]; + Ember.Center += Embers[j].Velocity; + } + + Embers.RemoveAll((Ember Ember) => Ember.Time >= Ember.LifeTime); + Texture2D EmberTexture = ModContent.Request("UnCalamityModMusic/Content/Menus/Particle", AssetRequestMode.AsyncLoad).Value; + for (int i = 0; i < Embers.Count; i++) + { + Vector2 drawPosition = Embers[i].Center; + spriteBatch.Draw + ( + EmberTexture, + drawPosition, + null, + Embers[i].DrawColor, + 0f, + EmberTexture.Size() * 0.5f, + Embers[i].Scale, + 0, + 0f + ); + } + + Main.time = 27000; + Main.dayTime = true; + drawColor = Color.White; + Vector2 drawPos = default(Vector2); + drawPos = new(Main.screenWidth / 2f, 100f); + spriteBatch.End(); + spriteBatch.Begin(0, BlendState.NonPremultiplied, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + spriteBatch.Draw(Logo.Value, drawPos, null, drawColor, logoRotation, Logo.Value.Size() * 0.5f, logoScale, 0, 0f); + spriteBatch.End(); + spriteBatch.Begin(0, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + return false; + + static Color selectEmberColor() + { + if (Main.rand.NextBool(3)) + { + return Color.Lerp(Color.DarkBlue, Color.LightCyan, Main.rand.NextFloat()); + } + return Color.Lerp(Color.Turquoise, Color.LimeGreen, Main.rand.NextFloat(0.9f)); + } + } + } + + public class MemoryMenu : ModMenu + { + public override int Music => MusicPathing.GetMusicSlot("FalseEpilogue"); + + public override string DisplayName => Language.GetTextValue("Mods.UnCalamityModMusic.Menus.MemoryMenu"); + + public class Ember + { + public int Time; + + public int LifeTime; + + public int IdentityIndex; + + public float Scale; + + public float Depth; + + public Color DrawColor; + + public Vector2 Velocity; + + public Vector2 Center; + + public Ember(int lifetime, int identity, float depth, Color color, Vector2 startingPosition, Vector2 startingVelocity) + { + LifeTime = lifetime; + IdentityIndex = identity; + Depth = depth; + DrawColor = color; + Center = startingPosition; + Velocity = startingVelocity; + } + } + + public static List Embers { get; internal set; } = new List(); + + public override Asset Logo => ModContent.Request("UnCalamityModMusic/Content/Menus/Logo", AssetRequestMode.AsyncLoad); + + public override Asset SunTexture => ModContent.Request("UnCalamityModMusic/Content/Menus/Blank", AssetRequestMode.AsyncLoad); + + public override Asset MoonTexture => ModContent.Request("UnCalamityModMusic/Content/Menus/Blank", AssetRequestMode.AsyncLoad); + + public override ModSurfaceBackgroundStyle MenuBackgroundStyle => ModContent.GetInstance(); + + public override bool PreDrawLogo(SpriteBatch spriteBatch, ref Vector2 logoDrawCenter, ref float logoRotation, ref float logoScale, ref Color drawColor) + { + Texture2D texture = ModContent.Request("UnCalamityModMusic/Content/Menus/MemoryBackground", AssetRequestMode.AsyncLoad).Value; + Vector2 drawOffset = Vector2.Zero; + + float scaleX = (float)Main.screenWidth / (float)texture.Width; + float scaleY = (float)Main.screenHeight / (float)texture.Height; + float scale = scaleX; + if (scaleX != scaleY) + { + if (scaleY > scaleX) + { + scale = scaleY; + drawOffset.X -= (texture.Width * scale - Main.screenWidth) * 0.5f; + } + else + { + drawOffset.Y -= (texture.Height * scale - Main.screenHeight) * 0.5f; + } + } + + spriteBatch.Draw + ( + texture, + drawOffset, + null, + Color.White, + 0f, + Vector2.Zero, + scale, + 0, + 0f + ); + + Vector2 startingPosition = default(Vector2); + for (int k = 0; k < 5; k++) + { + if (Main.rand.NextBool(4)) + { + int lifetime = Main.rand.Next(200, 300); + float depth = Main.rand.NextFloat(1.8f, 5f); + startingPosition = new(Main.screenWidth * Main.rand.NextFloat(-0.1f, 1.1f), Main.screenHeight * 1.05f); + Vector2 startingVelocity = -Vector2.UnitY.RotatedBy(Main.rand.NextFloat(-0.9f, 0.9f)) * 4f; + Color EmberColor = selectEmberColor(); + Embers.Add(new Ember(lifetime, Embers.Count, depth, EmberColor, startingPosition, startingVelocity)); + } + } + for (int j = 0; j < Embers.Count; j++) + { + Embers[j].Scale = Utils.GetLerpValue(Embers[j].LifeTime, Embers[j].LifeTime / 3, Embers[j].Time, clamped: true); + Embers[j].Scale *= MathHelper.Lerp(0.6f, 0.9f, Embers[j].IdentityIndex % 6f / 6f); + if (Embers[j].IdentityIndex % 13 == 12) + { + Embers[j].Scale *= 2f; + } + float flySpeed = MathHelper.Lerp(3.2f, 14f, Embers[j].IdentityIndex % 21f / 21f); + Vector2 idealVelocity = -Vector2.UnitY.RotatedBy(MathHelper.Lerp(-0.44f, 0.44f, (float)Math.Sin((double)(Embers[j].Time / 16f + Embers[j].IdentityIndex)) * 0.5f + 0.5f)); + idealVelocity = (idealVelocity + Vector2.UnitX).SafeNormalize(Vector2.UnitY) * flySpeed; + float movementInterpolant = MathHelper.Lerp(0.01f, 0.08f, Utils.GetLerpValue(45f, 145f, Embers[j].Time, clamped: true)); + Embers[j].Velocity = Vector2.Lerp(Embers[j].Velocity, idealVelocity, movementInterpolant); + Embers[j].Time++; + Ember Ember = Embers[j]; + Ember.Center += Embers[j].Velocity; + } + + Embers.RemoveAll((Ember Ember) => Ember.Time >= Ember.LifeTime); + Texture2D EmberTexture = ModContent.Request("UnCalamityModMusic/Content/Menus/Particle", AssetRequestMode.AsyncLoad).Value; + for (int i = 0; i < Embers.Count; i++) + { + Vector2 drawPosition = Embers[i].Center; + spriteBatch.Draw + ( + EmberTexture, + drawPosition, + null, + Embers[i].DrawColor, + 0f, + EmberTexture.Size() * 0.5f, + Embers[i].Scale, + 0, + 0f + ); + } + + Main.time = 27000; + Main.dayTime = true; + drawColor = Color.White; + Vector2 drawPos = default(Vector2); + drawPos = new(Main.screenWidth / 2f, 100f); + spriteBatch.End(); + spriteBatch.Begin(0, BlendState.NonPremultiplied, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + spriteBatch.Draw(Logo.Value, drawPos, null, drawColor, logoRotation, Logo.Value.Size() * 0.5f, logoScale, 0, 0f); + spriteBatch.End(); + spriteBatch.Begin(0, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, Main.Rasterizer, null, Main.UIScaleMatrix); + return false; + + static Color selectEmberColor() + { + if (Main.rand.NextBool(3)) + { + return Color.Lerp(Color.DarkRed, Color.LightGray, Main.rand.NextFloat()); + } + return Color.Lerp(Color.MediumVioletRed, Color.Orange, Main.rand.NextFloat(0.9f)); + } + } + } + + internal class BlankBackground : ModSurfaceBackgroundStyle + { + public override void ModifyFarFades(float[] fades, float transitionSpeed) + { + for (int i = 0; i < fades.Length; i++) + { + if (i == Slot) + { + fades[i] += transitionSpeed; + if (fades[i] > 1f) + { + fades[i] = 1f; + } + } + else + { + fades[i] -= transitionSpeed; + if (fades[i] < 0f) + { + fades[i] = 0f; + } + } + } + } + + public override int ChooseCloseTexture(ref float scale, ref double parallax, ref float a, ref float b) + { + return BackgroundTextureLoader.GetBackgroundSlot("UnCalamityModMusic/Content/Menus/Blank"); + } + + public override int ChooseFarTexture() + { + return BackgroundTextureLoader.GetBackgroundSlot("UnCalamityModMusic/Content/Menus/Blank"); + } + + public override int ChooseMiddleTexture() + { + return BackgroundTextureLoader.GetBackgroundSlot("UnCalamityModMusic/Content/Menus/Blank"); + } + + public override bool PreDrawCloseBackground(SpriteBatch spriteBatch) + { + return false; + } + } +} diff --git a/Content/Menus/Particle.png b/Content/Menus/Particle.png new file mode 100644 index 0000000..9a13231 Binary files /dev/null and b/Content/Menus/Particle.png differ diff --git a/Content/Menus/ResurrectionBackground.png b/Content/Menus/ResurrectionBackground.png new file mode 100644 index 0000000..2ea9ee7 Binary files /dev/null and b/Content/Menus/ResurrectionBackground.png differ diff --git a/Content/Recipes.cs b/Content/Recipes.cs new file mode 100644 index 0000000..b4b8b03 --- /dev/null +++ b/Content/Recipes.cs @@ -0,0 +1,1227 @@ +using Terraria; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace UnCalamityModMusic.Content +{ + public class Recipes : ModSystem + { + public static int musicBoxCraftingStation = TileID.HeavyWorkBench; + public static int musicBoxCraftingStationVanilla = TileID.TinkerersWorkbench; + + public static RecipeGroup CopperOreGroup; + public static RecipeGroup GoldOreGroup; + public static RecipeGroup CobaltOreGroup; + public static RecipeGroup CopperBarGroup; + public static RecipeGroup GoldBarGroup; + public static RecipeGroup MythrilBarGroup; + public static RecipeGroup AdamantiteBarGroup; + public static RecipeGroup EvilPowderGroup; + public static RecipeGroup TombstoneGroup; + + public override void Unload() + { + CopperOreGroup = null; + GoldOreGroup = null; + CobaltOreGroup = null; + CopperBarGroup = null; + GoldBarGroup = null; + MythrilBarGroup = null; + AdamantiteBarGroup = null; + EvilPowderGroup = null; + TombstoneGroup = null; + } + + public override void AddRecipeGroups() + { + CopperOreGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperOre)}", + ItemID.CopperOre, ItemID.TinOre + ); + RecipeGroup.RegisterGroup("VCMM:CopperOreGroup", CopperOreGroup); + + GoldOreGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldOre)}", + ItemID.GoldOre, ItemID.PlatinumOre + ); + RecipeGroup.RegisterGroup("VCMM:GoldOreGroup", GoldOreGroup); + + CobaltOreGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CobaltOre)}", + ItemID.CobaltOre, ItemID.PalladiumOre + ); + RecipeGroup.RegisterGroup("VCMM:CobaltOreGroup", CobaltOreGroup); + + CopperBarGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperBar)}", + ItemID.CopperBar, ItemID.TinBar + ); + RecipeGroup.RegisterGroup("VCMM:CopperBarGroup", CopperBarGroup); + + GoldBarGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldBar)}", + ItemID.GoldBar, ItemID.PlatinumBar + ); + RecipeGroup.RegisterGroup("VCMM:GoldBarGroup", GoldBarGroup); + + MythrilBarGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.MythrilBar)}", + ItemID.MythrilBar, ItemID.OrichalcumBar + ); + RecipeGroup.RegisterGroup("VCMM:MythrilBarGroup", MythrilBarGroup); + + AdamantiteBarGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AdamantiteBar)}", + ItemID.AdamantiteBar, ItemID.TitaniumBar + ); + RecipeGroup.RegisterGroup("VCMM:AdamantiteBarGroup", AdamantiteBarGroup); + + EvilPowderGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.EvilPowder")}", + ItemID.VilePowder, ItemID.ViciousPowder + ); + RecipeGroup.RegisterGroup("VCMM:EvilPowderGroup", EvilPowderGroup); + + TombstoneGroup = new RecipeGroup + ( + () => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.Tombstone)}", + ItemID.Tombstone, ItemID.GraveMarker, ItemID.CrossGraveMarker, ItemID.Headstone, ItemID.Gravestone, ItemID.Obelisk, ItemID.RichGravestone1, ItemID.RichGravestone2, ItemID.RichGravestone3, ItemID.RichGravestone4, ItemID.RichGravestone5 + ); + RecipeGroup.RegisterGroup("VCMM:TombstoneGroup", TombstoneGroup); + } + + public override void AddRecipes() + { + var calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + var calamityModMusic = ModLoader.TryGetMod("CalamityModMusic", out Mod cmusic); + var calamityVanities = ModLoader.TryGetMod("CalValEX", out Mod calval); + var catalystMod = ModLoader.TryGetMod("CatalystMod", out Mod catalyst); + + //Empty Music Box + Recipe.Create(ItemID.MusicBox, 1) + .AddRecipeGroup(RecipeGroupID.Wood, 6) + .AddRecipeGroup("VCMM:CopperBarGroup", 5) + .AddRecipeGroup(RecipeGroupID.IronBar, 2) + .AddIngredient(ItemID.LifeCrystal, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + + #region Calamity Music Boxes + if (calamityMod) + { + //Exo Mech Selection + try + { + Recipe.Create(calamity.Find("DraedonExoSelectMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "EndothermicEnergy", 10) + .AddIngredient(calamity, "AuricBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Codebreaker + try + { + Recipe.Create(calamity.Find("DraedonTalkMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "ExoPrismPanel", 10) + .AddIngredient(calamity, "AuricBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + + if (calamityModMusic) + { + //Existing Recipes Removal + Recipe[] mainRecipe = Main.recipe; + foreach (Recipe recipeFinder in mainRecipe) + { + if (recipeFinder.HasResult(cmusic.Find("AcidRainTier1MusicBox"))) + { + recipeFinder.DisableRecipe(); + } + if (recipeFinder.HasResult(cmusic.Find("CalamitasDefeatMusicBox"))) + { + recipeFinder.DisableRecipe(); + } + } + } + + if (calamityModMusic && calamityMod) + { + //Abyss Layer 1 + try + { + Recipe.Create(cmusic.Find("AbyssLayer1MusicBox").Type, 1) + .AddIngredient(calamity, "SulphurousShale", 10) + .AddIngredient(calamity, "SulphurousSandstone", 10) + .AddIngredient(calamity, "AbyssTreasureChest", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Abyss Layer 2 + try + { + Recipe.Create(cmusic.Find("AbyssLayer2MusicBox").Type, 1) + .AddIngredient(calamity, "AbyssGravel", 10) + .AddIngredient(calamity, "PlantyMush", 10) + .AddIngredient(calamity, "StrangeOrb", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Abyss Layer 3 + try + { + Recipe.Create(cmusic.Find("AbyssLayer3MusicBox").Type, 1) + .AddIngredient(calamity, "PyreMantle", 10) + .AddIngredient(calamity, "DepthCells", 10) + .AddIngredient(calamity, "ChaoticOre", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Abyss Layer 4 + try + { + Recipe.Create(cmusic.Find("AbyssLayer4MusicBox").Type, 1) + .AddIngredient(calamity, "Voidstone", 10) + .AddIngredient(calamity, "Lumenite", 10) + .AddIngredient(calamity, "ReaperTooth", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Acid Rain Tier 1 + try + { + Recipe.Create(cmusic.Find("AcidRainTier1MusicBox").Type, 1) + .AddIngredient(calamity, "Acidwood", 10) + .AddIngredient(calamity, "SulfuricScale", 10) + .AddIngredient(calamity, "SulphurousSand", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Acid Rain Tier 3 + try + { + Recipe.Create(cmusic.Find("AcidRainTier3MusicBox").Type, 1) + .AddIngredient(calamity, "Acidwood", 10) + .AddIngredient(calamity, "CorrodedFossil", 10) + .AddIngredient(calamity, "MaulerTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("AcidRainTier3MusicBox").Type, 1) + .AddIngredient(calamity, "Acidwood", 10) + .AddIngredient(calamity, "CorrodedFossil", 10) + .AddIngredient(calamity, "NuclearTerrorTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Anahita + try + { + Recipe.Create(cmusic.Find("AnahitaMusicBox").Type, 1) + .AddIngredient(calamity, "AnahitaTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Anahita's Lure + try + { + Recipe.Create(cmusic.Find("AnahitasLureMusicBox").Type, 1) + .AddIngredient(calamity, "AnahitaTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Aquatic Scourge + try + { + Recipe.Create(cmusic.Find("AquaticScourgeMusicBox").Type, 1) + .AddIngredient(calamity, "AquaticScourgeTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Astral Infection + try + { + Recipe.Create(cmusic.Find("AstralInfectionMusicBox").Type, 1) + .AddIngredient(calamity, "AstralMonolith", 10) + .AddIngredient(calamity, "Stardust", 10) + .AddIngredient(ItemID.FallenStar, 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Underground Astral Infection + try + { + Recipe.Create(cmusic.Find("AstralInfectionUndergroundMusicBox").Type, 1) + .AddIngredient(calamity, "AstralStone", 10) + .AddIngredient(calamity, "Stardust", 10) + .AddIngredient(calamity, "AstralClay", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Astrum Aureus + try + { + Recipe.Create(cmusic.Find("AstrumAureusMusicBox").Type, 1) + .AddIngredient(calamity, "AstrageldonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Astrum Deus + try + { + Recipe.Create(cmusic.Find("AstrumDeusMusicBox").Type, 1) + .AddIngredient(calamity, "AstrumDeusTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Bio Lab + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "Chaosplate", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "Cinderplate", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "Elumplate", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "Navyplate", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "PlagueContainmentCells", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("BioLabMusicBox").Type, 1) + .AddIngredient(calamity, "MysteriousCircuitry", 10) + .AddIngredient(calamity, "DubiousPlating", 10) + .AddIngredient(calamity, "Onyxplate", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Boss Rush Tier 1 + try + { + Recipe.Create(cmusic.Find("BossRushTier1MusicBox").Type, 1) + .AddIngredient(ItemID.WallofFleshTrophy, 1) + .AddIngredient(calamity, "ShadowspecBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Boss Rush Tier 2 + try + { + Recipe.Create(cmusic.Find("BossRushTier2MusicBox").Type, 1) + .AddIngredient(ItemID.PlanteraTrophy, 1) + .AddIngredient(calamity, "ShadowspecBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Boss Rush Tier 3 + try + { + Recipe.Create(cmusic.Find("BossRushTier3MusicBox").Type, 1) + .AddIngredient(ItemID.MoonLordTrophy, 1) + .AddIngredient(calamity, "ShadowspecBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Boss Rush Tier 4 + try + { + Recipe.Create(cmusic.Find("BossRushTier4MusicBox").Type, 1) + .AddIngredient(calamity, "DevourerofGodsTrophy", 1) + .AddIngredient(calamity, "ShadowspecBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Boss Rush Tier 5 + try + { + Recipe.Create(cmusic.Find("BossRushTier5MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) + .AddIngredient(calamity, "ShadowspecBar", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Brimstone Crags + try + { + Recipe.Create(cmusic.Find("BrimstoneCragsMusicBox").Type, 1) + .AddIngredient(calamity, "ScorchedBone", 10) + .AddIngredient(calamity, "BrimstoneSlab", 10) + .AddIngredient(calamity, "ScorchedRemains", 10) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Brimstone Elemental + try + { + Recipe.Create(cmusic.Find("BrimstoneElementalMusicBox").Type, 1) + .AddIngredient(calamity, "BrimstoneElementalTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Calamitas Clone + try + { + Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) + .AddIngredient(calamity, "CalamitasTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) + .AddIngredient(calamity, "CataclysmTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasCloneMusicBox").Type, 1) + .AddIngredient(calamity, "CatastropheTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Calamitas Defeat + try + { + Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasDefeatMusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Calamitas Phase 1 + try + { + Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase1MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Calamitas Phase 2 + try + { + Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase2MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Calamitas Phase 3 + try + { + Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCalamitasTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCataclysmTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("CalamitasPhase3MusicBox").Type, 1) + .AddIngredient(calamity, "SupremeCatastropheTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Ceaseless Void + try + { + Recipe.Create(cmusic.Find("CeaselessVoidMusicBox").Type, 1) + .AddIngredient(calamity, "CeaselessVoidTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Crabulon + try + { + Recipe.Create(cmusic.Find("CrabulonMusicBox").Type, 1) + .AddIngredient(calamity, "CrabulonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Cryogen + try + { + Recipe.Create(cmusic.Find("CryogenMusicBox").Type, 1) + .AddIngredient(calamity, "CryogenTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Desert Scourge + try + { + Recipe.Create(cmusic.Find("DesertScourgeMusicBox").Type, 1) + .AddIngredient(calamity, "DesertScourgeTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Devourer of Gods Phase 1 + try + { + Recipe.Create(cmusic.Find("DevourerofGodsPhase1MusicBox").Type, 1) + .AddIngredient(calamity, "DevourerofGodsTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Devourer of Gods Phase 2 + try + { + Recipe.Create(cmusic.Find("DevourerofGodsPhase2MusicBox").Type, 1) + .AddIngredient(calamity, "DevourerofGodsTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Dragonfolly + try + { + Recipe.Create(cmusic.Find("DragonfollyMusicBox").Type, 1) + .AddIngredient(calamity, "BumblebirbTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Exo Mechs + try + { + Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) + .AddIngredient(calamity, "ArtemisTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) + .AddIngredient(calamity, "ApolloTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) + .AddIngredient(calamity, "ThanatosTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + try + { + Recipe.Create(cmusic.Find("ExoMechsMusicBox").Type, 1) + .AddIngredient(calamity, "AresTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Hive Mind + try + { + Recipe.Create(cmusic.Find("HiveMindMusicBox").Type, 1) + .AddIngredient(calamity, "HiveMindTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Leviathan + try + { + Recipe.Create(cmusic.Find("LeviathanMusicBox").Type, 1) + .AddIngredient(calamity, "LeviathanTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Old Duke + try + { + Recipe.Create(cmusic.Find("OldDukeMusicBox").Type, 1) + .AddIngredient(calamity, "OldDukeTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Perforators + try + { + Recipe.Create(cmusic.Find("PerforatorsMusicBox").Type, 1) + .AddIngredient(calamity, "PerforatorTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Plaguebringer Goliath + try + { + Recipe.Create(cmusic.Find("PlaguebringerGoliathMusicBox").Type, 1) + .AddIngredient(calamity, "PlaguebringerGoliathTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Polterghast + try + { + Recipe.Create(cmusic.Find("PolterghastMusicBox").Type, 1) + .AddIngredient(calamity, "PolterghastTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Primordial Wyrm + try + { + Recipe.Create(cmusic.Find("PrimordialWyrmMusicBox").Type, 1) + .AddIngredient(calamity, "HalibutCannon", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Profaned Guardians + try + { + Recipe.Create(cmusic.Find("ProfanedGuardiansMusicBox").Type, 1) + .AddIngredient(calamity, "ProfanedGuardianTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Providence + try + { + Recipe.Create(cmusic.Find("ProvidenceMusicBox").Type, 1) + .AddIngredient(calamity, "ProvidenceTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Ravager + try + { + Recipe.Create(cmusic.Find("RavagerMusicBox").Type, 1) + .AddIngredient(calamity, "RavagerTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Signus + try + { + Recipe.Create(cmusic.Find("SignusMusicBox").Type, 1) + .AddIngredient(calamity, "SignusTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Slime God + try + { + Recipe.Create(cmusic.Find("SlimeGodMusicBox").Type, 1) + .AddIngredient(calamity, "SlimeGodTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Storm Weaver + try + { + Recipe.Create(cmusic.Find("StormWeaverMusicBox").Type, 1) + .AddIngredient(calamity, "WeaverTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Sulphurous Sea Day + try + { + Recipe.Create(cmusic.Find("SulphurousSeaDayMusicBox").Type, 1) + .AddIngredient(calamity, "Acidwood", 10) + .AddIngredient(calamity, "SulphurousSand", 10) + .AddIngredient(ItemID.Seashell, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Sulphurous Sea Night + try + { + Recipe.Create(cmusic.Find("SulphurousSeaNightMusicBox").Type, 1) + .AddIngredient(calamity, "Acidwood", 10) + .AddIngredient(calamity, "SulphurousSand", 10) + .AddIngredient(ItemID.Starfish, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Sunken Sea + try + { + Recipe.Create(cmusic.Find("SunkenSeaMusicBox").Type, 1) + .AddIngredient(calamity, "Navystone", 10) + .AddIngredient(calamity, "SeaPrism", 10) + .AddIngredient(ItemID.WhitePearl, 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Yharon Phase 1 + try + { + Recipe.Create(cmusic.Find("YharonPhase1MusicBox").Type, 1) + .AddIngredient(calamity, "YharonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Yharon Phase 2 + try + { + Recipe.Create(cmusic.Find("YharonPhase2MusicBox").Type, 1) + .AddIngredient(calamity, "YharonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + #endregion + + #region Calamity Addon Music Boxes + if (calamityVanities) + { + //Astral Blight + try + { + Recipe.Create(calval.Find("AstralMusicBox").Type, 1) + .AddIngredient(calval, "AstralTreeWood", 10) + .AddIngredient(calval, "AstralDirt", 10) + .AddIngredient(calval, "BlightolemurItem", 3) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + + if (catalystMod) + { + //Astrageldon Phase 1 + try + { + Recipe.Create(catalyst.Find("AstrageldonPhase1MusicBox").Type, 1) + .AddIngredient(catalyst, "AstrageldonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + + //Astrageldon Phase 2 + try + { + Recipe.Create(catalyst.Find("AstrageldonPhase2MusicBox").Type, 1) + .AddIngredient(catalyst, "AstrageldonTrophy", 1) + .AddIngredient(ItemID.MusicBox, 1) + .AddTile(musicBoxCraftingStation) + .Register(); + } + catch + { + UnCalamityModMusic.Instance.Logger.Debug(Language.GetTextValue("Mods.UnCalamityModMusic.Recipes.NameMismatchError")); + } + } + #endregion + } + } +} \ No newline at end of file diff --git a/Content/Tiles/AbyssLayer3AltMusicBox.cs b/Content/Tiles/AbyssLayer3AltMusicBox.cs new file mode 100644 index 0000000..eabc9f7 --- /dev/null +++ b/Content/Tiles/AbyssLayer3AltMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("AbyssLowAltMusicBox")] + public class AbyssLayer3AltMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/AbyssLayer3AltMusicBox.png b/Content/Tiles/AbyssLayer3AltMusicBox.png new file mode 100644 index 0000000..631b3da Binary files /dev/null and b/Content/Tiles/AbyssLayer3AltMusicBox.png differ diff --git a/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png b/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png new file mode 100644 index 0000000..42c806e Binary files /dev/null and b/Content/Tiles/AbyssLayer3AltMusicBox_Highlight.png differ diff --git a/Content/Tiles/BloodMoonDeathMusicBox.cs b/Content/Tiles/BloodMoonDeathMusicBox.cs new file mode 100644 index 0000000..d0e4b23 --- /dev/null +++ b/Content/Tiles/BloodMoonDeathMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("BloodMoon2MusicBox")] + public class BloodMoonDeathMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/BloodMoonDeathMusicBox.png b/Content/Tiles/BloodMoonDeathMusicBox.png new file mode 100644 index 0000000..4267561 Binary files /dev/null and b/Content/Tiles/BloodMoonDeathMusicBox.png differ diff --git a/Content/Tiles/BloodMoonDeathMusicBox_Highlight.png b/Content/Tiles/BloodMoonDeathMusicBox_Highlight.png new file mode 100644 index 0000000..8e6d0d5 Binary files /dev/null and b/Content/Tiles/BloodMoonDeathMusicBox_Highlight.png differ diff --git a/Content/Tiles/BloodMoonMusicBox.cs b/Content/Tiles/BloodMoonMusicBox.cs new file mode 100644 index 0000000..bd49917 --- /dev/null +++ b/Content/Tiles/BloodMoonMusicBox.cs @@ -0,0 +1,12 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("BloodMoon1MusicBox")] + public class BloodMoonMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/BloodMoonMusicBox.png b/Content/Tiles/BloodMoonMusicBox.png new file mode 100644 index 0000000..4cb0425 Binary files /dev/null and b/Content/Tiles/BloodMoonMusicBox.png differ diff --git a/Content/Tiles/BloodMoonMusicBox_Highlight.png b/Content/Tiles/BloodMoonMusicBox_Highlight.png new file mode 100644 index 0000000..e196b2f Binary files /dev/null and b/Content/Tiles/BloodMoonMusicBox_Highlight.png differ diff --git a/Content/Tiles/BrainofCthulhuMusicBox.cs b/Content/Tiles/BrainofCthulhuMusicBox.cs new file mode 100644 index 0000000..0423e73 --- /dev/null +++ b/Content/Tiles/BrainofCthulhuMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class BrainofCthulhuMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/BrainofCthulhuMusicBox.png b/Content/Tiles/BrainofCthulhuMusicBox.png new file mode 100644 index 0000000..37cd3c3 Binary files /dev/null and b/Content/Tiles/BrainofCthulhuMusicBox.png differ diff --git a/Content/Tiles/BrainofCthulhuMusicBox_Highlight.png b/Content/Tiles/BrainofCthulhuMusicBox_Highlight.png new file mode 100644 index 0000000..049f456 Binary files /dev/null and b/Content/Tiles/BrainofCthulhuMusicBox_Highlight.png differ diff --git a/Content/Tiles/CavernsMusicBox.cs b/Content/Tiles/CavernsMusicBox.cs new file mode 100644 index 0000000..ddb88ea --- /dev/null +++ b/Content/Tiles/CavernsMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Underground2MusicBox")] + public class CavernsMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/CavernsMusicBox.png b/Content/Tiles/CavernsMusicBox.png new file mode 100644 index 0000000..272419a Binary files /dev/null and b/Content/Tiles/CavernsMusicBox.png differ diff --git a/Content/Tiles/CavernsMusicBox_Highlight.png b/Content/Tiles/CavernsMusicBox_Highlight.png new file mode 100644 index 0000000..0147dde Binary files /dev/null and b/Content/Tiles/CavernsMusicBox_Highlight.png differ diff --git a/Content/Tiles/CorruptionMusicBox.cs b/Content/Tiles/CorruptionMusicBox.cs new file mode 100644 index 0000000..bcfb8d6 --- /dev/null +++ b/Content/Tiles/CorruptionMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class CorruptionMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/CorruptionMusicBox.png b/Content/Tiles/CorruptionMusicBox.png new file mode 100644 index 0000000..cea6eea Binary files /dev/null and b/Content/Tiles/CorruptionMusicBox.png differ diff --git a/Content/Tiles/CorruptionMusicBox_Highlight.png b/Content/Tiles/CorruptionMusicBox_Highlight.png new file mode 100644 index 0000000..f2a01d8 Binary files /dev/null and b/Content/Tiles/CorruptionMusicBox_Highlight.png differ diff --git a/Content/Tiles/CorruptionUndergroundMusicBox.cs b/Content/Tiles/CorruptionUndergroundMusicBox.cs new file mode 100644 index 0000000..ed1dedd --- /dev/null +++ b/Content/Tiles/CorruptionUndergroundMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("CorruptionUgMusicBox")] + public class CorruptionUndergroundMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/CorruptionUndergroundMusicBox.png b/Content/Tiles/CorruptionUndergroundMusicBox.png new file mode 100644 index 0000000..e78222a Binary files /dev/null and b/Content/Tiles/CorruptionUndergroundMusicBox.png differ diff --git a/Content/Tiles/CorruptionUndergroundMusicBox_Highlight.png b/Content/Tiles/CorruptionUndergroundMusicBox_Highlight.png new file mode 100644 index 0000000..11ce95b Binary files /dev/null and b/Content/Tiles/CorruptionUndergroundMusicBox_Highlight.png differ diff --git a/Content/Tiles/CrimsonMusicBox.cs b/Content/Tiles/CrimsonMusicBox.cs new file mode 100644 index 0000000..1338cc6 --- /dev/null +++ b/Content/Tiles/CrimsonMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class CrimsonMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/CrimsonMusicBox.png b/Content/Tiles/CrimsonMusicBox.png new file mode 100644 index 0000000..b06ef09 Binary files /dev/null and b/Content/Tiles/CrimsonMusicBox.png differ diff --git a/Content/Tiles/CrimsonMusicBox_Highlight.png b/Content/Tiles/CrimsonMusicBox_Highlight.png new file mode 100644 index 0000000..107633d Binary files /dev/null and b/Content/Tiles/CrimsonMusicBox_Highlight.png differ diff --git a/Content/Tiles/CrimsonUndergroundMusicBox.cs b/Content/Tiles/CrimsonUndergroundMusicBox.cs new file mode 100644 index 0000000..704fce1 --- /dev/null +++ b/Content/Tiles/CrimsonUndergroundMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("CrimsonUgMusicBox")] + public class CrimsonUndergroundMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/CrimsonUndergroundMusicBox.png b/Content/Tiles/CrimsonUndergroundMusicBox.png new file mode 100644 index 0000000..da1a6b8 Binary files /dev/null and b/Content/Tiles/CrimsonUndergroundMusicBox.png differ diff --git a/Content/Tiles/CrimsonUndergroundMusicBox_Highlight.png b/Content/Tiles/CrimsonUndergroundMusicBox_Highlight.png new file mode 100644 index 0000000..65d21df Binary files /dev/null and b/Content/Tiles/CrimsonUndergroundMusicBox_Highlight.png differ diff --git a/Content/Tiles/DesertMusicBox.cs b/Content/Tiles/DesertMusicBox.cs new file mode 100644 index 0000000..4286899 --- /dev/null +++ b/Content/Tiles/DesertMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class DesertMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/DesertMusicBox.png b/Content/Tiles/DesertMusicBox.png new file mode 100644 index 0000000..f1651b5 Binary files /dev/null and b/Content/Tiles/DesertMusicBox.png differ diff --git a/Content/Tiles/DesertMusicBox_Highlight.png b/Content/Tiles/DesertMusicBox_Highlight.png new file mode 100644 index 0000000..4af38d4 Binary files /dev/null and b/Content/Tiles/DesertMusicBox_Highlight.png differ diff --git a/Content/Tiles/DungeonMusicBox.cs b/Content/Tiles/DungeonMusicBox.cs new file mode 100644 index 0000000..899efe4 --- /dev/null +++ b/Content/Tiles/DungeonMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class DungeonMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/DungeonMusicBox.png b/Content/Tiles/DungeonMusicBox.png new file mode 100644 index 0000000..007deda Binary files /dev/null and b/Content/Tiles/DungeonMusicBox.png differ diff --git a/Content/Tiles/DungeonMusicBox_Highlight.png b/Content/Tiles/DungeonMusicBox_Highlight.png new file mode 100644 index 0000000..e668180 Binary files /dev/null and b/Content/Tiles/DungeonMusicBox_Highlight.png differ diff --git a/Content/Tiles/EaterofWorldsMusicBox.cs b/Content/Tiles/EaterofWorldsMusicBox.cs new file mode 100644 index 0000000..299ce1f --- /dev/null +++ b/Content/Tiles/EaterofWorldsMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class EaterofWorldsMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/EaterofWorldsMusicBox.png b/Content/Tiles/EaterofWorldsMusicBox.png new file mode 100644 index 0000000..09146da Binary files /dev/null and b/Content/Tiles/EaterofWorldsMusicBox.png differ diff --git a/Content/Tiles/EaterofWorldsMusicBox_Highlight.png b/Content/Tiles/EaterofWorldsMusicBox_Highlight.png new file mode 100644 index 0000000..7bc690f Binary files /dev/null and b/Content/Tiles/EaterofWorldsMusicBox_Highlight.png differ diff --git a/Content/Tiles/External/MusicBox.cs b/Content/Tiles/External/MusicBox.cs new file mode 100644 index 0000000..aa51b38 --- /dev/null +++ b/Content/Tiles/External/MusicBox.cs @@ -0,0 +1,15 @@ +using Terraria; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles.External +{ + public class MusicBox : MusicBoxTile + { + public override string HighlightTexture => "UnCalamityModMusic/Content/Menus/Blank"; + + public override void MouseOver(int i, int j) + { + Main.LocalPlayer.cursorItemIconEnabled = false; + } + } +} diff --git a/Content/Tiles/External/MusicBox.png b/Content/Tiles/External/MusicBox.png new file mode 100644 index 0000000..52f7046 Binary files /dev/null and b/Content/Tiles/External/MusicBox.png differ diff --git a/Content/Tiles/EyeofCthulhuMusicBox.cs b/Content/Tiles/EyeofCthulhuMusicBox.cs new file mode 100644 index 0000000..9f15233 --- /dev/null +++ b/Content/Tiles/EyeofCthulhuMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class EyeofCthulhuMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/EyeofCthulhuMusicBox.png b/Content/Tiles/EyeofCthulhuMusicBox.png new file mode 100644 index 0000000..d2ab5a5 Binary files /dev/null and b/Content/Tiles/EyeofCthulhuMusicBox.png differ diff --git a/Content/Tiles/EyeofCthulhuMusicBox_Highlight.png b/Content/Tiles/EyeofCthulhuMusicBox_Highlight.png new file mode 100644 index 0000000..ac93223 Binary files /dev/null and b/Content/Tiles/EyeofCthulhuMusicBox_Highlight.png differ diff --git a/Content/Tiles/FalseEpilogueMusicBox.cs b/Content/Tiles/FalseEpilogueMusicBox.cs new file mode 100644 index 0000000..7344e05 --- /dev/null +++ b/Content/Tiles/FalseEpilogueMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("MemoryMusicBox")] + public class FalseEpilogueMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/FalseEpilogueMusicBox.png b/Content/Tiles/FalseEpilogueMusicBox.png new file mode 100644 index 0000000..15788f7 Binary files /dev/null and b/Content/Tiles/FalseEpilogueMusicBox.png differ diff --git a/Content/Tiles/FalseEpilogueMusicBox_Highlight.png b/Content/Tiles/FalseEpilogueMusicBox_Highlight.png new file mode 100644 index 0000000..681bec2 Binary files /dev/null and b/Content/Tiles/FalseEpilogueMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestDayAfternoonMusicBox.cs b/Content/Tiles/ForestDayAfternoonMusicBox.cs new file mode 100644 index 0000000..8db2bc8 --- /dev/null +++ b/Content/Tiles/ForestDayAfternoonMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Day3MusicBox")] + public class ForestDayAfternoonMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/ForestDayAfternoonMusicBox.png b/Content/Tiles/ForestDayAfternoonMusicBox.png new file mode 100644 index 0000000..277cdf9 Binary files /dev/null and b/Content/Tiles/ForestDayAfternoonMusicBox.png differ diff --git a/Content/Tiles/ForestDayAfternoonMusicBox_Highlight.png b/Content/Tiles/ForestDayAfternoonMusicBox_Highlight.png new file mode 100644 index 0000000..ecb15cd Binary files /dev/null and b/Content/Tiles/ForestDayAfternoonMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestDayDawnMusicBox.cs b/Content/Tiles/ForestDayDawnMusicBox.cs new file mode 100644 index 0000000..30664cf --- /dev/null +++ b/Content/Tiles/ForestDayDawnMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Day1MusicBox")] + public class ForestDayDawnMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/ForestDayDawnMusicBox.png b/Content/Tiles/ForestDayDawnMusicBox.png new file mode 100644 index 0000000..9a109e7 Binary files /dev/null and b/Content/Tiles/ForestDayDawnMusicBox.png differ diff --git a/Content/Tiles/ForestDayDawnMusicBox_Highlight.png b/Content/Tiles/ForestDayDawnMusicBox_Highlight.png new file mode 100644 index 0000000..212f08b Binary files /dev/null and b/Content/Tiles/ForestDayDawnMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestDayEveningMusicBox.cs b/Content/Tiles/ForestDayEveningMusicBox.cs new file mode 100644 index 0000000..73ade71 --- /dev/null +++ b/Content/Tiles/ForestDayEveningMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Day4MusicBox")] + public class ForestDayEveningMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/ForestDayEveningMusicBox.png b/Content/Tiles/ForestDayEveningMusicBox.png new file mode 100644 index 0000000..e3e1f52 Binary files /dev/null and b/Content/Tiles/ForestDayEveningMusicBox.png differ diff --git a/Content/Tiles/ForestDayEveningMusicBox_Highlight.png b/Content/Tiles/ForestDayEveningMusicBox_Highlight.png new file mode 100644 index 0000000..eefc3e0 Binary files /dev/null and b/Content/Tiles/ForestDayEveningMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestDayMorningMusicBox.cs b/Content/Tiles/ForestDayMorningMusicBox.cs new file mode 100644 index 0000000..42caa62 --- /dev/null +++ b/Content/Tiles/ForestDayMorningMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Day2MusicBox")] + public class ForestDayMorningMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/ForestDayMorningMusicBox.png b/Content/Tiles/ForestDayMorningMusicBox.png new file mode 100644 index 0000000..3f37281 Binary files /dev/null and b/Content/Tiles/ForestDayMorningMusicBox.png differ diff --git a/Content/Tiles/ForestDayMorningMusicBox_Highlight.png b/Content/Tiles/ForestDayMorningMusicBox_Highlight.png new file mode 100644 index 0000000..30ffe61 Binary files /dev/null and b/Content/Tiles/ForestDayMorningMusicBox_Highlight.png differ diff --git a/Content/Tiles/ForestNightMusicBox.cs b/Content/Tiles/ForestNightMusicBox.cs new file mode 100644 index 0000000..8ed6edc --- /dev/null +++ b/Content/Tiles/ForestNightMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("NightMusicBox")] + public class ForestNightMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/ForestNightMusicBox.png b/Content/Tiles/ForestNightMusicBox.png new file mode 100644 index 0000000..79cfdd0 Binary files /dev/null and b/Content/Tiles/ForestNightMusicBox.png differ diff --git a/Content/Tiles/ForestNightMusicBox_Highlight.png b/Content/Tiles/ForestNightMusicBox_Highlight.png new file mode 100644 index 0000000..ecb15cd Binary files /dev/null and b/Content/Tiles/ForestNightMusicBox_Highlight.png differ diff --git a/Content/Tiles/GeodesMusicBox.cs b/Content/Tiles/GeodesMusicBox.cs new file mode 100644 index 0000000..b548bfb --- /dev/null +++ b/Content/Tiles/GeodesMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class GeodesMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/GeodesMusicBox.png b/Content/Tiles/GeodesMusicBox.png new file mode 100644 index 0000000..2ee8859 Binary files /dev/null and b/Content/Tiles/GeodesMusicBox.png differ diff --git a/Content/Tiles/GeodesMusicBox_Highlight.png b/Content/Tiles/GeodesMusicBox_Highlight.png new file mode 100644 index 0000000..1b48a86 Binary files /dev/null and b/Content/Tiles/GeodesMusicBox_Highlight.png differ diff --git a/Content/Tiles/GlowingMushroomFieldsMusicBox.cs b/Content/Tiles/GlowingMushroomFieldsMusicBox.cs new file mode 100644 index 0000000..804db44 --- /dev/null +++ b/Content/Tiles/GlowingMushroomFieldsMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class GlowingMushroomFieldsMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/GlowingMushroomFieldsMusicBox.png b/Content/Tiles/GlowingMushroomFieldsMusicBox.png new file mode 100644 index 0000000..6eeeae6 Binary files /dev/null and b/Content/Tiles/GlowingMushroomFieldsMusicBox.png differ diff --git a/Content/Tiles/GlowingMushroomFieldsMusicBox_Highlight.png b/Content/Tiles/GlowingMushroomFieldsMusicBox_Highlight.png new file mode 100644 index 0000000..503fa28 Binary files /dev/null and b/Content/Tiles/GlowingMushroomFieldsMusicBox_Highlight.png differ diff --git a/Content/Tiles/HardmodeInterludeMusicBox.cs b/Content/Tiles/HardmodeInterludeMusicBox.cs new file mode 100644 index 0000000..a9c3b84 --- /dev/null +++ b/Content/Tiles/HardmodeInterludeMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("ResurrectionMusicBox")] + public class HardmodeInterludeMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/HardmodeInterludeMusicBox.png b/Content/Tiles/HardmodeInterludeMusicBox.png new file mode 100644 index 0000000..debe559 Binary files /dev/null and b/Content/Tiles/HardmodeInterludeMusicBox.png differ diff --git a/Content/Tiles/HardmodeInterludeMusicBox_Highlight.png b/Content/Tiles/HardmodeInterludeMusicBox_Highlight.png new file mode 100644 index 0000000..2d8986c Binary files /dev/null and b/Content/Tiles/HardmodeInterludeMusicBox_Highlight.png differ diff --git a/Content/Tiles/KingSlimeMusicBox.cs b/Content/Tiles/KingSlimeMusicBox.cs new file mode 100644 index 0000000..5327b2d --- /dev/null +++ b/Content/Tiles/KingSlimeMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class KingSlimeMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/KingSlimeMusicBox.png b/Content/Tiles/KingSlimeMusicBox.png new file mode 100644 index 0000000..43f36d0 Binary files /dev/null and b/Content/Tiles/KingSlimeMusicBox.png differ diff --git a/Content/Tiles/KingSlimeMusicBox_Highlight.png b/Content/Tiles/KingSlimeMusicBox_Highlight.png new file mode 100644 index 0000000..a90003a Binary files /dev/null and b/Content/Tiles/KingSlimeMusicBox_Highlight.png differ diff --git a/Content/Tiles/LanternFestivalMusicBox.cs b/Content/Tiles/LanternFestivalMusicBox.cs new file mode 100644 index 0000000..ba77d57 --- /dev/null +++ b/Content/Tiles/LanternFestivalMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class LanternFestivalMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/LanternFestivalMusicBox.png b/Content/Tiles/LanternFestivalMusicBox.png new file mode 100644 index 0000000..26711de Binary files /dev/null and b/Content/Tiles/LanternFestivalMusicBox.png differ diff --git a/Content/Tiles/LanternFestivalMusicBox_Highlight.png b/Content/Tiles/LanternFestivalMusicBox_Highlight.png new file mode 100644 index 0000000..ace287f Binary files /dev/null and b/Content/Tiles/LanternFestivalMusicBox_Highlight.png differ diff --git a/Content/Tiles/MeteoriteMusicBox.cs b/Content/Tiles/MeteoriteMusicBox.cs new file mode 100644 index 0000000..1dabe70 --- /dev/null +++ b/Content/Tiles/MeteoriteMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class MeteoriteMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/MeteoriteMusicBox.png b/Content/Tiles/MeteoriteMusicBox.png new file mode 100644 index 0000000..4f12807 Binary files /dev/null and b/Content/Tiles/MeteoriteMusicBox.png differ diff --git a/Content/Tiles/MeteoriteMusicBox_Highlight.png b/Content/Tiles/MeteoriteMusicBox_Highlight.png new file mode 100644 index 0000000..e6f961d Binary files /dev/null and b/Content/Tiles/MeteoriteMusicBox_Highlight.png differ diff --git a/Content/Tiles/MoonLordMusicBox.cs b/Content/Tiles/MoonLordMusicBox.cs new file mode 100644 index 0000000..c1dd2b9 --- /dev/null +++ b/Content/Tiles/MoonLordMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class MoonLordMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/MoonLordMusicBox.png b/Content/Tiles/MoonLordMusicBox.png new file mode 100644 index 0000000..e28598b Binary files /dev/null and b/Content/Tiles/MoonLordMusicBox.png differ diff --git a/Content/Tiles/MoonLordMusicBox_Highlight.png b/Content/Tiles/MoonLordMusicBox_Highlight.png new file mode 100644 index 0000000..c7bea23 Binary files /dev/null and b/Content/Tiles/MoonLordMusicBox_Highlight.png differ diff --git a/Content/Tiles/OceanDayMusicBox.cs b/Content/Tiles/OceanDayMusicBox.cs new file mode 100644 index 0000000..36348a2 --- /dev/null +++ b/Content/Tiles/OceanDayMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class OceanDayMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/OceanDayMusicBox.png b/Content/Tiles/OceanDayMusicBox.png new file mode 100644 index 0000000..2f51115 Binary files /dev/null and b/Content/Tiles/OceanDayMusicBox.png differ diff --git a/Content/Tiles/OceanDayMusicBox_Highlight.png b/Content/Tiles/OceanDayMusicBox_Highlight.png new file mode 100644 index 0000000..03e2a7d Binary files /dev/null and b/Content/Tiles/OceanDayMusicBox_Highlight.png differ diff --git a/Content/Tiles/OceanNightMusicBox.cs b/Content/Tiles/OceanNightMusicBox.cs new file mode 100644 index 0000000..823287f --- /dev/null +++ b/Content/Tiles/OceanNightMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class OceanNightMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/OceanNightMusicBox.png b/Content/Tiles/OceanNightMusicBox.png new file mode 100644 index 0000000..d817c62 Binary files /dev/null and b/Content/Tiles/OceanNightMusicBox.png differ diff --git a/Content/Tiles/OceanNightMusicBox_Highlight.png b/Content/Tiles/OceanNightMusicBox_Highlight.png new file mode 100644 index 0000000..fafbc46 Binary files /dev/null and b/Content/Tiles/OceanNightMusicBox_Highlight.png differ diff --git a/Content/Tiles/RainLegacyMusicBox.cs b/Content/Tiles/RainLegacyMusicBox.cs new file mode 100644 index 0000000..c81f9f6 --- /dev/null +++ b/Content/Tiles/RainLegacyMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("GreySkyMusicBox")] + public class RainLegacyMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/RainLegacyMusicBox.png b/Content/Tiles/RainLegacyMusicBox.png new file mode 100644 index 0000000..58b8ef3 Binary files /dev/null and b/Content/Tiles/RainLegacyMusicBox.png differ diff --git a/Content/Tiles/RainLegacyMusicBox_Highlight.png b/Content/Tiles/RainLegacyMusicBox_Highlight.png new file mode 100644 index 0000000..e83ab6f Binary files /dev/null and b/Content/Tiles/RainLegacyMusicBox_Highlight.png differ diff --git a/Content/Tiles/RainMusicBox.cs b/Content/Tiles/RainMusicBox.cs new file mode 100644 index 0000000..82708c4 --- /dev/null +++ b/Content/Tiles/RainMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class RainMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/RainMusicBox.png b/Content/Tiles/RainMusicBox.png new file mode 100644 index 0000000..8f924a4 Binary files /dev/null and b/Content/Tiles/RainMusicBox.png differ diff --git a/Content/Tiles/RainMusicBox_Highlight.png b/Content/Tiles/RainMusicBox_Highlight.png new file mode 100644 index 0000000..cea0820 Binary files /dev/null and b/Content/Tiles/RainMusicBox_Highlight.png differ diff --git a/Content/Tiles/SkeletronMusicBox.cs b/Content/Tiles/SkeletronMusicBox.cs new file mode 100644 index 0000000..9c2fec3 --- /dev/null +++ b/Content/Tiles/SkeletronMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class SkeletronMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/SkeletronMusicBox.png b/Content/Tiles/SkeletronMusicBox.png new file mode 100644 index 0000000..d1e8989 Binary files /dev/null and b/Content/Tiles/SkeletronMusicBox.png differ diff --git a/Content/Tiles/SkeletronMusicBox_Highlight.png b/Content/Tiles/SkeletronMusicBox_Highlight.png new file mode 100644 index 0000000..d002c6c Binary files /dev/null and b/Content/Tiles/SkeletronMusicBox_Highlight.png differ diff --git a/Content/Tiles/SlimeRainMusicBox.cs b/Content/Tiles/SlimeRainMusicBox.cs new file mode 100644 index 0000000..0873b09 --- /dev/null +++ b/Content/Tiles/SlimeRainMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class SlimeRainMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/SlimeRainMusicBox.png b/Content/Tiles/SlimeRainMusicBox.png new file mode 100644 index 0000000..4655e37 Binary files /dev/null and b/Content/Tiles/SlimeRainMusicBox.png differ diff --git a/Content/Tiles/SlimeRainMusicBox_Highlight.png b/Content/Tiles/SlimeRainMusicBox_Highlight.png new file mode 100644 index 0000000..fd8677f Binary files /dev/null and b/Content/Tiles/SlimeRainMusicBox_Highlight.png differ diff --git a/Content/Tiles/SpaceMusicBox.cs b/Content/Tiles/SpaceMusicBox.cs new file mode 100644 index 0000000..5b23bfb --- /dev/null +++ b/Content/Tiles/SpaceMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class SpaceMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/SpaceMusicBox.png b/Content/Tiles/SpaceMusicBox.png new file mode 100644 index 0000000..c6671e4 Binary files /dev/null and b/Content/Tiles/SpaceMusicBox.png differ diff --git a/Content/Tiles/SpaceMusicBox_Highlight.png b/Content/Tiles/SpaceMusicBox_Highlight.png new file mode 100644 index 0000000..bb8ae95 Binary files /dev/null and b/Content/Tiles/SpaceMusicBox_Highlight.png differ diff --git a/Content/Tiles/TownDayMusicBox.cs b/Content/Tiles/TownDayMusicBox.cs new file mode 100644 index 0000000..4df8296 --- /dev/null +++ b/Content/Tiles/TownDayMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class TownDayMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/TownDayMusicBox.png b/Content/Tiles/TownDayMusicBox.png new file mode 100644 index 0000000..a3ea146 Binary files /dev/null and b/Content/Tiles/TownDayMusicBox.png differ diff --git a/Content/Tiles/TownDayMusicBox_Highlight.png b/Content/Tiles/TownDayMusicBox_Highlight.png new file mode 100644 index 0000000..906de86 Binary files /dev/null and b/Content/Tiles/TownDayMusicBox_Highlight.png differ diff --git a/Content/Tiles/TownNightMusicBox.cs b/Content/Tiles/TownNightMusicBox.cs new file mode 100644 index 0000000..decfef7 --- /dev/null +++ b/Content/Tiles/TownNightMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class TownNightMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/TownNightMusicBox.png b/Content/Tiles/TownNightMusicBox.png new file mode 100644 index 0000000..263f6b1 Binary files /dev/null and b/Content/Tiles/TownNightMusicBox.png differ diff --git a/Content/Tiles/TownNightMusicBox_Highlight.png b/Content/Tiles/TownNightMusicBox_Highlight.png new file mode 100644 index 0000000..96a85f8 Binary files /dev/null and b/Content/Tiles/TownNightMusicBox_Highlight.png differ diff --git a/Content/Tiles/TundraMusicBox.cs b/Content/Tiles/TundraMusicBox.cs new file mode 100644 index 0000000..530ace2 --- /dev/null +++ b/Content/Tiles/TundraMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class TundraMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/TundraMusicBox.png b/Content/Tiles/TundraMusicBox.png new file mode 100644 index 0000000..ba78e18 Binary files /dev/null and b/Content/Tiles/TundraMusicBox.png differ diff --git a/Content/Tiles/TundraMusicBox_Highlight.png b/Content/Tiles/TundraMusicBox_Highlight.png new file mode 100644 index 0000000..a9778f5 Binary files /dev/null and b/Content/Tiles/TundraMusicBox_Highlight.png differ diff --git a/Content/Tiles/TundraUndergroundMusicBox.cs b/Content/Tiles/TundraUndergroundMusicBox.cs new file mode 100644 index 0000000..b30f058 --- /dev/null +++ b/Content/Tiles/TundraUndergroundMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class TundraUndergroundMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/TundraUndergroundMusicBox.png b/Content/Tiles/TundraUndergroundMusicBox.png new file mode 100644 index 0000000..81fde34 Binary files /dev/null and b/Content/Tiles/TundraUndergroundMusicBox.png differ diff --git a/Content/Tiles/TundraUndergroundMusicBox_Highlight.png b/Content/Tiles/TundraUndergroundMusicBox_Highlight.png new file mode 100644 index 0000000..7910b6c Binary files /dev/null and b/Content/Tiles/TundraUndergroundMusicBox_Highlight.png differ diff --git a/Content/Tiles/UndergroundMusicBox.cs b/Content/Tiles/UndergroundMusicBox.cs new file mode 100644 index 0000000..7afe6b0 --- /dev/null +++ b/Content/Tiles/UndergroundMusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Underground1MusicBox")] + public class UndergroundMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/UndergroundMusicBox.png b/Content/Tiles/UndergroundMusicBox.png new file mode 100644 index 0000000..006d1c2 Binary files /dev/null and b/Content/Tiles/UndergroundMusicBox.png differ diff --git a/Content/Tiles/UndergroundMusicBox_Highlight.png b/Content/Tiles/UndergroundMusicBox_Highlight.png new file mode 100644 index 0000000..4f71910 Binary files /dev/null and b/Content/Tiles/UndergroundMusicBox_Highlight.png differ diff --git a/Content/Tiles/UnderworldMusicBox.cs b/Content/Tiles/UnderworldMusicBox.cs new file mode 100644 index 0000000..30fb9e5 --- /dev/null +++ b/Content/Tiles/UnderworldMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class UnderworldMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/UnderworldMusicBox.png b/Content/Tiles/UnderworldMusicBox.png new file mode 100644 index 0000000..4b38b3b Binary files /dev/null and b/Content/Tiles/UnderworldMusicBox.png differ diff --git a/Content/Tiles/UnderworldMusicBox_Highlight.png b/Content/Tiles/UnderworldMusicBox_Highlight.png new file mode 100644 index 0000000..9c0c05b Binary files /dev/null and b/Content/Tiles/UnderworldMusicBox_Highlight.png differ diff --git a/Content/Tiles/WallofFleshMusicBox.cs b/Content/Tiles/WallofFleshMusicBox.cs new file mode 100644 index 0000000..6a97c86 --- /dev/null +++ b/Content/Tiles/WallofFleshMusicBox.cs @@ -0,0 +1,8 @@ +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + public class WallofFleshMusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WallofFleshMusicBox.png b/Content/Tiles/WallofFleshMusicBox.png new file mode 100644 index 0000000..bdfebbd Binary files /dev/null and b/Content/Tiles/WallofFleshMusicBox.png differ diff --git a/Content/Tiles/WallofFleshMusicBox_Highlight.png b/Content/Tiles/WallofFleshMusicBox_Highlight.png new file mode 100644 index 0000000..6702126 Binary files /dev/null and b/Content/Tiles/WallofFleshMusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier1MusicBox.cs b/Content/Tiles/WorkshopTier1MusicBox.cs new file mode 100644 index 0000000..f16f7ca --- /dev/null +++ b/Content/Tiles/WorkshopTier1MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop1MusicBox")] + public class WorkshopTier1MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier1MusicBox.png b/Content/Tiles/WorkshopTier1MusicBox.png new file mode 100644 index 0000000..9836296 Binary files /dev/null and b/Content/Tiles/WorkshopTier1MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier1MusicBox_Highlight.png b/Content/Tiles/WorkshopTier1MusicBox_Highlight.png new file mode 100644 index 0000000..2695be5 Binary files /dev/null and b/Content/Tiles/WorkshopTier1MusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier2MusicBox.cs b/Content/Tiles/WorkshopTier2MusicBox.cs new file mode 100644 index 0000000..f6c8e46 --- /dev/null +++ b/Content/Tiles/WorkshopTier2MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop2MusicBox")] + public class WorkshopTier2MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier2MusicBox.png b/Content/Tiles/WorkshopTier2MusicBox.png new file mode 100644 index 0000000..5640f7a Binary files /dev/null and b/Content/Tiles/WorkshopTier2MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier2MusicBox_Highlight.png b/Content/Tiles/WorkshopTier2MusicBox_Highlight.png new file mode 100644 index 0000000..d151e65 Binary files /dev/null and b/Content/Tiles/WorkshopTier2MusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier3MusicBox.cs b/Content/Tiles/WorkshopTier3MusicBox.cs new file mode 100644 index 0000000..e20a76f --- /dev/null +++ b/Content/Tiles/WorkshopTier3MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop3MusicBox")] + public class WorkshopTier3MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier3MusicBox.png b/Content/Tiles/WorkshopTier3MusicBox.png new file mode 100644 index 0000000..3fce3c5 Binary files /dev/null and b/Content/Tiles/WorkshopTier3MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier3MusicBox_Highlight.png b/Content/Tiles/WorkshopTier3MusicBox_Highlight.png new file mode 100644 index 0000000..2efdc82 Binary files /dev/null and b/Content/Tiles/WorkshopTier3MusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier4MusicBox.cs b/Content/Tiles/WorkshopTier4MusicBox.cs new file mode 100644 index 0000000..4874a36 --- /dev/null +++ b/Content/Tiles/WorkshopTier4MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop4MusicBox")] + public class WorkshopTier4MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier4MusicBox.png b/Content/Tiles/WorkshopTier4MusicBox.png new file mode 100644 index 0000000..511ccc7 Binary files /dev/null and b/Content/Tiles/WorkshopTier4MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier4MusicBox_Highlight.png b/Content/Tiles/WorkshopTier4MusicBox_Highlight.png new file mode 100644 index 0000000..9e2983c Binary files /dev/null and b/Content/Tiles/WorkshopTier4MusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier5MusicBox.cs b/Content/Tiles/WorkshopTier5MusicBox.cs new file mode 100644 index 0000000..3915795 --- /dev/null +++ b/Content/Tiles/WorkshopTier5MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop5MusicBox")] + public class WorkshopTier5MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier5MusicBox.png b/Content/Tiles/WorkshopTier5MusicBox.png new file mode 100644 index 0000000..744066d Binary files /dev/null and b/Content/Tiles/WorkshopTier5MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier5MusicBox_Highlight.png b/Content/Tiles/WorkshopTier5MusicBox_Highlight.png new file mode 100644 index 0000000..7a329f5 Binary files /dev/null and b/Content/Tiles/WorkshopTier5MusicBox_Highlight.png differ diff --git a/Content/Tiles/WorkshopTier6MusicBox.cs b/Content/Tiles/WorkshopTier6MusicBox.cs new file mode 100644 index 0000000..775ed24 --- /dev/null +++ b/Content/Tiles/WorkshopTier6MusicBox.cs @@ -0,0 +1,10 @@ +using Terraria.ModLoader; +using UnCalamityModMusic.Common; + +namespace UnCalamityModMusic.Content.Tiles +{ + [LegacyName("Workshop6MusicBox")] + public class WorkshopTier6MusicBox : MusicBoxTile + { + } +} \ No newline at end of file diff --git a/Content/Tiles/WorkshopTier6MusicBox.png b/Content/Tiles/WorkshopTier6MusicBox.png new file mode 100644 index 0000000..2c3d5c8 Binary files /dev/null and b/Content/Tiles/WorkshopTier6MusicBox.png differ diff --git a/Content/Tiles/WorkshopTier6MusicBox_Highlight.png b/Content/Tiles/WorkshopTier6MusicBox_Highlight.png new file mode 100644 index 0000000..b25f74c Binary files /dev/null and b/Content/Tiles/WorkshopTier6MusicBox_Highlight.png differ diff --git a/Localization/en-US.hjson b/Localization/en-US.hjson new file mode 100644 index 0000000..bdd251b --- /dev/null +++ b/Localization/en-US.hjson @@ -0,0 +1,445 @@ +Mods: { + UnCalamityModMusic: { + Configs: { + MusicConfig: { + DisplayName: Music Config + MusicTogglesHeader: Music Toggles + AlternateMusicHeader: Alternate Music + ConditionChangesHeader: Condition Changes + + WorkshopThemes: { + Label: "[i:UnCalamityModMusic/WorkshopTier1MusicBox] Workshop Themes" + Tooltip: + ''' + Enables the Workshop themes that play when near certain crafting stations. + If you're looking to disable the Town themes, use the separate No Town Music mod or use Shadow Candles. + ''' + } + + HardmodeInterlude: { + Label: "[i:UnCalamityModMusic/HardmodeInterludeMusicBox] Hardmode Interlude" + Tooltip: + ''' + Enables a music event that plays when entering Hardmode. + If you're looking to disable the Credits, use the separate No In-game Credits mod. + ''' + } + + DeepAbyssAlt: { + Label: "[i:UnCalamityModMusic/AbyssLayer3AltMusicBox] Deep Abyss Alt" + Tooltip: Enables an alternate theme for the 3rd layer of the Abyss. + } + + CrimsonAlt: { + Label: "[i:UnCalamityModMusic/CrimsonMusicBox] Crimson Alt" + Tooltip: Enables an alternate theme for the Crimson from the discontinued Terrawaves mod. + } + + RainAlt: { + Label: "[i:UnCalamityModMusic/RainMusicBox] Rain Alt" + Tooltip: Enables an alternate theme for the Rain event from the discontinued Terrawaves mod. + } + + BloodMoonAlt: { + Label: "[i:UnCalamityModMusic/BloodMoonMusicBox] Blood Moon Alt" + Tooltip: Enables an alternate theme for the Blood Moon event from the discontinued Terrawaves mod. + } + + KingSlimeAlt: { + Label: "[i:UnCalamityModMusic/KingSlimeMusicBox] King Slime Alt" + Tooltip: Enables an alternate theme for King Slime from the discontinued Terrawaves mod. + } + + EyeofCthulhuAlt: { + Label: "[i:UnCalamityModMusic/EyeofCthulhuMusicBox] Eye of Cthulhu Alt" + Tooltip: Enables an alternate theme for the Eye of Cthulhu from the discontinued Terrawaves mod. + } + + DestroyerAlt: { + Label: "[i:DestroyerPetItem] Destroyer Alt" + Tooltip: Enables an alternate theme for the Destroyer from the discontinued Terrawaves mod. + } + + PrioritizeInfernumMusic: { + Label: "[i:WallOfFleshGoatMountItem] Prioritize Infernum Music" + Tooltip: + ''' + Enables Infernum music to take priority over VCMM music. + This option does nothing if the Infernum Mode Music mod is disabled. + This option does not affect Calamity bosses or any alternate themes. + ''' + } + + OverrideAnahitasLure: { + Label: "[i:UnCalamityModMusic/OceanDayMusicBox] Override Anahita's Lure" + Tooltip: + ''' + Overrides the ??? theme with the Ocean themes. + This also applies to Ocean ambience. + ''' + } + } + + OtherConfig: { + DisplayName: Other Config + AmbienceTogglesHeader: Ambience Toggles + OtherChangesHeader: Other Changes + + AmbienceFrequency: { + Label: "[i:Bunny] Ambience Frequency" + Tooltip: + ''' + Adjusts the frequency at which ambience will replace normal music, from 0% to 100%. + If at 100%, all music except boss and event music will be disabled. + ''' + } + + DisableBeeHiveAmbience: { + Label: "[i:BeeWax] Disable Bee Hive Ambience" + Tooltip: Disables ambience in Bee Hives if ambience is enabled. + } + + DisableSpiderCaveAmbience: { + Label: "[i:SpiderFang] Disable Spider Cave Ambience" + Tooltip: Disables ambience in Spider Caves if ambience is enabled. + } + + MusicBoxResprite: { + Label: "[i:MusicBox] Empty Music Box Resprite" + Tooltip: Enables a resprite of the empty, unrecorded music box. + } + } + } + + Items: { + AbyssLayer3AltMusicBox: { + DisplayName: Music Box (Abyss - Layer 3 Alt) + Tooltip: Plays 'R'lyehian Depths' by Heart Plus Up! + } + + BloodMoonDeathMusicBox: { + DisplayName: Music Box (Blood Moon - Death) + Tooltip: Plays 'Sanguine Eclipse' by Thriplerex + } + + BloodMoonMusicBox: { + DisplayName: Music Box (Blood Moon) + Tooltip: Plays 'Congealing Shadows' by Thriplerex + DisplayNameAlt: Music Box (Blood Moon Alt) + TooltipAlt: Plays 'Clotted Darkness' by CDMusic + } + + BrainofCthulhuMusicBox: { + DisplayName: Music Box (Brain of Cthulhu) + Tooltip: Plays 'Madness Incarnate' by Heart Plus Up! and SkippyZii + } + + CavernsMusicBox: { + DisplayName: Music Box (Caverns) + Tooltip: Plays 'Nearing the Inferno' by Heart Plus Up! + } + + CorruptionMusicBox: { + DisplayName: Music Box (Corruption) + Tooltip: Plays 'Writhing Shadows' by Heart Plus Up! + } + + CorruptionUndergroundMusicBox: { + DisplayName: Music Box (Underground Corruption) + Tooltip: Plays 'Between the Shadows' by Heart Plus Up! + } + + CrimsonMusicBox: { + DisplayName: Music Box (Crimson) + Tooltip: Plays 'Clotted Lands' by SkippyZii + DisplayNameAlt: Music Box (Crimson Alt) + TooltipAlt: Plays 'Hemorrhage' by CDMusic + } + + CrimsonUndergroundMusicBox: { + DisplayName: Music Box (Underground Crimson) + Tooltip: Plays 'Bloodstained Terror' by SkippyZii + } + + DesertMusicBox: { + DisplayName: Music Box (Desert) + Tooltip: Plays 'Scorched to Dust' by Heart Plus Up! + } + + DungeonMusicBox: { + DisplayName: Music Box (Dungeon) + Tooltip: Plays 'Chambers of the Tyrant' by Heart Plus Up! + } + + EaterofWorldsMusicBox: { + DisplayName: Music Box (Eater of Worlds) + Tooltip: Plays 'Menace of the Chasms' by Heart Plus Up! + } + + EyeofCthulhuMusicBox: { + DisplayName: Music Box (Eye of Cthulhu) + Tooltip: Plays 'Bloodshot Barrage' by Heart Plus Up! and novaGnomes + DisplayNameAlt: Music Box (Eye of Cthulhu Alt) + TooltipAlt: Plays 'Through Evil's Eye' by CDMusic + } + + FalseEpilogueMusicBox: { + DisplayName: Music Box (False Epilogue) + Tooltip: Plays 'The Memory of a Cruel World' by Heart Plus Up! + } + + ForestDayAfternoonMusicBox: { + DisplayName: Music Box (Forest Day - Afternoon) + Tooltip: Plays 'A Legend's Strife (Lament)' by Heart Plus Up! + } + + ForestDayDawnMusicBox: { + DisplayName: Music Box (Forest Day - Dawn) + Tooltip: Plays 'A Legend's Strife (Acceptance)' by Heart Plus Up! + } + + ForestDayEveningMusicBox: { + DisplayName: Music Box (Forest Day - Evening) + Tooltip: Plays 'A Legend's Strife (Grief)' by Heart Plus Up! + } + + ForestDayMorningMusicBox: { + DisplayName: Music Box (Forest Day - Morning) + Tooltip: Plays 'A Legend's Strife (Epiphany)' by Heart Plus Up! + } + + ForestNightMusicBox: { + DisplayName: Music Box (Forest Night) + Tooltip: Plays 'Laze of the Sky' by Heart Plus Up! + } + + GeodesMusicBox: { + DisplayName: Music Box (Geodes) + Tooltip: Plays 'Amidst the Minerals' by Heart Plus Up! + } + + GlowingMushroomFieldsMusicBox: { + DisplayName: Music Box (Glowing Mushroom Fields) + Tooltip: Plays 'Psychedelic Depths' by Heart Plus Up! + } + + HardmodeInterludeMusicBox: { + DisplayName: Music Box (Hardmode Interlude) + Tooltip: Plays 'The Resurrection of a Cruel World' by Salvati + } + + KingSlimeMusicBox: { + DisplayName: Music Box (King Slime) + Tooltip: Plays 'Gelatinous Monarch' by Heart Plus Up! + DisplayNameAlt: Music Box (King Slime Alt) + TooltipAlt: Plays 'Battle of the Bouncy' by CDMusic + } + + LanternFestivalMusicBox: { + DisplayName: Music Box (Lantern Festival) + Tooltip: Plays 'Serenity' by Heart Plus Up! + } + + MeteoriteMusicBox: { + DisplayName: Music Box (Meteorite) + Tooltip: Plays 'The Abomination's Omen' by Heart Plus Up! + } + + MoonLordMusicBox: { + DisplayName: Music Box (Moon Lord) + Tooltip: + ''' + Plays 'Virtuous Radiance' by psykomatic + This music box contains a placeholder song + ''' + } + + OceanDayMusicBox: { + DisplayName: Music Box (Ocean Day) + Tooltip: Plays 'shoreline' by Heart Plus Up! + } + + OceanNightMusicBox: { + DisplayName: Music Box (Ocean Night) + Tooltip: Plays 'serene tides' by Heart Plus Up! + } + + RainLegacyMusicBox: { + DisplayName: Music Box (Rain - Legacy) + Tooltip: Plays 'Grey Sky' by Heart Plus Up! + } + + RainMusicBox: { + DisplayName: Music Box (Rain) + Tooltip: Plays 'downpour' by Heart Plus Up! + DisplayNameAlt: Music Box (Rain Alt) + TooltipAlt: Plays 'sky fall' by CDMusic + } + + SkeletronMusicBox: { + DisplayName: Music Box (Skeletron) + Tooltip: Plays 'Wrath From the Crypt' by Heart Plus Up! + } + + SlimeRainMusicBox: { + DisplayName: Music Box (Slime Rain) + Tooltip: Plays 'Gelatin Showers' by Heart Plus Up! + } + + SpaceMusicBox: { + DisplayName: Music Box (Space) + Tooltip: Plays 'Starry Ascent' by Heart Plus Up! + } + + TownDayMusicBox: { + DisplayName: Music Box (Town Day) + Tooltip: Plays 'Haven in the Sunlight' by Heart Plus Up! + } + + TownNightMusicBox: { + DisplayName: Music Box (Town Night) + Tooltip: Plays 'Moonlit Haven' by Heart Plus Up! + } + + TundraMusicBox: { + DisplayName: Music Box (Tundra) + Tooltip: Plays 'Frozen Over' by Heart Plus Up! + } + + TundraUndergroundMusicBox: { + DisplayName: Music Box (Underground Tundra) + Tooltip: Plays 'Inside the Glaciers' by Heart Plus Up! + } + + UndergroundMusicBox: { + DisplayName: Music Box (Underground) + Tooltip: Plays 'Under the Earth' by Heart Plus Up! + } + + UnderworldMusicBox: { + DisplayName: Music Box (Underworld) + Tooltip: Plays 'Descent Into Hell's Fury' by Heart Plus Up! + } + + WallofFleshMusicBox: { + DisplayName: Music Box (Wall of Flesh) + Tooltip: Plays 'Fated Insurrection' by Heart Plus Up! + } + + WorkshopTier1MusicBox: { + DisplayName: Music Box (Workshop - Tier 1) + Tooltip: Plays 'Metal, Wood, and Fire' by Heart Plus Up! + } + + WorkshopTier2MusicBox: { + DisplayName: Music Box (Workshop - Tier 2) + Tooltip: Plays 'The Sky and the Depths' by Heart Plus Up! + } + + WorkshopTier3MusicBox: { + DisplayName: Music Box (Workshop - Tier 3) + Tooltip: Plays 'Mythic Metals and Enchanted Fires' by Heart Plus Up! + } + + WorkshopTier4MusicBox: { + DisplayName: Music Box (Workshop - Tier 4) + Tooltip: Plays 'Fruits of Your Labor' by Heart Plus Up! + } + + WorkshopTier5MusicBox: { + DisplayName: Music Box (Workshop - Tier 5) + Tooltip: Plays 'False Gods and Ancient Elements' by Heart Plus Up! + } + + WorkshopTier6MusicBox: { + DisplayName: Music Box (Workshop - Tier 6) + Tooltip: Plays 'Master's Forge' by Heart Plus Up! + } + } + + Menus: { + ResurrectionMenu: Resurrection Style + MemoryMenu: Memory Style + } + + ModSupport: { + MusicDisplay: { + SongNames: { + AbyssLayer3Alt: R'lyehian Depths + DestroyerAlt: Behemoth From Beneath + EyeofCthulhuAlt: Through Evil's Eye + KingSlimeAlt: Battle of the Bouncy + BloodMoonAlt: Clotted Darkness + CrimsonAlt: Hemorrhage + RainAlt: sky fall + Space: Starry Ascent + Underworld: Descent Into Hell's Fury + Meteorite: The Abomination's Omen + WorkshopTier6: Master's Forge + WorkshopTier5: False Gods and Ancient Elements + WorkshopTier4: Fruits of Your Labor + WorkshopTier3: Mythic Metals and Enchanted Fires + WorkshopTier2: The Sky and the Depths + WorkshopTier1: Metal, Wood, and Fire + TownNight: Moonlit Haven + TownNight_Noiseless: Moonlit Haven + TownDay: Haven in the Sunlight + Dungeon: Chambers of the Tyrant + GlowingMushroomFields: Psychedelic Depths + Corruption: Writhing Shadows + CorruptionUnderground: Between the Shadows + Crimson: Clotted Lands + CrimsonUnderground: Bloodstained Terror + Geodes: Amidst the Minerals + Tundra: Frozen Over + TundraUnderground: Inside the Glaciers + Caverns: Nearing the Inferno + Underground: Under the Earth + OceanNight: serene tides + OceanDay: shoreline + Desert: Scorched to Dust + ForestNight: Laze of the Sky + ForestDayEvening: A Legend's Strife (Grief) + ForestDayAfternoon: A Legend's Strife (Lament) + ForestDayMorning: A Legend's Strife (Epiphany) + ForestDayDawn: A Legend's Strife (Acceptance) + MoonLord: Virtuous Radiance + WallofFlesh: Fated Insurrection + Skeletron: Wrath From the Crypt + BrainofCthulhu: Madness Incarnate + EaterofWorlds: Menace of the Chasms + EyeofCthulhu: Bloodshot Barrage + KingSlime: Gelatinous Monarch + BloodMoonDeath: Sanguine Eclipse + BloodMoon: Congealing Shadows + SlimeRain: Gelatin Showers + Rain: downpour + LanternFestival: Serenity + HardmodeInterlude: The Resurrection of a Cruel World + FalseEpilogue: The Memory of a Cruel World + RainLegacy: Grey Sky + } + + Authors: { + CDMusic: by CDMusic + HeartPlusUp: by Heart Plus Up! + HeartPlusUpFeature1: by Heart Plus Up! and novaGnomes + HeartPlusUpFeature2: by Heart Plus Up! and SkippyZii + HeartPlusUpFeature3: by Heart Plus Up! and Universe + Salvati: by Salvati + SkippyZii: by SkippyZii + Thriplerex: by Thriplerex + Universe: by Universe + psykomatic: by psykomatic + } + } + } + + Loot.FirstKillCondition: Drops only on the first kill + + Recipes: { + EvilPowder: Evil Powder + NameMismatchError: There is an internal name mismatch between the items in this recipe and the items in another mod. The recipe for this item has been disabled. + } + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..d9cfde9 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# UnCalamityModMusic (release) +A mod for Terraria that aims to replace the entire vanilla soundtrack with new songs made in the context of the Calamity Mod OST. + +This is the public release of the mod. diff --git a/UnCalamityModMusic.cs b/UnCalamityModMusic.cs new file mode 100644 index 0000000..b17c977 --- /dev/null +++ b/UnCalamityModMusic.cs @@ -0,0 +1,64 @@ +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; +using UnCalamityModMusic.Common; +using UnCalamityModMusic.Common.Configs; + +namespace UnCalamityModMusic +{ + public class UnCalamityModMusic : Mod + { + public static UnCalamityModMusic Instance; + + internal static bool calamityMod; + internal static bool calamityModMusic; + internal static bool catalystMod; + internal static bool calamityVanities; + internal static bool otherCalamityMusic; + internal static bool infernumMod; + internal static bool infernumModMusic; + internal static bool magicStorage; + internal static bool wikiThis; + + public override void Load() + { + Instance = this; + + MusicPathing.InitalizeMusicPaths(Instance); + + calamityMod = ModLoader.TryGetMod("CalamityMod", out Mod calamity); + calamityModMusic = ModLoader.TryGetMod("CalamityModMusic", out Mod cmusic); + catalystMod = ModLoader.TryGetMod("CatalystMod", out Mod catalyst); + calamityVanities = ModLoader.TryGetMod("CalValEX", out Mod calval); + otherCalamityMusic = ModLoader.TryGetMod("OtherCalamityMusic", out Mod othermusic); + infernumMod = ModLoader.TryGetMod("InfernumMode", out Mod infernum); + infernumModMusic = ModLoader.TryGetMod("InfernumModeMusic", out Mod imusic); + magicStorage = ModLoader.TryGetMod("MagicStorage", out Mod mstorage); + wikiThis = ModLoader.TryGetMod("Wikithis", out Mod wiki); + + if (ModContent.GetInstance().MusicBoxResprite) + { + TextureAssets.Item[ItemID.MusicBox] = ModContent.Request("UnCalamityModMusic/Content/Items/External/MusicBox", AssetRequestMode.AsyncLoad); + } + } + + public override void Unload() + { + Instance = null; + + TextureAssets.Item[ItemID.MusicBox] = ModContent.Request("Terraria/Images/Item_" + ItemID.MusicBox, AssetRequestMode.AsyncLoad); ; + } + + public override void PostSetupContent() + { + wikiThis = ModLoader.TryGetMod("Wikithis", out Mod wiki); + + if (wikiThis) + { + wiki.Call("AddModURL", this, "https://terrariamods.wiki.gg/wiki/Vanilla_Calamity_Mod_Music/{}"); + } + } + } +} \ No newline at end of file diff --git a/build.txt b/build.txt new file mode 100644 index 0000000..696e1e1 --- /dev/null +++ b/build.txt @@ -0,0 +1,8 @@ +displayName = Vanilla Calamity Mod Music +author = apotofkoolaid and Heart Plus Up! +version = 1.11.2 +homepage = https://discord.gg/2jaEwNJm9e +hideCode = true +hideResources = true +weakReferences = CalamityMod, InfernumMode +buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*, .github\*, LICENSE, README.md, .editorconfig, .gitignore, .gitattributes, Effects\Compiler\* \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..709fb28 --- /dev/null +++ b/description.txt @@ -0,0 +1,9 @@ +Vanilla Calamity Mod Music is an in-progress music mod that aims to replace the entire vanilla soundtrack with new songs made in the context of the Calamity Mod OST. + +-= Credits =- + +Music: Heart Plus Up!, SkippyZii, Salvati, Thriplerex, CDMusic, psykomatic, & novaGnomes + +Sprites: Heart Plus Up!, LordMetarex, Seasalt, toothbrush, IbanPlay, Cooper, & PokerFace + +Programming: apotofkoolaid \ No newline at end of file diff --git a/description_workshop.txt b/description_workshop.txt new file mode 100644 index 0000000..4289808 --- /dev/null +++ b/description_workshop.txt @@ -0,0 +1,96 @@ +[h1]Vanilla Calamity Mod Music[/h1] +[url=https://discord.com/invite/2jaEwNJm9e]Discord[/url] [url=https://terrariamods.wiki.gg/wiki/Vanilla_Calamity_Mod_Music]Wiki[/url] + +Vanilla Calamity Mod Music is an in-progress music mod that aims to replace the entire vanilla soundtrack with new songs made in the context of the Calamity Mod OST. + +[b]If you find any issues with this mod, its Discord server is the best place to find help.[/b] + +[hr] + +[b]Current list of tracks:[/b] +[olist] +[b]Environments[/b] +[*] Forest Day - A Legend's Strife +[*] Forest Night - Laze of the Sky +[*] Town Day - Haven in the Sunlight +[*] Town Night - Moonlit Haven +[*] Underground - Under the Earth +[*] Caverns - Nearing the Inferno +[*] Marble & Granite Caves - Amidst the Minerals +[*] Glowing Mushroom Fields - Psychedelic Depths +[*] Tundra - Frozen Over +[*] Underground Tundra - Inside the Glaciers +[*] Desert - Scorched to Dust +[*] Ocean Day - shoreline +[*] Ocean Night - serene tides +[*] Corruption - Writhing Shadows +[*] Underground Corruption - Between the Shadows +[*] Crimson - Clotted Lands +[*] Underground Crimson - Bloodstained Terror +[*] Space - Starry Acsent +[*] Meteorite - The Abomination's Omen +[*] Dungeon - Chambers of the Tyrant +[*] Underworld - Descent Into Hell's Fury +[*] Workshop Tier 1 - Metal, Wood, and Fire +[*] Workshop Tier 2 - The Sky and the Depths +[*] Workshop Tier 3 - Mythic Metals and Enchanted Fires +[*] Workshop Tier 4 - Fruits of Your Labor +[*] Workshop Tier 5 - False Gods and Ancient Elements +[*] Workshop Tier 6 - Master's Forge + +[b]Bosses[/b] +[*] King Slime - Gelatinous Monarch +[*] Eye of Cthulhu - Bloodshot Barrage +[*] Eater of Worlds - Menace of the Chasms +[*] Brain of Cthulhu - Madness Incarnate +[*] Skeletron - Wrath From the Crypt +[*] Wall of Flesh - Fated Insurrection +[*] Moon Lord - Virtuous Radiance + +[b]Events[/b] +[*] Rain - downpour +[*] Lantern Festival - Serenity +[*] Slime Rain - Gelatin Showers +[*] Blood Moon - Congealing Shadows +[*] Blood Moon Death Mode - Sanguine Eclipse + +[b]Other[/b] +[*] Hardmode Interlude - The Resurrection of a Cruel World +[*] False Epilogue - The Memory of a Cruel World +[*] Rain Legacy - Grey Sky + +[b]Alternate Themes[/b] +[*] Deep Abyss Alt - R'lyehian Depths +[*] Crimson Alt - Hemorrhage +[*] Rain Alt - sky fall +[*] Blood Moon Alt - Clotted Darkness +[*] King Slime Alt - Battle of the Bouncy +[*] Eye of Cthulhu Alt - Through Evil's Eye +[*] Destroyer Alt - Behemoth From Beneath +[/olist] + +[hr] + +[b]Credits:[/b] +[list] +[b]Music[/b] +[*] Heart Plus Up! +[*] SkippyZii +[*] Salvati +[*] Thriplerex +[*] CDMusic +[*] psykomatic +[*] novaGnomes + +[b]Sprites[/b] +[*] Heart Plus Up! +[*] LordMetarex +[*] Seasalt +[*] toothbrush +[*] IbanPlay +[*] Cooper +[*] PokerFace + +[b]Programming[/b] +[*] apotofkoolaid +[/list] \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..fe0440e Binary files /dev/null and b/icon.png differ diff --git a/icon_small.png b/icon_small.png new file mode 100644 index 0000000..3d1d7c0 Binary files /dev/null and b/icon_small.png differ diff --git a/icon_workshop.png b/icon_workshop.png new file mode 100644 index 0000000..0662570 Binary files /dev/null and b/icon_workshop.png differ