console_cmds.c
changeset 2540 dbaba9ff9b94
parent 2539 20b0e2a6b9b0
child 2541 99c04a35ebc5
equal deleted inserted replaced
2539:20b0e2a6b9b0 2540:dbaba9ff9b94
   219 {
   219 {
   220 	const FiosItem *item;
   220 	const FiosItem *item;
   221 	const char *file;
   221 	const char *file;
   222 
   222 
   223 	if (argc == 0) {
   223 	if (argc == 0) {
   224 		IConsoleHelp("Load a game by name or index. Usage: 'load <file \\ number>'");
   224 		IConsoleHelp("Load a game by name or index. Usage: 'load <file | number>'");
   225 		return true;
   225 		return true;
   226 	}
   226 	}
   227 
   227 
   228 	if (argc != 2) return false;
   228 	if (argc != 2) return false;
   229 
   229 
   277 DEF_CONSOLE_CMD(ConListFiles)
   277 DEF_CONSOLE_CMD(ConListFiles)
   278 {
   278 {
   279 	int i;
   279 	int i;
   280 
   280 
   281 	if (argc == 0) {
   281 	if (argc == 0) {
   282 		IConsoleHelp("List all loadable savegames and directories in the current dir via console. Usage: 'ls \\ dir'");
   282 		IConsoleHelp("List all loadable savegames and directories in the current dir via console. Usage: 'ls | dir'");
   283 		return true;
   283 		return true;
   284 	}
   284 	}
   285 
   285 
   286 	BuildFileList();
   286 	BuildFileList();
   287 
   287 
   299 {
   299 {
   300 	const FiosItem *item;
   300 	const FiosItem *item;
   301 	const char *file;
   301 	const char *file;
   302 
   302 
   303 	if (argc == 0) {
   303 	if (argc == 0) {
   304 		IConsoleHelp("Change the dir via console. Usage: 'cd <directory \\ number>'");
   304 		IConsoleHelp("Change the dir via console. Usage: 'cd <directory | number>'");
   305 		return true;
   305 		return true;
   306 	}
   306 	}
   307 
   307 
   308 	if (argc != 2) return false;
   308 	if (argc != 2) return false;
   309 
   309 
   405 DEF_CONSOLE_CMD(ConUnBan)
   405 DEF_CONSOLE_CMD(ConUnBan)
   406 {
   406 {
   407 	uint i, index;
   407 	uint i, index;
   408 
   408 
   409 	if (argc == 0) {
   409 	if (argc == 0) {
   410 		IConsoleHelp("Unban a player from a network game. Usage: 'unban <ip\\id>'");
   410 		IConsoleHelp("Unban a player from a network game. Usage: 'unban <ip | id>'");
   411 		IConsoleHelp("For a list of banned IP's, see the command 'banlist'");
   411 		IConsoleHelp("For a list of banned IP's, see the command 'banlist'");
   412 		return true;
   412 		return true;
   413 	}
   413 	}
   414 
   414 
   415 	if (argc != 2) return false;
   415 	if (argc != 2) return false;
   813 }
   813 }
   814 
   814 
   815 DEF_CONSOLE_CMD(ConScreenShot)
   815 DEF_CONSOLE_CMD(ConScreenShot)
   816 {
   816 {
   817 	if (argc == 0) {
   817 	if (argc == 0) {
   818 		IConsoleHelp("Create a screenshot of the game. Usage: 'screenshot [big\\no_con]'");
   818 		IConsoleHelp("Create a screenshot of the game. Usage: 'screenshot [big | no_con]'");
   819 		IConsoleHelp("'big' makes a screenshot of the whole map, 'no_con' hides the console to create the screenshot");
   819 		IConsoleHelp("'big' makes a screenshot of the whole map, 'no_con' hides the console to create the screenshot");
   820 		return true;
   820 		return true;
   821 	}
   821 	}
   822 
   822 
   823 	if (argc > 3) return false;
   823 	if (argc > 3) return false;
   971 	IConsolePrint( 1, " or omit '=' and just '<var> <value>'. get value with typing '<var>'");
   971 	IConsolePrint( 1, " or omit '=' and just '<var> <value>'. get value with typing '<var>'");
   972 	IConsolePrint( 1, " - commands: [command to list all commands: list_cmds]");
   972 	IConsolePrint( 1, " - commands: [command to list all commands: list_cmds]");
   973 	IConsolePrint( 1, " call commands with '<command> <arg2> <arg3>...'");
   973 	IConsolePrint( 1, " call commands with '<command> <arg2> <arg3>...'");
   974 	IConsolePrint( 1, " - to assign strings, or use them as arguments, enclose it within quotes");
   974 	IConsolePrint( 1, " - to assign strings, or use them as arguments, enclose it within quotes");
   975 	IConsolePrint( 1, " like this: '<command> \"string argument with spaces\"'");
   975 	IConsolePrint( 1, " like this: '<command> \"string argument with spaces\"'");
   976 	IConsolePrint( 1, " - use 'help <command>\\<variable>' to get specific information");
   976 	IConsolePrint( 1, " - use 'help <command> | <variable>' to get specific information");
   977 	IConsolePrint( 1, " - scroll console output with shift + (up\\down)\\(pageup\\pagedown))");
   977 	IConsolePrint( 1, " - scroll console output with shift + (up | down) | (pageup | pagedown))");
   978 	IConsolePrint( 1, " - scroll console input history with the up\\down arrows");
   978 	IConsolePrint( 1, " - scroll console input history with the up | down arrows");
   979 	IConsolePrint( 1, "");
   979 	IConsolePrint( 1, "");
   980 	return true;
   980 	return true;
   981 }
   981 }
   982 
   982 
   983 DEF_CONSOLE_CMD(ConListCommands)
   983 DEF_CONSOLE_CMD(ConListCommands)