src/console_cmds.cpp
branchgamebalance
changeset 9911 0b8b245a2391
parent 9908 0fa543611bbe
child 9913 e79cd19772dd
equal deleted inserted replaced
9910:0b2aebc8283e 9911:0b8b245a2391
   140 	}
   140 	}
   141 
   141 
   142 	FOR_ALL_VEHICLES(v) {
   142 	FOR_ALL_VEHICLES(v) {
   143 		/* Code ripped from CmdStartStopTrain. Can't call it, because of
   143 		/* Code ripped from CmdStartStopTrain. Can't call it, because of
   144 		 * ownership problems, so we'll duplicate some code, for now */
   144 		 * ownership problems, so we'll duplicate some code, for now */
   145 		if (v->type == VEH_TRAIN)
       
   146 			v->u.rail.days_since_order_progr = 0;
       
   147 		v->vehstatus |= VS_STOPPED;
   145 		v->vehstatus |= VS_STOPPED;
   148 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
   146 		InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
   149 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
   147 		InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
   150 	}
   148 	}
   151 	return true;
   149 	return true;
  1232 	FOR_ALL_PLAYERS(p) {
  1230 	FOR_ALL_PLAYERS(p) {
  1233 		char buffer[512];
  1231 		char buffer[512];
  1234 
  1232 
  1235 		if (!p->is_active) continue;
  1233 		if (!p->is_active) continue;
  1236 
  1234 
       
  1235 		const NetworkPlayerInfo *npi = &_network_player_info[p->index];
       
  1236 
  1237 		GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index], lastof(buffer));
  1237 		GetString(buffer, STR_00D1_DARK_BLUE + _player_colors[p->index], lastof(buffer));
  1238 		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)",
  1238 		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",
  1239 			p->index + 1, buffer, _network_player_info[p->index].company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
  1239 			p->index + 1, buffer, npi->company_name, p->inaugurated_year, p->player_money, p->current_loan, CalculateCompanyValue(p),
  1240 			/* trains      */ _network_player_info[p->index].num_vehicle[0],
  1240 			/* trains      */ npi->num_vehicle[0],
  1241 			/* lorry + bus */ _network_player_info[p->index].num_vehicle[1] + _network_player_info[p->index].num_vehicle[2],
  1241 			/* lorry + bus */ npi->num_vehicle[1] + npi->num_vehicle[2],
  1242 			/* planes      */ _network_player_info[p->index].num_vehicle[3],
  1242 			/* planes      */ npi->num_vehicle[3],
  1243 			/* ships       */ _network_player_info[p->index].num_vehicle[4]);
  1243 			/* ships       */ npi->num_vehicle[4],
       
  1244 			/* protected   */ StrEmpty(npi->password) ? "un" : "");
  1244 	}
  1245 	}
  1245 
  1246 
  1246 	return true;
  1247 	return true;
  1247 }
  1248 }
  1248 
  1249