src/console_cmds.cpp
changeset 9354 845e07db4549
parent 9337 ab6e0234bacc
child 9413 7042a8ec3fa8
equal deleted inserted replaced
9353:9d76aef9fe2b 9354:845e07db4549
   924 		IConsoleHelp("Restarts a game. It tries to reproduce the exact same map as the game started with.");
   924 		IConsoleHelp("Restarts a game. It tries to reproduce the exact same map as the game started with.");
   925 		return true;
   925 		return true;
   926 	}
   926 	}
   927 
   927 
   928 	/* Don't copy the _newgame pointers to the real pointers, so call SwitchMode directly */
   928 	/* Don't copy the _newgame pointers to the real pointers, so call SwitchMode directly */
   929 	_patches.map_x = MapLogX();
   929 	_settings.game_creation.map_x = MapLogX();
   930 	_patches.map_y = FindFirstBit(MapSizeY());
   930 	_settings.game_creation.map_y = FindFirstBit(MapSizeY());
   931 	SwitchMode(SM_NEWGAME);
   931 	SwitchMode(SM_NEWGAME);
   932 	return true;
   932 	return true;
   933 }
   933 }
   934 
   934 
   935 DEF_CONSOLE_CMD(ConGetSeed)
   935 DEF_CONSOLE_CMD(ConGetSeed)
   938 		IConsoleHelp("Returns the seed used to create this game. Usage: 'getseed'");
   938 		IConsoleHelp("Returns the seed used to create this game. Usage: 'getseed'");
   939 		IConsoleHelp("The seed can be used to reproduce the exact same map as the game started with.");
   939 		IConsoleHelp("The seed can be used to reproduce the exact same map as the game started with.");
   940 		return true;
   940 		return true;
   941 	}
   941 	}
   942 
   942 
   943 	IConsolePrintF(CC_DEFAULT, "Generation Seed: %u", _patches.generation_seed);
   943 	IConsolePrintF(CC_DEFAULT, "Generation Seed: %u", _settings.game_creation.generation_seed);
   944 	return true;
   944 	return true;
   945 }
   945 }
   946 
   946 
   947 DEF_CONSOLE_CMD(ConGetDate)
   947 DEF_CONSOLE_CMD(ConGetDate)
   948 {
   948 {
  1081 	if (argc == 0) {
  1081 	if (argc == 0) {
  1082 		IConsoleHelp("Exit the game. Usage: 'exit'");
  1082 		IConsoleHelp("Exit the game. Usage: 'exit'");
  1083 		return true;
  1083 		return true;
  1084 	}
  1084 	}
  1085 
  1085 
  1086 	if (_game_mode == GM_NORMAL && _patches.autosave_on_exit) DoExitSave();
  1086 	if (_game_mode == GM_NORMAL && _settings.gui.autosave_on_exit) DoExitSave();
  1087 
  1087 
  1088 	_exit_game = true;
  1088 	_exit_game = true;
  1089 	return true;
  1089 	return true;
  1090 }
  1090 }
  1091 
  1091