Changeset - r5116:6ab72109f482
[Not reviewed]
master
0 39 0
KUDr - 18 years ago 2006-11-17 19:31:44
kudr@openttd.org
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
(original patch by maedhros, ideas: peter1138, Darkvater, Rubidium, Patrick, Eddi|zuHause, ..)
39 files changed with 127 insertions and 39 deletions:
0 comments (0 inline, 0 general)
elrail.c
Show inline comments
 
@@ -58,12 +58,15 @@
 
#include "road_map.h"
 
#include "bridge_map.h"
 
#include "bridge.h"
 
#include "rail_map.h"
 
#include "table/sprites.h"
 
#include "table/elrail_data.h"
 
#include "vehicle.h"
 
#include "train.h"
 
#include "gui.h"
 

	
 
static inline TLG GetTLG(TileIndex t)
 
{
 
	return (HASBIT(TileX(t), 0) << 1) + HASBIT(TileY(t), 0);
 
}
 

	
 
@@ -357,12 +360,14 @@ static void DrawCatenaryOnBridge(const T
 
		}
 
	}
 
}
 

	
 
void DrawCatenary(const TileInfo *ti)
 
{
 
	if (_patches.disable_elrails) return;
 

	
 
	switch (GetTileType(ti->tile)) {
 
		case MP_RAILWAY:
 
			if (IsRailDepot(ti->tile)) {
 
				const SortableSpriteStruct* sss = &CatenarySpriteData_Depot[GetRailDepotDirection(ti->tile)];
 

	
 
				AddSortableSpriteToDraw(
 
@@ -382,6 +387,58 @@ void DrawCatenary(const TileInfo *ti)
 
		case MP_STATION: break;
 

	
 
		default: return;
 
	}
 
	DrawCatenaryRailway(ti);
 
}
 

	
 
int32 SettingsDisableElrail(int32 p1)
 
{
 
	EngineID e_id;
 
	Vehicle* v;
 
	Player *p;
 
	bool disable = (p1 != 0);
 

	
 
	/* we will now walk through all electric train engines and change their railtypes if it is the wrong one*/
 
	const RailType old_railtype = disable ? RAILTYPE_ELECTRIC : RAILTYPE_RAIL;
 
	const RailType new_railtype = disable ? RAILTYPE_RAIL : RAILTYPE_ELECTRIC;
 

	
 
	/* walk through all train engines */
 
	for (e_id = 0; e_id < NUM_TRAIN_ENGINES; e_id++)
 
	{
 
		const RailVehicleInfo *rv_info = RailVehInfo(e_id);
 
		Engine *e = GetEngine(e_id);
 
		/* if it is an electric rail engine and its railtype is the wrong one */
 
		if (rv_info->engclass == 2 && e->railtype == old_railtype) {
 
			/* change it to the proper one */
 
			e->railtype = new_railtype;
 
		}
 
	}
 

	
 
	/* when disabling elrails, make sure that all existing trains can run on
 
	*  normal rail too */
 
	if (disable) {
 
		FOR_ALL_VEHICLES(v) {
 
			if (v->type == VEH_Train && v->u.rail.railtype == RAILTYPE_ELECTRIC) {
 
				/* this railroad vehicle is now compatible only with elrail,
 
				*  so add there also normal rail compatibility */
 
				v->u.rail.compatible_railtypes |= (1 << RAILTYPE_RAIL);
 
				v->u.rail.railtype = RAILTYPE_RAIL;
 
				SETBIT(v->u.rail.flags, VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL);
 
			}
 
		}
 
	}
 

	
 
	/* setup total power for trains */
 
	FOR_ALL_VEHICLES(v) {
 
		/* power is cached only for front engines */
 
		if (v->type == VEH_Train && IsFrontEngine(v)) TrainPowerChanged(v);
 
	}
 

	
 
	FOR_ALL_PLAYERS(p) p->avail_railtypes = GetPlayerRailtypes(p->index);
 

	
 
	/* This resets the _last_built_railtype, which will be invalid for electric
 
	* rails. It may have unintended consequences if that function is ever
 
	* extended, though. */
 
	ReinitGuiAfterToggleElrail(disable);
 
	return 0;
 
}
gui.h
Show inline comments
 
@@ -32,15 +32,16 @@ void ShowPerformanceRatingDetail(void);
 

	
 
/* news_gui.c */
 
void ShowLastNewsMessage(void);
 
void ShowMessageOptions(void);
 
void ShowMessageHistory(void);
 

	
 
/* traintoolb_gui.c */
 
/* rail_gui.c */
 
void ShowBuildRailToolbar(RailType railtype, int button);
 
void PlaceProc_BuyLand(TileIndex tile);
 
void ReinitGuiAfterToggleElrail(bool disable);
 

	
 
/* train_gui.c */
 
void ShowTrainViewWindow(const Vehicle *v);
 
void ShowOrdersWindow(const Vehicle *v);
 

	
 
/* road_gui.c */
lang/american.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnels may cross each other: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Build while in pause mode: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Switch climate: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Change date: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Enable modifying production values: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Allow electric engines to run on normal rail
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Heading for {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Go via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Go non-stop via {WAYPOINT}
lang/brazilian_portuguese.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Bulldozer mágico (destrói indústrias, etc.): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Os túneis poderão cruzar-se: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Permitir construção quando em pausa: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Aviões a jato não irão ter acidentes em aeroportos pequenos: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Mudar de clima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Alterar data: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Ativar modificação de valores de produção: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Permite Trens elétricos em trilho normal
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Dirigindo-se para {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Dirigindo-se para {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Ir via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Ir sem parar via {WAYPOINT}
lang/catalan.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Eruga màgica (treu indústries, inamovibles): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Els tunels es poden creuar: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Construir mentre el joc està en pausa: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Els avions a reacció no tindran (freqüents) accidents en els aeroports petits: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Canviar clima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Canviar data: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Activar modificació de valors de producció: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Deixar que els trens elèctrics circulin per rails normals
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Cap a {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Cap a {WAYPOINT}, a {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Anar via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Anar sense parades via {WAYPOINT}
lang/czech.txt
Show inline comments
 
@@ -1194,13 +1194,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Magický buldozer (odstraní prumysl a neodstranitelné predmety): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunely se mohou krizit: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Povolit staveni v pauze: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Letadla nebudou na malých letištích (tak casto) havarovat: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Zmenit podnebí: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Zmenit datum: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Povolit zmenu produkce prumyslu: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Povolit elektrickým lokomotivám vyjet na normální koleje
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Mirim do {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Mirim do {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Jet pres {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Jet bez zastávky pres {WAYPOINT}
lang/danish.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunneler kan krydse hinanden: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Tillad at bygge mens pause er aktiveret: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetfly vil ikke styrte (ofte) i små lufthavne: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Skift klima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Ændre dato: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Aktiver modifikation af produktion: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Tillad elektriske tog at køre på almindelige skinner
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Retning mod {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Retning mod {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Kør uden stop via {WAYPOINT}
lang/dutch.txt
Show inline comments
 
@@ -1139,13 +1139,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Magische bulldozer (industrieën en andere onverplaatsbare objecten verwijderen): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnels mogen elkaar kruisen: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Bouwen in gepauzeerde toestand: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetvliegtuigen storten niet (vaak) neer op kleine vliegvelden: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Verander klimaat: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Verander datum: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Sta aanpassen productiewaarden toe: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Sta elektrische locomotieven toe op normale rails
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Op weg naar {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Op weg naar {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Ga via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Ga non-stop via {WAYPOINT}
lang/english.txt
Show inline comments
 
@@ -1092,12 +1092,13 @@ STR_CONFIG_PATCHES_SERVINT_ROADVEH_DISAB
 
STR_CONFIG_PATCHES_SERVINT_AIRCRAFT                             :{LTBLUE}Default service interval for aircraft: {ORANGE}{STRING1} days/%
 
STR_CONFIG_PATCHES_SERVINT_AIRCRAFT_DISABLED                    :{LTBLUE}Default service interval for aircraft: {ORANGE}disabled
 
STR_CONFIG_PATCHES_SERVINT_SHIPS                                :{LTBLUE}Default service interval for ships: {ORANGE}{STRING1} days/%
 
STR_CONFIG_PATCHES_SERVINT_SHIPS_DISABLED                       :{LTBLUE}Default service interval for ships: {ORANGE}disabled
 
STR_CONFIG_PATCHES_NOSERVICE                                    :{LTBLUE}Disable servicing when breakdowns set to none: {ORANGE}{STRING1}
 
STR_CONFIG_PATCHES_WAGONSPEEDLIMITS                             :{LTBLUE}Enable wagon speed limits: {ORANGE}{STRING1}
 
STR_CONFIG_PATCHES_DISABLE_ELRAILS                              :{LTBLUE}Disable electric rails: {ORANGE}{STRING1}
 

	
 
STR_CONFIG_PATCHES_COLORED_NEWS_YEAR                            :{LTBLUE}Coloured news appears in: {ORANGE}{STRING1}
 
STR_CONFIG_PATCHES_STARTING_YEAR                                :{LTBLUE}Starting year: {ORANGE}{STRING1}
 
STR_CONFIG_PATCHES_ENDING_YEAR                                  :{LTBLUE}End game in: {ORANGE}{STRING1}
 
STR_CONFIG_PATCHES_SMOOTH_ECONOMY                               :{LTBLUE}Enable smooth economy (more, smaller changes)
 
STR_CONFIG_PATCHES_ALLOW_SHARES                                 :{LTBLUE}Allow buying shares from other companies
 
@@ -1140,13 +1141,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnels may cross each other: {ORANGE}{STRING1}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Build while in pause mode: {ORANGE}{STRING1}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetplanes will not crash (frequently) on small airports: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Switch climate: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Change date: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Enable modifying production values: {ORANGE}{STRING1}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Allow electric engines to run on normal rail
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Heading for {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Heading for {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Go via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Go non-stop via {WAYPOINT}
lang/estonian.txt
Show inline comments
 
@@ -1194,13 +1194,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnelid võivad üksteist läbida: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Pausi ajal ehitamine: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Reaktiivlennukid ei kuku alla (tihti) väikestel lennuväljadel: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Vaheta kliimat: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Muuda kuupäeva: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Luba muutuvad tootmisväärtused: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Luba elektrirongidel sõita tavalisel raudteel
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Suudub kontrollpunti: {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Suundub {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Läbi punkti {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Läbi peatumata punkti{WAYPOINT}
lang/finnish.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Taikapuskutraktori (siirrä teollisuutta yms.): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnelit voivat mennä ristiin: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Rakenna tauon aikana: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Suihkukoneet eivät syöksy (usein) pienille lentokentille: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Vaihda ilmastoa: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Muuta päiväystä: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Muuntuvat tuotantoarvot: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Salli sähköveturien kulkeminen tavallisella rautatiellä.
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Kohde: {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Kohde: {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Kierrä reittipisteen {WAYPOINT} kautta
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Mene pysäht. pisteen {WAYPOINT} kautta
lang/french.txt
Show inline comments
 
@@ -1138,13 +1138,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Bulldozer magique (enlèvement industries et objets fixes): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Les tunnels peuvent se croiser: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Construire pendant le mode pause: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Les jets ne s'écrasent plus (fréquemment) sur les petits aéroports: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Changer de climat : {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Changer la date: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Permettre la modification des valeurs de production : {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Autoriser les locomotives électriques à circuler sur des voies non-électrifiées
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}En route pour {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}En route pour {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Passant par {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Aller sans-arrêt via {WAYPOINT}
lang/german.txt
Show inline comments
 
@@ -1138,13 +1138,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Mächtigeres Abrisswerkzeug: {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnel dürfen sich kreuzen {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Bauen im Pausenmodus: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Flugzeuge stürzen auf kleinen Flughäfen nicht häufiger ab: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Wechsle Klima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Ändere Datum: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Aktiviere Veränderung der Produktionswerte: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Erlaube E-Loks auf normalen Gleisen zu fahren
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Fahre zu {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Fahre zu {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Fahre über {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Fahre ohne Halt über {WAYPOINT}
lang/hungarian.txt
Show inline comments
 
@@ -1203,13 +1203,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Csodabuldózer (lerombol gazdasági épületeket, stb): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}A csatornák keresztezhessék egymást: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Építés szünet módban: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jet-repülõgépek nem fognak (gyakran) lezuhanni a kisebb repülõtereken: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Klíma változtatás: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Dátum módosítás: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}A nyersanyagüzemek termelése változtatható: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Közlekedhessenek elektromos mozdonyok hagyományos síneken
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Úton {WAYPOINT} felé
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Úton {WAYPOINT} felé, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :{WAYPOINT}on át
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Úton {WAYPOINT} ellenõrzõ ponton át
lang/icelandic.txt
Show inline comments
 
@@ -1107,13 +1107,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Töfrajarðýta (eyða iðnaði og óeyðanlegu): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Göng mega skerast: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Byggja í bið: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Þotur brotlenda ekki (oft) á litlum flugvöllum: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Skipta um loftslag: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Breyta dagsetningu: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Leyfa breytingar á verðmæti framleiðslu: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Leyfa rafdrifnum lestum að nota venjuleg spor
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Á leiðinni til {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Á leiðinni til {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Fara með {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Ekki stöðva á {WAYPOINT}
lang/italian.txt
Show inline comments
 
@@ -1139,13 +1139,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}I tunnel possono incrociarsi tra loro: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Consenti costruzione in pausa: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}I jet non si schiantano troppo di frequente nei piccoli aeroporti: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Cambia paesaggio: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Cambia data: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Permetti la modifica dei valori di produzione: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Permetti l'uso di locomotori elettrici sui binari normali
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Direzione {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Direzione {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Vai al {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Procedi non-stop per {WAYPOINT}
lang/norwegian.txt
Show inline comments
 
@@ -1134,13 +1134,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tuneller kan krysse hverandre: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Tillat bygging i pausemodus: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetfly vil ikke krasje (hele tiden) på små flyplasser: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Bytt klima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Bytt dato: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Tillat endring av produksjonsmengder: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Tillat elektriske lokomotiv å kjøre på vanlige skinner
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Har kurs mot {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Har kurs mot {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Kjør via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Gå uten stopp via {WAYPOINT}
lang/polish.txt
Show inline comments
 
@@ -1224,13 +1224,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunele moga sie krzyzowac: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Budowanie w czasie pauzy: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Odrzutowce nie beda sie czesto rozbijac na malych lotniskach: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Zmien klimat: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Zmien date: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Pozwol modyfikowac wielkosc produkcji przedsiebiorstw: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Pozwol lokomotywom elektrycznym pracowac na zwyklych torach
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Zmierza do {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Zmierza do {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Idz przez {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Idz bez zatrzymywania przez {WAYPOINT}
lang/portuguese.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Bulldozer mágico (destrói indústrias, etc.): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Os túneis poderão cruzar-se: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Permitir construção quando em pausa: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Aviões a jacto não irão ter acidentes em aeroportos pequenos: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Mudar de clima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Alterar data: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Activar modificação de valores de produção: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Permitir comboios eléctricos em carris normais
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Dirige-se a {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Dirige-se a {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Ir via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Ir sem parar via {WAYPOINT}
lang/romanian.txt
Show inline comments
 
@@ -1103,13 +1103,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Buldozer magic (demoleazã industrii si lucruri amovibile): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunelele se pot intersecta: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Construieste în modul pauzã: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Avioanele cu reactie nu se vor prãbusi (frecvent) pe aeroporturile mici: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Schimbã peisajul: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Schimbã data: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Activeaza accesul la valorile de productie: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Permite motoarealor electrice sã ruleze pe sine normale
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Merge spre {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Merge spre {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Mergi via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Mergi non-stop via {WAYPOINT}
lang/slovak.txt
Show inline comments
 
@@ -1203,13 +1203,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunely sa mozu navzajom krizit: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Umoznit vystavbu v pauze: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Prudove lietadla nehavaruju (tak casto) na malych letiskach: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Zmenit klimu: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Zmenit datum: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Povolit zmenu objemu vyroby: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Umoznit pouzitie el. rusnov na normalnych tratiach
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Smeruje do {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Smeruje do {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Chod cez {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Chod bez zastavky cez {WAYPOINT}
lang/spanish.txt
Show inline comments
 
@@ -1138,13 +1138,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Bulldozer mágico (elimina industrias, etc.): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Los túneles pueden cruzarse: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Construir mientras se está en pausa: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Los Jets no se estrellarán (frecuentemente) en aeropuertos pequeños: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Cambiar clima: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Cambiar fecha: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Activar modificación de los valores de producción: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Permitir locomotoras eléctricas sobre railes normales
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Hacia {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Hacia {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Ir vía {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Ir directo via {WAYPOINT}
lang/swedish.txt
Show inline comments
 
@@ -1137,13 +1137,12 @@ STR_CHEAT_EXTRA_DYNAMITE                
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tunnlar kan korsa varandra: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Byggnation i pause-läge: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetplan kommer inte att störta (frekvent) på små flygplatser: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}Byt klimat: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Byt datum: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Aktivera modifierande produceringsvärden: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Tillåt elektriska lok att använda vanlig räls
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}På väg mot {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}På väg mot {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :Gå via {WAYPOINT}
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :Gå via {WAYPOINT} utan att stanna
lang/turkish.txt
Show inline comments
 
@@ -1136,13 +1136,12 @@ STR_CHEAT_EXTRA_DYNAMITE                                        :{LTBLUE}Sihirli buldözer (normalde silinemeyen binalari siler): {ORANGE}{STRING}
 
STR_CHEAT_CROSSINGTUNNELS                                       :{LTBLUE}Tüneller kesisebilir: {ORANGE}{STRING}
 
STR_CHEAT_BUILD_IN_PAUSE                                        :{LTBLUE}Duraklama zamaninda insaat yap: {ORANGE}{STRING}
 
STR_CHEAT_NO_JETCRASH                                           :{LTBLUE}Jetler kücük havalimanlarinda düsmesin: {ORANGE} {STRING}
 
STR_CHEAT_SWITCH_CLIMATE                                        :{LTBLUE}iklimi degistir: {ORANGE} {STRING}
 
STR_CHEAT_CHANGE_DATE                                           :{LTBLUE}Tarihi degistir: {ORANGE} {DATE_SHORT}
 
STR_CHEAT_SETUP_PROD                                            :{LTBLUE}Üretim degerlerini degistir: {ORANGE}{STRING}
 
STR_CHEAT_ALLOW_CONVRAIL                                        :{LTBLUE}Elektrikli trenler normal raylarda da gidebilsin
 

	
 
STR_HEADING_FOR_WAYPOINT                                        :{LTBLUE}Gidiyor -> {WAYPOINT}
 
STR_HEADING_FOR_WAYPOINT_VEL                                    :{LTBLUE}Gidiyor -> {WAYPOINT}, {VELOCITY}
 

	
 
STR_GO_TO_WAYPOINT                                              :{WAYPOINT} üzerinden git
 
STR_GO_NON_STOP_TO_WAYPOINT                                     :{WAYPOINT} üzerinden durmaksizin git
main_gui.c
Show inline comments
 
@@ -43,13 +43,13 @@
 
#include "industry.h"
 

	
 
static int _rename_id;
 
static int _rename_what;
 

	
 
static byte _terraform_size = 1;
 
static RailType _last_built_railtype;
 
RailType _last_built_railtype;
 
static int _scengen_town_size = 2; // depress medium-sized towns per default
 

	
 
extern void GenerateIndustries(void);
 
extern bool GenerateTowns(void);
 

	
 

	
 
@@ -2445,6 +2445,7 @@ void GameSizeChanged(void)
 

	
 
void InitializeMainGui(void)
 
{
 
	/* Clean old GUI values */
 
	_last_built_railtype = 0;
 
}
 

	
misc_gui.c
Show inline comments
 
@@ -1679,24 +1679,12 @@ static int32 ClickChangeDateCheat(int32 
 
	SetDate(ConvertYMDToDate(_cur_year + p2, ymd.month, ymd.day));
 
	EnginesMonthlyLoop();
 
	SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0));
 
	return _cur_year;
 
}
 

	
 
static int32 ClickAllowConvrail(int32 p1, int32 p2)
 
{
 
	Vehicle *v;
 
	SB(_railtypes[RAILTYPE_ELECTRIC].powered_railtypes, RAILTYPE_RAIL, 1, p1);
 

	
 
	FOR_ALL_VEHICLES(v) {
 
		if (v->type == VEH_Train && IsFrontEngine(v)) TrainConsistChanged(v);
 
	}
 
	return p1;
 
}
 

	
 

	
 
typedef int32 CheckButtonClick(int32, int32);
 

	
 
enum ce_flags {CE_CLICK = 1 << 0};
 

	
 
typedef byte ce_flags;
 

	
 
@@ -1717,13 +1705,12 @@ static const CheatEntry _cheats_ui[] = {
 
	{SLE_BOOL,       0, STR_CHEAT_CROSSINGTUNNELS,&_cheats.crossing_tunnels.value,&_cheats.crossing_tunnels.been_used,NULL,                     0,  0},
 
	{SLE_BOOL,       0, STR_CHEAT_BUILD_IN_PAUSE, &_cheats.build_in_pause.value,  &_cheats.build_in_pause.been_used,  NULL,                     0,  0},
 
	{SLE_BOOL,       0, STR_CHEAT_NO_JETCRASH,    &_cheats.no_jetcrash.value,     &_cheats.no_jetcrash.been_used,     NULL,                     0,  0},
 
	{SLE_BOOL,       0, STR_CHEAT_SETUP_PROD,     &_cheats.setup_prod.value,      &_cheats.setup_prod.been_used,      NULL,                     0,  0},
 
	{SLE_UINT8,      0, STR_CHEAT_SWITCH_CLIMATE, &_opt.landscape,                &_cheats.switch_climate.been_used,  &ClickChangeClimateCheat,-1,  4},
 
	{SLE_INT32,      0, STR_CHEAT_CHANGE_DATE,    &_cur_year,                     &_cheats.change_date.been_used,     &ClickChangeDateCheat,   -1,  1},
 
	{SLE_BOOL,       0, STR_CHEAT_ALLOW_CONVRAIL, &_cheats.elrail.value,          &_cheats.elrail.been_used,          &ClickAllowConvrail,      0,  0},
 
};
 

	
 

	
 
static const Widget _cheat_widgets[] = {
 
{   WWT_CLOSEBOX,   RESIZE_NONE,    14,     0,    10,     0,    13, STR_00C5,   STR_018B_CLOSE_WINDOW},
 
{    WWT_CAPTION,   RESIZE_NONE,    14,    11,   399,     0,    13, STR_CHEATS, STR_018C_WINDOW_TITLE_DRAG_THIS},
openttd.c
Show inline comments
 
@@ -603,12 +603,14 @@ static void MakeNewGameDone(void)
 
	DoStartupNewPlayer(false);
 

	
 
	_local_player = 0;
 
	_current_player = _local_player;
 
	DoCommandP(0, (_patches.autorenew << 15 ) | (_patches.autorenew_months << 16) | 4, _patches.autorenew_money, NULL, CMD_SET_AUTOREPLACE);
 

	
 
	SettingsDisableElrail(_patches.disable_elrails);
 

	
 
	MarkWholeScreenDirty();
 
}
 

	
 
static void MakeNewGame(bool from_heightmap)
 
{
 
	_game_mode = GM_NORMAL;
 
@@ -1533,8 +1535,22 @@ bool AfterLoadGame(void)
 
	}
 

	
 
	if (CheckSavegameVersion(37)) {
 
		ConvertNameArray();
 
	}
 

	
 
	/* from version 38 we have optional elrails */
 
	if (CheckSavegameVersion(38)) {
 
		/* old game - before elrails made optional */
 
		if (CheckSavegameVersion(24)) {
 
			/* very old game - before elrail was introduced */
 
			_patches.disable_elrails = true; // disable elrails
 
		} else {
 
			/* game with mandatory elrails (r4150+) */
 
			_patches.disable_elrails = false; // enable elrails
 
		}
 
	}
 
	/* do the same as when elrails were enabled/disabled manually just now */
 
	SettingsDisableElrail(_patches.disable_elrails);
 

	
 
	return true;
 
}
rail.h
Show inline comments
 
@@ -462,7 +462,10 @@ void DrawDefaultWaypointSprite(int x, in
 
 * @param ti The TileInfo struct of the tile being drawn
 
 * @see DrawCatenaryRailway
 
 */
 
void DrawCatenary(const TileInfo *ti);
 

	
 
uint GetRailFoundation(Slope tileh, TrackBits bits);
 

	
 
int32 SettingsDisableElrail(int32 p1); ///< _patches.disable_elrail callback
 

	
 
#endif /* RAIL_H */
rail_cmd.c
Show inline comments
 
@@ -880,12 +880,15 @@ static int32 DoConvertRail(TileIndex til
 

	
 
	if (!EnsureNoVehicle(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;
 

	
 
	// tile is already of requested type?
 
	if (GetRailType(tile) == totype) return CMD_ERROR;
 

	
 
	// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
 
	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 

	
 
	// change type.
 
	if (exec) {
 
		TrackBits tracks;
 
		SetRailType(tile, totype);
 
		MarkTileDirtyByTile(tile);
 

	
rail_gui.c
Show inline comments
 
@@ -19,12 +19,13 @@
 
#include "station.h"
 
#include "waypoint.h"
 
#include "debug.h"
 
#include "variables.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_station.h"
 
#include "train.h"
 

	
 
static RailType _cur_railtype;
 
static bool _remove_button_clicked;
 
static DiagDirection _build_depot_direction;
 
static byte _waypoint_count = 1;
 
static byte _cur_waypoint_type;
 
@@ -1147,6 +1148,23 @@ void InitializeRailGui(void)
 
{
 
	_build_depot_direction = DIAGDIR_NW;
 
	_railstation.numtracks = 1;
 
	_railstation.platlength = 1;
 
	_railstation.dragdrop = true;
 
}
 

	
 
void ReinitGuiAfterToggleElrail(bool disable)
 
{
 
	extern RailType _last_built_railtype;
 
	if (disable && _last_built_railtype == RAILTYPE_ELECTRIC) {
 
		Window *w;
 
		_last_built_railtype = _cur_railtype = RAILTYPE_RAIL;
 
		w = FindWindowById(WC_BUILD_TOOLBAR, 0);
 
		if (w != NULL && w->wndproc == BuildRailToolbWndProc) {
 
			SetupRailToolbar(_cur_railtype, w);
 
			SetWindowDirty(w);
 
		}
 
	}
 
	MarkWholeScreenDirty();
 
}
 

	
 

	
road_cmd.c
Show inline comments
 
@@ -427,12 +427,15 @@ int32 DoConvertStreetRail(TileIndex tile
 

	
 
	// not owned by me?
 
	if (!CheckTileOwnership(tile) || !EnsureNoVehicle(tile)) return CMD_ERROR;
 

	
 
	if (GetRailTypeCrossing(tile) == totype) return CMD_ERROR;
 

	
 
	// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
 
	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailTypeCrossing(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 

	
 
	if (exec) {
 
		SetRailTypeCrossing(tile, totype);
 
		MarkTileDirtyByTile(tile);
 
		YapfNotifyTrackLayoutChange(tile, FIND_FIRST_BIT(GetCrossingRailBits(tile)));
 
	}
 

	
saveload.c
Show inline comments
 
@@ -27,13 +27,13 @@
 
#include "player.h"
 
#include "saveload.h"
 
#include "network.h"
 
#include "variables.h"
 
#include <setjmp.h>
 

	
 
const uint16 SAVEGAME_VERSION = 37;
 
const uint16 SAVEGAME_VERSION = 38;
 
uint16 _sl_version;       /// the major savegame version identifier
 
byte   _sl_minor_version; /// the minor savegame version, DO NOT USE!
 

	
 
typedef void WriterProc(uint len);
 
typedef uint ReaderProc(void);
 

	
settings.c
Show inline comments
 
@@ -35,12 +35,13 @@
 
#include "saveload.h"
 
#include "npf.h"
 
#include "yapf/yapf.h"
 
#include "newgrf.h"
 
#include "genworld.h"
 
#include "date.h"
 
#include "rail.h"
 
#ifdef WITH_FREETYPE
 
#include "gfx.h"
 
#include "fontcache.h"
 
#endif
 

	
 
/** The patch values that are used for new games and/or modified in config file */
 
@@ -1317,12 +1318,13 @@ const SettingDesc _patch_settings[] = {
 
	 SDT_VAR(Patches, servint_trains,    SLE_UINT16, 0,D0,   150,     5,     800, 0, STR_CONFIG_PATCHES_SERVINT_TRAINS,       InValidateDetailsWindow),
 
	 SDT_VAR(Patches, servint_roadveh,   SLE_UINT16, 0,D0,   150,     5,     800, 0, STR_CONFIG_PATCHES_SERVINT_ROADVEH,      InValidateDetailsWindow),
 
	 SDT_VAR(Patches, servint_ships,     SLE_UINT16, 0,D0,   360,     5,     800, 0, STR_CONFIG_PATCHES_SERVINT_SHIPS,        InValidateDetailsWindow),
 
	 SDT_VAR(Patches, servint_aircraft,  SLE_UINT16, 0,D0,   100,     5,     800, 0, STR_CONFIG_PATCHES_SERVINT_AIRCRAFT,     InValidateDetailsWindow),
 
	SDT_BOOL(Patches, no_servicing_if_no_breakdowns, 0, 0, false,                    STR_CONFIG_PATCHES_NOSERVICE,            NULL),
 
	SDT_BOOL(Patches, wagon_speed_limits,            0, 0,  true,                    STR_CONFIG_PATCHES_WAGONSPEEDLIMITS,     NULL),
 
	SDT_CONDBOOL(Patches, disable_elrails, 38, SL_MAX_VERSION, 0, 0, false,          STR_CONFIG_PATCHES_DISABLE_ELRAILS,      SettingsDisableElrail),
 

	
 
	/***************************************************************************/
 
	/* Station section of the GUI-configure patches window */
 
	SDT_BOOL(Patches, join_stations,           0, 0,  true,        STR_CONFIG_PATCHES_JOINSTATIONS,       NULL),
 
	SDT_BOOL(Patches, full_load_any,           0, 0,  true,        STR_CONFIG_PATCHES_FULLLOADANY,        NULL),
 
	SDT_BOOL(Patches, improved_load,           0, 0, false,        STR_CONFIG_PATCHES_IMPROVEDLOAD,       NULL),
settings_gui.c
Show inline comments
 
@@ -643,12 +643,13 @@ static const char *_patches_vehicles[] =
 
	"servint_trains",
 
	"servint_roadveh",
 
	"servint_ships",
 
	"servint_aircraft",
 
	"no_servicing_if_no_breakdowns",
 
	"wagon_speed_limits",
 
	"disable_elrails",
 
};
 

	
 
typedef struct PatchEntry {
 
	const SettingDesc *setting;
 
	uint index;
 
} PatchEntry;
station_cmd.c
Show inline comments
 
@@ -1355,12 +1355,15 @@ int32 DoConvertStationRail(TileIndex til
 

	
 
	// tile is not a railroad station?
 
	if (!IsRailwayStation(tile)) return CMD_ERROR;
 

	
 
	if (GetRailType(tile) == totype) return CMD_ERROR;
 

	
 
	// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
 
	if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 

	
 
	if (exec) {
 
		SetRailType(tile, totype);
 
		MarkTileDirtyByTile(tile);
 
		YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile));
 
	}
 

	
train_cmd.c
Show inline comments
 
@@ -189,12 +189,19 @@ void TrainConsistChanged(Vehicle* v)
 
			/* Do not count powered wagons for the compatible railtypes, as wagons always
 
			   have railtype normal */
 
			if (rvi_u->power > 0) {
 
				v->u.rail.compatible_railtypes |= GetRailTypeInfo(u->u.rail.railtype)->powered_railtypes;
 
			}
 

	
 
			/* Some electric engines can be allowed to run on normal rail. It happens to all
 
			 * existing electric engines when elrails are disabled and then re-enabled */
 
			if (HASBIT(u->u.rail.flags, VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL)) {
 
				u->u.rail.railtype = RAILTYPE_RAIL;
 
				u->u.rail.compatible_railtypes |= (1 << RAILTYPE_RAIL);
 
			}
 

	
 
			// max speed is the minimum of the speed limits of all vehicles in the consist
 
			if (!(rvi_u->flags & RVI_WAGON) || _patches.wagon_speed_limits)
 
				if (rvi_u->max_speed != 0 && !UsesWagonOverride(u))
 
					max_speed = min(rvi_u->max_speed, max_speed);
 
		}
 

	
tunnelbridge_cmd.c
Show inline comments
 
@@ -769,12 +769,15 @@ int32 DoConvertTunnelBridgeRail(TileInde
 
		uint length;
 

	
 
		if (!CheckTileOwnership(tile)) return CMD_ERROR;
 

	
 
		if (GetRailType(tile) == totype) return CMD_ERROR;
 

	
 
		// 'hidden' elrails can't be downgraded to normal rail when elrails are disabled
 
		if (_patches.disable_elrails && totype == RAILTYPE_RAIL && GetRailType(tile) == RAILTYPE_ELECTRIC) return CMD_ERROR;
 

	
 
		endtile = CheckTunnelBusy(tile, &length);
 
		if (endtile == INVALID_TILE) return CMD_ERROR;
 

	
 
		if (exec) {
 
			Track track;
 
			SetRailType(tile, totype);
variables.h
Show inline comments
 
@@ -122,12 +122,13 @@ typedef struct Patches {
 
	bool wagon_speed_limits;            // enable wagon speed limits
 
	bool forbid_90_deg;                 // forbid trains to make 90 deg turns
 
	bool invisible_trees;               // don't show trees when buildings are transparent
 
	bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
 
	bool link_terraform_toolbar;        // display terraform toolbar when displaying rail, road, water and airport toolbars
 
	bool reverse_scroll;                // Right-Click-Scrolling scrolls in the opposite direction
 
	bool disable_elrails;               // when true, the elrails are disabled
 
	bool measure_tooltip;               // Show a permanent tooltip when dragging tools
 
	byte liveries;                      // Options for displaying company liveries, 0=none, 1=self, 2=all
 
	bool prefer_teamchat;               // Choose the chat message target with <ENTER>, true=all players, false=your team
 

	
 
	uint8 toolbar_pos;                  // position of toolbars, 0=left, 1=center, 2=right
 
	uint8 window_snap_radius;           // Windows snap at each other if closer than this
 
@@ -237,13 +238,13 @@ typedef struct Cheats {
 
	Cheat crossing_tunnels; // allow tunnels that cross each other
 
	Cheat build_in_pause;   // build while in pause mode
 
	Cheat no_jetcrash;      // no jet will crash on small airports anymore
 
	Cheat switch_climate;
 
	Cheat change_date;      // changes date ingame
 
	Cheat setup_prod;       // setup raw-material production in game
 
	Cheat elrail;           // allow electric engines to be powered on conventional rail
 
	Cheat dummy;            // empty cheat (enable running el-engines on normal rail)
 
} Cheats;
 

	
 
VARDEF Cheats _cheats;
 

	
 
typedef struct Paths {
 
	char *personal_dir;  // includes cfg file and save folder
vehicle.h
Show inline comments
 
@@ -92,12 +92,15 @@ enum {
 

	
 
	// used to reverse the visible direction of the vehicle
 
	VRF_REVERSE_DIRECTION = 4,
 

	
 
	// used to mark train as lost because PF can't find the route
 
	VRF_NO_PATH_TO_DESTINATION = 5,
 

	
 
	// used to mark that electric train engine is allowed to run on normal rail
 
	VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL = 6,
 
};
 

	
 
typedef struct VehicleAir {
 
	uint16 crashed_counter;
 
	byte pos;
 
	byte previous_pos;
0 comments (0 inline, 0 general)