public override bool UseItem(Player player) { //if (downedMoonlord && TUA.EoCDeath >= 10) //{ if (!Main.expertMode) { Main.expertMode = true; } if (TUAWorld.ApoMoonDowned) { Main.PlaySound(SoundID.Roar, player.position, 0); NPC.NewNPC((int)player.Center.X, (int)player.Center.Y - (76 * 16), ModContent.NPCType <EyeOApocalypse>()); } else { MoonEventManagerWorld.Activate("Apocalypse Moon"); } if (Main.netMode != 1) { Main.NewText("The apocalypse is coming, be aware...", Color.DarkGoldenrod); } else { NetMessage.BroadcastChatMessage(NetworkText.FromLiteral("The apocalypse is coming, be aware..."), Color.DarkGoldenrod); } Main.PlaySound(SoundID.MoonLord, player.position, 0); NPC.NewNPC((int)player.Center.X, (int)player.Center.Y - (76 * 16), ModContent.NPCType <EyeOApocalypse>()); Main.spriteBatch.Draw(ModContent.GetTexture("Projectile_490"), new Vector2(player.Center.X, player.Center.Y), Color.DarkRed); return(true); }
private void UpdateInGameMusic(ref int music, ref MusicPriority musicPriority) { if (this.GetBiome("Meteoridon").InBiome(Main.LocalPlayer)) { music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Stars_Lament_Loop"); } else if (MoonEventManagerWorld.IsActive("Apocalypse Moon")) { music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Terminal_Inception"); musicPriority = MusicPriority.BossHigh; } else if (Subworld.IsActive <SolarSubworld>()) { music = MusicID.TheTowers; Main.musicBox = 36; musicPriority = MusicPriority.Environment; } else if (Main.LocalPlayer.position.Y / 16 > Main.maxTilesY - 200 && Main.ActiveWorldFileData.HasCrimson) { music = this.GetSoundSlot(SoundType.Music, "Sounds/Music/Exclusion_Zone"); musicPriority = MusicPriority.Environment; } }