src/console_cmds.cpp
branchNewGRF_ports
changeset 6719 4cc327ad39d5
parent 6585 7da94b26498a
child 6720 35756db7e577
--- a/src/console_cmds.cpp	Tue Mar 27 23:27:27 2007 +0000
+++ b/src/console_cmds.cpp	Sat Jun 02 19:59:29 2007 +0000
@@ -8,6 +8,7 @@
 #include "debug.h"
 #include "engine.h"
 #include "functions.h"
+#include "landscape.h"
 #include "saveload.h"
 #include "string.h"
 #include "variables.h"
@@ -141,8 +142,6 @@
 	FOR_ALL_VEHICLES(v) {
 		/* Code ripped from CmdStartStopTrain. Can't call it, because of
 		 * ownership problems, so we'll duplicate some code, for now */
-		if (v->type == VEH_TRAIN)
-			v->u.rail.days_since_order_progr = 0;
 		v->vehstatus |= VS_STOPPED;
 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
@@ -1233,13 +1232,16 @@
 
 		if (!p->is_active) continue;
 
+		const NetworkPlayerInfo *npi = &_network_player_info[p->index];
+
 		GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index], lastof(buffer));
-		IConsolePrintF(8, "#:%d(%s) Company Name: '%s'  Year Founded: %d  Money: %d  Loan: %d  Value: %" OTTD_PRINTF64 "d  (T:%d, R:%d, P:%d, S:%d)",
-			p->index + 1, buffer, _network_player_info[p->index].company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
-			/* trains      */ _network_player_info[p->index].num_vehicle[0],
-			/* lorry + bus */ _network_player_info[p->index].num_vehicle[1] + _network_player_info[p->index].num_vehicle[2],
-			/* planes      */ _network_player_info[p->index].num_vehicle[3],
-			/* ships       */ _network_player_info[p->index].num_vehicle[4]);
+		IConsolePrintF(8, "#:%d(%s) Company Name: '%s'  Year Founded: %d  Money: %d  Loan: %d  Value: %" OTTD_PRINTF64 "d  (T:%d, R:%d, P:%d, S:%d) %sprotected",
+			p->index + 1, buffer, npi->company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
+			/* trains      */ npi->num_vehicle[0],
+			/* lorry + bus */ npi->num_vehicle[1] + npi->num_vehicle[2],
+			/* planes      */ npi->num_vehicle[3],
+			/* ships       */ npi->num_vehicle[4],
+			/* protected   */ StrEmpty(npi->password) ? "un" : "");
 	}
 
 	return true;
@@ -1416,6 +1418,19 @@
 	return true;
 }
 
+DEF_CONSOLE_CMD(ConListPatches)
+{
+	if (argc == 0) {
+		IConsoleHelp("List patch options. Usage: 'list_patches'");
+		return true;
+	}
+
+	if (argc != 1) return false;
+
+	IConsoleListPatches();
+	return true;
+}
+
 DEF_CONSOLE_CMD(ConListDumpVariables)
 {
 	const IConsoleVar *var;
@@ -1497,6 +1512,7 @@
 	IConsoleCmdRegister("pwd",          ConPrintWorkingDirectory);
 	IConsoleCmdRegister("clear",        ConClearBuffer);
 	IConsoleCmdRegister("patch",        ConPatch);
+	IConsoleCmdRegister("list_patches", ConListPatches);
 
 	IConsoleAliasRegister("dir",      "ls");
 	IConsoleAliasRegister("del",      "rm %+");