Add support for money cheat in multiplayer
Add a setting for whether this is permitted by multiplayer clients
This commit is contained in:
@@ -339,8 +339,12 @@ struct MainWindow : Window
|
||||
break;
|
||||
|
||||
case GHK_MONEY: // Gimme money
|
||||
/* You can only cheat for money in single player. */
|
||||
if (!_networking) DoCommandP(0, 10000000, 0, CMD_MONEY_CHEAT);
|
||||
/* You can only cheat for money in single player or when otherwise suitably authorised. */
|
||||
if (!_networking || _settings_game.difficulty.money_cheat_in_multiplayer) {
|
||||
DoCommandP(0, 10000000, 0, CMD_MONEY_CHEAT);
|
||||
} else if (_network_server || _network_settings_access) {
|
||||
DoCommandP(0, 10000000, 0, CMD_MONEY_CHEAT_ADMIN);
|
||||
}
|
||||
break;
|
||||
|
||||
case GHK_UPDATE_COORDS: // Update the coordinates of all station signs
|
||||
|
||||
Reference in New Issue
Block a user