CosmicWorm - Changed CombatText logic

This commit is contained in:
Flowaria committed 2025-11-25 23:27:38 +09:00
1 parent 1c6ed265db
commit 138b2e94b0
1 file changed
+13 -7
+13 -7
View File
@@ -41,15 +41,21 @@ namespace CalamityMod.Items.SummonItems
public override bool? UseItem(Player player)
{
string key = "Mods.CalamityMod.Status.Boss.DoGSpawn";
Color messageColor = Color.Cyan;
Main.NewText(Language.GetTextValue(key), messageColor);
// Server literally do nothing here.
if (Main.dedServ)
return true;
if (!Main.dedServ)
string key = "Mods.CalamityMod.Status.Boss.DoGSpawn";
string spawnText = Language.GetTextValue(key);
Color messageColor = Color.Cyan;
Main.NewText(spawnText, messageColor);
var subtitleID = CombatText.NewText(player.Hitbox, messageColor, spawnText, true);
if (subtitleID < Main.maxCombatText)
{
var subtitle = Main.combatText[CombatText.NewText(player.Hitbox, messageColor, Language.GetTextValue(key), true)];
player.Calamity().subtitletext = subtitle;
player.Calamity().subtitleColors = [Color.Cyan, Color.Fuchsia];
var localPlayer = Main.LocalPlayer.Calamity();
localPlayer.subtitletext = Main.combatText[subtitleID];
localPlayer.subtitleColors = [Color.Cyan, Color.Fuchsia];
}
CalamityUtils.SpawnBossOnPosUsingItem<DevourerofGodsHead>(player, (int)player.Center.X, (int)player.Center.Y - 1600, DevourerofGodsHead.SpawnSound);