Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "tile_map.h"
|
||||
#include "newgrf.h"
|
||||
#include "error.h"
|
||||
#include "misc_cmd.h"
|
||||
|
||||
#include "widgets/cheat_widget.h"
|
||||
|
||||
@@ -54,7 +55,7 @@ static int32 _money_cheat_amount = 10000000;
|
||||
*/
|
||||
static int32 ClickMoneyCheat(int32 p1, int32 p2)
|
||||
{
|
||||
DoCommandP(CMD_MONEY_CHEAT, 0, (uint32)(p2 * _money_cheat_amount), 0);
|
||||
Command<CMD_MONEY_CHEAT>::Post(0, (uint32)(p2 * _money_cheat_amount), 0, {});
|
||||
return _money_cheat_amount;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user