diff options
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r-- | src/misc_cmd.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index c943a2027..2d1bbdf7a 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -19,6 +19,8 @@ #include "company_func.h" #include "company_gui.h" #include "company_base.h" +#include "tile_map.h" +#include "texteff.hpp" #include "core/backup_type.hpp" #include "table/strings.h" @@ -207,7 +209,7 @@ CommandCost CmdMoneyCheat(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 /** * Change the bank bank balance of a company by inserting or removing money without affecting the loan. - * @param tile unused + * @param tile tile to show text effect on (if not 0) * @param flags operation to perform * @param p1 the amount of money to receive (if positive), or spend (if negative) * @param p2 (bit 0-7) - the company ID. @@ -230,6 +232,10 @@ CommandCost CmdChangeBankBalance(TileIndex tile, DoCommandFlag flags, uint32 p1, Backup<CompanyID> cur_company(_current_company, company, FILE_LINE); SubtractMoneyFromCompany(CommandCost(expenses_type, -delta)); cur_company.Restore(); + + if (tile != 0) { + ShowCostOrIncomeAnimation(TileX(tile) * TILE_SIZE, TileY(tile) * TILE_SIZE, GetTilePixelZ(tile), -delta); + } } /* This command doesn't cost anything for deity. */ |