Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using Terraria;
  9. using Terraria.ID;
  10. using Terraria.ModLoader;
  11. using Terraria.Localization;
  12.  
  13.  
  14. namespace retrocity
  15.  
  16. {
  17.  
  18. public class retrocity : Mod
  19.  
  20. {
  21.  
  22. public override void UpdateMusic(ref int music)
  23. {
  24. if (Main.myPlayer != -1 && !Main.gameMenu)
  25. {
  26. if (Main.player[Main.myPlayer].active && Main.player[Main.myPlayer].GetModPlayer<MyPlayer>(this).ZoneCustomBiome) //this makes the music play only in Custom Biome
  27. {
  28. music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Crystal"); //add where is the custom music is located
  29. }
  30. }
  31. }
  32.  
  33.  
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement