Do not create text effects when running headlessly

This commit is contained in:
Jonathan G Rennison
2024-01-22 23:17:36 +00:00
parent fa003ebda3
commit 04e47eca9a
3 changed files with 4 additions and 4 deletions

View File

@@ -610,7 +610,7 @@ void ShowEstimatedCostOrIncome(Money cost, int x, int y)
*/
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
{
if (!HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS) || cost == 0) return;
if (IsHeadless() || !HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS) || cost == 0) return;
Point pt = RemapCoords(x, y, z);
StringID msg = STR_INCOME_FLOAT_COST;
@@ -632,7 +632,7 @@ void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost)
*/
void ShowFeederIncomeAnimation(int x, int y, int z, Money transfer, Money income)
{
if (!HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS)) return;
if (IsHeadless() || !HasBit(_extra_display_opt, XDO_SHOW_MONEY_TEXT_EFFECTS)) return;
Point pt = RemapCoords(x, y, z);