Changeset - r15961:9492ed63ba2b
[Not reviewed]
master
0 6 0
rubidium - 14 years ago 2010-08-28 18:37:49
rubidium@openttd.org
(svn r20659) -Feature: make the (flat) area around an industry configurable (Eddi|zuHause)
6 files changed with 10 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -1407,99 +1407,100 @@ static bool CheckCanTerraformSurrounding
 
	/* Check if we don't leave the map */
 
	if (TileX(tile) == 0 || TileY(tile) == 0 || GetTileType(tile) == MP_VOID) return false;
 

	
 
	tile += TileDiffXY(-1, -1);
 
	TILE_LOOP(tile_walk, size_x, size_y, tile) {
 
		uint curh = TileHeight(tile_walk);
 
		/* Is the tile clear? */
 
		if ((GetTileType(tile_walk) != MP_CLEAR) && (GetTileType(tile_walk) != MP_TREES)) return false;
 

	
 
		/* Don't allow too big of a change if this is the sub-tile check */
 
		if (internal != 0 && Delta(curh, height) > 1) return false;
 

	
 
		/* Different height, so the surrounding tiles of this tile
 
		 *  has to be correct too (in level, or almost in level)
 
		 *  else you get a chain-reaction of terraforming. */
 
		if (internal == 0 && curh != height) {
 
			if (TileX(tile_walk) == 0 || TileY(tile_walk) == 0 || !CheckCanTerraformSurroundingTiles(tile_walk + TileDiffXY(-1, -1), height, internal + 1)) {
 
				return false;
 
			}
 
		}
 
	}
 

	
 
	return true;
 
}
 

	
 
/**
 
 * This function tries to flatten out the land below an industry, without
 
 *  damaging the surroundings too much.
 
 */
 
static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags, const IndustryTileTable *it, int type)
 
{
 
	const int MKEND = -0x80;   // used for last element in an IndustryTileTable (see build_industry.h)
 
	int max_x = 0;
 
	int max_y = 0;
 

	
 
	/* Finds dimensions of largest variant of this industry */
 
	do {
 
		if (it->gfx == 0xFF) continue;  //  FF been a marquer for a check on clear water, skip it
 
		if (it->ti.x > max_x) max_x = it->ti.x;
 
		if (it->ti.y > max_y) max_y = it->ti.y;
 
	} while ((++it)->ti.x != MKEND);
 

	
 
	/* Remember level height */
 
	uint h = TileHeight(tile);
 

	
 
	if (TileX(tile) <= 1 || TileY(tile) <= 1) return false;
 
	/* Check that all tiles in area and surrounding are clear
 
	 * this determines that there are no obstructing items */
 
	TileIndex cur_tile = tile + TileDiffXY(-1, -1);
 
	uint size_x = max_x + 4;
 
	uint size_y = max_y + 4;
 

	
 
	TileIndex cur_tile = tile + TileDiffXY(-_settings_game.construction.industry_platform, -_settings_game.construction.industry_platform);
 
	uint size_x = max_x + 2 + 2 * _settings_game.construction.industry_platform;
 
	uint size_y = max_y + 2 + 2 * _settings_game.construction.industry_platform;
 

	
 
	/* Check if we don't leave the map */
 
	if (TileX(cur_tile) + size_x >= MapMaxX() || TileY(cur_tile) + size_y >= MapMaxY()) return false;
 

	
 
	/* _current_company is OWNER_NONE for randomly generated industries and in editor, or the company who funded or prospected the industry.
 
	 * Perform terraforming as OWNER_TOWN to disable autoslope and town ratings. */
 
	Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
 

	
 
	TILE_LOOP(tile_walk, size_x, size_y, cur_tile) {
 
		uint curh = TileHeight(tile_walk);
 
		if (curh != h) {
 
			/* This tile needs terraforming. Check if we can do that without
 
			 *  damaging the surroundings too much. */
 
			if (!CheckCanTerraformSurroundingTiles(tile_walk, h, 0)) {
 
				cur_company.Restore();
 
				return false;
 
			}
 
			/* This is not 100% correct check, but the best we can do without modifying the map.
 
			 *  What is missing, is if the difference in height is more than 1.. */
 
			if (DoCommand(tile_walk, SLOPE_N, (curh > h) ? 0 : 1, flags & ~DC_EXEC, CMD_TERRAFORM_LAND).Failed()) {
 
				cur_company.Restore();
 
				return false;
 
			}
 
		}
 
	}
 

	
 
	if (flags & DC_EXEC) {
 
		/* Terraform the land under the industry */
 
		TILE_LOOP(tile_walk, size_x, size_y, cur_tile) {
 
			uint curh = TileHeight(tile_walk);
 
			while (curh != h) {
 
				/* We give the terraforming for free here, because we can't calculate
 
				 *  exact cost in the test-round, and as we all know, that will cause
 
				 *  a nice assert if they don't match ;) */
 
				DoCommand(tile_walk, SLOPE_N, (curh > h) ? 0 : 1, flags, CMD_TERRAFORM_LAND);
 
				curh += (curh > h) ? -1 : 1;
 
			}
 
		}
 
	}
 

	
 
	cur_company.Restore();
 
	return true;
 
}
 

	
 

	
 
/**
 
 * Check that the new industry is far enough from conflicting industries.
 
 * @param tile Tile to construct the industry.
src/lang/english.txt
Show inline comments
 
@@ -1066,96 +1066,97 @@ STR_REVERSE_AT_END_OF_LINE_ONLY         
 

	
 
STR_DISASTERS_OFF                                               :Off
 
STR_DISASTERS_ON                                                :On
 

	
 
STR_CITY_APPROVAL_PERMISSIVE                                    :Permissive
 
STR_CITY_APPROVAL_TOLERANT                                      :Tolerant
 
STR_CITY_APPROVAL_HOSTILE                                       :Hostile
 

	
 
STR_WARNING_NO_SUITABLE_AI                                      :{WHITE}No suitable AIs available...{}You can download several AIs via the 'Online Content' system
 
STR_WARNING_DIFFICULTY_TO_CUSTOM                                :{WHITE}This action changed the difficulty level to custom
 

	
 
# Advanced settings window
 
STR_CONFIG_SETTING_CAPTION                                      :{WHITE}Advanced Settings
 

	
 
STR_CONFIG_SETTING_OFF                                          :Off
 
STR_CONFIG_SETTING_ON                                           :On
 
STR_CONFIG_SETTING_DISABLED                                     :disabled
 
STR_CONFIG_SETTING_VEHICLESPEED                                 :{LTBLUE}Show vehicle speed in status bar: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_BUILDONSLOPES                                :{LTBLUE}Allow building on slopes and coasts: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_AUTOSLOPE                                    :{LTBLUE}Allow terraforming under buildings, tracks, etc. (autoslope): {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_CATCHMENT                                    :{LTBLUE}Allow more realistically sized catchment areas: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_EXTRADYNAMITE                                :{LTBLUE}Allow removal of more town-owned roads, bridges, etc: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_MAMMOTHTRAINS                                :{LTBLUE}Enable building very long trains: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_SMOKE_AMOUNT                                 :{LTBLUE}Amount of locomotive smoke/sparks: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_SMOKE_AMOUNT_NONE                            :None
 
STR_CONFIG_SETTING_SMOKE_AMOUNT_ORIGINAL                        :Original
 
STR_CONFIG_SETTING_SMOKE_AMOUNT_REALISTIC                       :Realistic
 
STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL                     :{LTBLUE}Train acceleration model: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_ORIGINAL            :Original
 
STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL_REALISTIC           :Realistic
 
STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL              :{LTBLUE}Road vehicle acceleration model: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL_ORIGINAL     :Original
 
STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL_REALISTIC    :Realistic
 
STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS                        :{LTBLUE}Slope steepness for trains {ORANGE}{STRING1}%
 
STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS                 :{LTBLUE}Slope steepness for road vehicles {ORANGE}{STRING1}%
 
STR_CONFIG_SETTING_FORBID_90_DEG                                :{LTBLUE}Forbid trains and ships from making 90° turns: {ORANGE}{STRING1} {LTBLUE} (not with OPF)
 
STR_CONFIG_SETTING_JOINSTATIONS                                 :{LTBLUE}Join train stations built next to each other: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS                        :{LTBLUE}Allow to join stations not directly adjacent: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_IMPROVEDLOAD                                 :{LTBLUE}Use improved loading algorithm: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_GRADUAL_LOADING                              :{LTBLUE}Load vehicles gradually: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_INFLATION                                    :{LTBLUE}Inflation: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_SELECTGOODS                                  :{LTBLUE}Deliver cargo to a station only when there is a demand: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_LONGBRIDGES                                  :{LTBLUE}Allow building very long bridges: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_GOTODEPOT                                    :{LTBLUE}Allow goto depot orders: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD             :{LTBLUE}Manual primary industry construction method: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NONE        :none
 
STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_NORMAL      :as other industries
 
STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD_PROSPECTING :prospecting
 
STR_CONFIG_SETTING_INDUSTRY_PLATFORM                            :{LTBLUE}Flat area around industries: {ORANGE}{STRING1} tile{P 0:1 "" s}
 
STR_CONFIG_SETTING_MULTIPINDTOWN                                :{LTBLUE}Allow multiple similar industries per town: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_LONGDATE                                     :{LTBLUE}Always show long date in the status bar: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_SIGNALSIDE                                   :{LTBLUE}Show signals on the drive side: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_SHOWFINANCES                                 :{LTBLUE}Show finances window at the end of the year: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT                           :{LTBLUE}New orders are 'non-stop' by default: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_STOP_LOCATION                                :{LTBLUE}New train orders stop by default at the {ORANGE}{STRING1}{LTBLUE} of the platform
 
STR_CONFIG_SETTING_STOP_LOCATION_NEAR_END                       :near end
 
STR_CONFIG_SETTING_STOP_LOCATION_MIDDLE                         :middle
 
STR_CONFIG_SETTING_STOP_LOCATION_FAR_END                        :far end
 
STR_CONFIG_SETTING_ROAD_VEHICLE_QUEUEING                        :{LTBLUE}Road vehicle queueing (with quantum effects): {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_AUTOSCROLL                                   :{LTBLUE}Pan window when mouse is at the edge: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_BRIBE                                        :{LTBLUE}Allow bribing of the local authority: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ALLOW_EXCLUSIVE                              :{LTBLUE}Allow buying exclusive transport rights: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ALLOW_GIVE_MONEY                             :{LTBLUE}Allow sending money to other companies: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_NONUNIFORM_STATIONS                          :{LTBLUE}Nonuniform stations: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_FREIGHT_TRAINS                               :{LTBLUE}Weight multiplier for freight to simulate heavy trains: {ORANGE}{STRING}
 
STR_CONFIG_SETTING_PLANE_SPEED                                  :{LTBLUE}Plane speed factor: {ORANGE}1 / {STRING1}
 
STR_CONFIG_SETTING_PLANE_CRASHES                                :{LTBLUE}Number of plane crashes: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_PLANE_CRASHES_NONE                           :none
 
STR_CONFIG_SETTING_PLANE_CRASHES_REDUCED                        :reduced
 
STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL                         :normal
 
STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD                            :{LTBLUE}Allow drive-through road stops on town owned roads: {ORANGE}{STRING}
 
STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD                      :{LTBLUE}Allow drive-through road stops on roads owned by competitors: {ORANGE}{STRING}
 
STR_CONFIG_SETTING_ADJACENT_STATIONS                            :{LTBLUE}Allow building adjacent stations: {ORANGE}{STRING}
 
STR_CONFIG_SETTING_DYNAMIC_ENGINES                              :{LTBLUE}Enable multiple NewGRF engine sets: {ORANGE}{STRING}
 
STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES            :{WHITE}Changing this setting is not possible when there are vehicles.
 

	
 
STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS                        :{LTBLUE}Airports never expire: {ORANGE}{STRING1}
 

	
 
STR_CONFIG_SETTING_WARN_LOST_TRAIN                              :{LTBLUE}Warn if train is lost: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ORDER_REVIEW                                 :{LTBLUE}Review vehicles' orders: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ORDER_REVIEW_OFF                             :no
 
STR_CONFIG_SETTING_ORDER_REVIEW_EXDEPOT                         :yes, but exclude stopped vehicles
 
STR_CONFIG_SETTING_ORDER_REVIEW_ON                              :of all vehicles
 
STR_CONFIG_SETTING_WARN_INCOME_LESS                             :{LTBLUE}Warn if a vehicle's income is negative: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES                        :{LTBLUE}Vehicles never expire: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_AUTORENEW_VEHICLE                            :{LTBLUE}Autorenew vehicle when it gets old: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_AUTORENEW_MONTHS                             :{LTBLUE}Autorenew when vehicle is {ORANGE}{STRING1}{LTBLUE} months before/after max age
 
STR_CONFIG_SETTING_AUTORENEW_MONEY                              :{LTBLUE}Autorenew minimum needed money for renew: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_ERRMSG_DURATION                              :{LTBLUE}Duration of error message: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_HOVER_DELAY                                  :{LTBLUE}Delay of hover events: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_HOVER_DELAY_DISABLED                         :{LTBLUE}Delay of hover events: {ORANGE}disabled
 
STR_CONFIG_SETTING_POPULATION_IN_LABEL                          :{LTBLUE}Show town population in the town name label: {ORANGE}{STRING1}
 

	
 
STR_CONFIG_SETTING_LAND_GENERATOR                               :{LTBLUE}Land generator: {ORANGE}{STRING1}
 
STR_CONFIG_SETTING_LAND_GENERATOR_ORIGINAL                      :Original
 
STR_CONFIG_SETTING_LAND_GENERATOR_TERRA_GENESIS                 :TerraGenesis
 
STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE                        :{LTBLUE}Max distance from edge for Oil Refineries {ORANGE}{STRING1}
src/saveload/saveload.cpp
Show inline comments
 
@@ -165,98 +165,99 @@
 
 *  100   13952
 
 *  101   14233
 
 *  102   14332
 
 *  103   14598
 
 *  104   14735
 
 *  105   14803
 
 *  106   14919
 
 *  107   15027
 
 *  108   15045
 
 *  109   15075
 
 *  110   15148
 
 *  111   15190
 
 *  112   15290
 
 *  113   15340
 
 *  114   15601
 
 *  115   15695
 
 *  116   15893   0.7.x
 
 *  117   16037
 
 *  118   16129
 
 *  119   16242
 
 *  120   16439
 
 *  121   16694
 
 *  122   16855
 
 *  123   16909
 
 *  124   16993
 
 *  125   17113
 
 *  126   17433
 
 *  127   17439
 
 *  128   18281
 
 *  129   18292
 
 *  130   18404
 
 *  131   18481
 
 *  132   18522
 
 *  133   18674
 
 *  134   18703
 
 *  135   18719
 
 *  136   18764
 
 *  137   18912
 
 *  138   18942   1.0.x
 
 *  139   19346
 
 *  140   19382
 
 *  141   19799
 
 *  142   20003
 
 *  143   20048
 
 *  144   20334
 
 *  145   20376
 
 *  146   20446
 
 *  147   20621
 
 *  148   20659
 
 */
 
extern const uint16 SAVEGAME_VERSION = 147; ///< current savegame version of OpenTTD
 
extern const uint16 SAVEGAME_VERSION = 148; ///< current savegame version of OpenTTD
 

	
 
SavegameType _savegame_type; ///< type of savegame we are loading
 

	
 
uint32 _ttdp_version;     ///< version of TTDP savegame (if applicable)
 
uint16 _sl_version;       ///< the major savegame version identifier
 
byte   _sl_minor_version; ///< the minor savegame version, DO NOT USE!
 
char _savegame_format[8]; ///< how to compress savegames
 
bool _do_autosave;        ///< are we doing an autosave at the moment?
 

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

	
 
/** What are we currently doing? */
 
enum SaveLoadAction {
 
	SLA_LOAD,        ///< loading
 
	SLA_SAVE,        ///< saving
 
	SLA_PTRS,        ///< fixing pointers
 
	SLA_NULL,        ///< null all pointers (on loading error)
 
	SLA_LOAD_CHECK,  ///< partial loading into #_load_check_data
 
};
 

	
 
enum NeedLength {
 
	NL_NONE = 0,       ///< not working in NeedLength mode
 
	NL_WANTLENGTH = 1, ///< writing length and data
 
	NL_CALCLENGTH = 2, ///< need to calculate the length
 
};
 

	
 
/** The saveload struct, containing reader-writer functions, bufffer, version, etc. */
 
struct SaveLoadParams {
 
	SaveLoadAction action;               ///< are we doing a save or a load atm.
 
	NeedLength need_length;              ///< working in NeedLength (Autolength) mode?
 
	byte block_mode;                     ///< ???
 
	bool error;                          ///< did an error occur or not
 

	
 
	size_t obj_len;                      ///< the length of the current object we are busy with
 
	int array_index, last_array_index;   ///< in the case of an array, the current and last positions
 

	
 
	size_t offs_base;                    ///< the offset in number of bytes since we started writing data (eg uncompressed savegame size)
 

	
 
	WriterProc *write_bytes;             ///< savegame writer function
 
	ReaderProc *read_bytes;              ///< savegame loader function
 

	
 
	/* When saving/loading savegames, they are always saved to a temporary memory-place
 
	 * to be flushed to file (save) or to final place (load) when full. */
 
	byte *bufp, *bufe;                   ///< bufp(ointer) gives the current position in the buffer bufe(nd) gives the end of the buffer
 

	
 
	/* these 3 may be used by compressor/decompressors. */
 
	byte *buf;                           ///< pointer to temporary memory to read/write, initialized by SaveLoadFormat->initread/write
src/settings_gui.cpp
Show inline comments
 
@@ -1326,96 +1326,97 @@ static SettingEntry _settings_constructi
 
	SettingEntry("construction.longbridges"),
 
	SettingEntry("station.never_expire_airports"),
 
	SettingEntry("construction.freeform_edges"),
 
	SettingEntry("construction.extra_tree_placement"),
 
};
 
/** Construction sub-page */
 
static SettingsPage _settings_construction_page = {_settings_construction, lengthof(_settings_construction)};
 

	
 
static SettingEntry _settings_stations_cargo[] = {
 
	SettingEntry("order.improved_load"),
 
	SettingEntry("order.gradual_loading"),
 
	SettingEntry("order.selectgoods"),
 
};
 
/** Cargo handling sub-page */
 
static SettingsPage _settings_stations_cargo_page = {_settings_stations_cargo, lengthof(_settings_stations_cargo)};
 

	
 
static SettingEntry _settings_stations[] = {
 
	SettingEntry(&_settings_stations_cargo_page, STR_CONFIG_SETTING_STATIONS_CARGOHANDLING),
 
	SettingEntry("station.join_stations"),
 
	SettingEntry("station.nonuniform_stations"),
 
	SettingEntry("station.adjacent_stations"),
 
	SettingEntry("station.distant_join_stations"),
 
	SettingEntry("station.station_spread"),
 
	SettingEntry("economy.station_noise_level"),
 
	SettingEntry("station.modified_catchment"),
 
	SettingEntry("construction.road_stop_on_town_road"),
 
	SettingEntry("construction.road_stop_on_competitor_road"),
 
};
 
/** Stations sub-page */
 
static SettingsPage _settings_stations_page = {_settings_stations, lengthof(_settings_stations)};
 

	
 
static SettingEntry _settings_economy_towns[] = {
 
	SettingEntry("economy.bribe"),
 
	SettingEntry("economy.exclusive_rights"),
 
	SettingEntry("economy.town_layout"),
 
	SettingEntry("economy.allow_town_roads"),
 
	SettingEntry("economy.allow_town_level_crossings"),
 
	SettingEntry("economy.found_town"),
 
	SettingEntry("economy.mod_road_rebuild"),
 
	SettingEntry("economy.town_growth_rate"),
 
	SettingEntry("economy.larger_towns"),
 
	SettingEntry("economy.initial_city_size"),
 
};
 
/** Towns sub-page */
 
static SettingsPage _settings_economy_towns_page = {_settings_economy_towns, lengthof(_settings_economy_towns)};
 

	
 
static SettingEntry _settings_economy_industries[] = {
 
	SettingEntry("construction.raw_industry_construction"),
 
	SettingEntry("construction.industry_platform"),
 
	SettingEntry("economy.multiple_industry_per_town"),
 
	SettingEntry("game_creation.oil_refinery_limit"),
 
};
 
/** Industries sub-page */
 
static SettingsPage _settings_economy_industries_page = {_settings_economy_industries, lengthof(_settings_economy_industries)};
 

	
 
static SettingEntry _settings_economy[] = {
 
	SettingEntry(&_settings_economy_towns_page, STR_CONFIG_SETTING_ECONOMY_TOWNS),
 
	SettingEntry(&_settings_economy_industries_page, STR_CONFIG_SETTING_ECONOMY_INDUSTRIES),
 
	SettingEntry("economy.inflation"),
 
	SettingEntry("economy.smooth_economy"),
 
	SettingEntry("economy.feeder_payment_share"),
 
};
 
/** Economy sub-page */
 
static SettingsPage _settings_economy_page = {_settings_economy, lengthof(_settings_economy)};
 

	
 
static SettingEntry _settings_ai_npc[] = {
 
	SettingEntry("ai.ai_in_multiplayer"),
 
	SettingEntry("ai.ai_disable_veh_train"),
 
	SettingEntry("ai.ai_disable_veh_roadveh"),
 
	SettingEntry("ai.ai_disable_veh_aircraft"),
 
	SettingEntry("ai.ai_disable_veh_ship"),
 
	SettingEntry("ai.ai_max_opcode_till_suspend"),
 
};
 
/** Computer players sub-page */
 
static SettingsPage _settings_ai_npc_page = {_settings_ai_npc, lengthof(_settings_ai_npc)};
 

	
 
static SettingEntry _settings_ai[] = {
 
	SettingEntry(&_settings_ai_npc_page, STR_CONFIG_SETTING_AI_NPC),
 
	SettingEntry("economy.give_money"),
 
	SettingEntry("economy.allow_shares"),
 
};
 
/** AI sub-page */
 
static SettingsPage _settings_ai_page = {_settings_ai, lengthof(_settings_ai)};
 

	
 
static SettingEntry _settings_vehicles_routing[] = {
 
	SettingEntry("pf.pathfinder_for_trains"),
 
	SettingEntry("pf.forbid_90_deg"),
 
	SettingEntry("pf.pathfinder_for_roadvehs"),
 
	SettingEntry("pf.roadveh_queue"),
 
	SettingEntry("pf.pathfinder_for_ships"),
 
};
 
/** Autorenew sub-page */
 
static SettingsPage _settings_vehicles_routing_page = {_settings_vehicles_routing, lengthof(_settings_vehicles_routing)};
 

	
 
static SettingEntry _settings_vehicles_autorenew[] = {
 
	SettingEntry("company.engine_renew"),
 
	SettingEntry("company.engine_renew_months"),
src/settings_type.h
Show inline comments
 
@@ -146,96 +146,97 @@ struct NetworkSettings {
 
	uint8  autoclean_unprotected;                         ///< remove passwordless companies after this many months
 
	uint8  autoclean_protected;                           ///< remove the password from passworded companies after this many months
 
	uint8  autoclean_novehicles;                          ///< remove companies with no vehicles after this many months
 
	uint8  max_companies;                                 ///< maximum amount of companies
 
	uint8  max_clients;                                   ///< maximum amount of clients
 
	uint8  max_spectators;                                ///< maximum amount of spectators
 
	Year   restart_game_year;                             ///< year the server restarts
 
	uint8  min_active_clients;                            ///< minimum amount of active clients to unpause the game
 
	uint8  server_lang;                                   ///< language of the server
 
	bool   reload_cfg;                                    ///< reload the config file before restarting
 
	char   last_host[NETWORK_HOSTNAME_LENGTH];            ///< IP address of the last joined server
 
	uint16 last_port;                                     ///< port of the last joined server
 
	bool   no_http_content_downloads;                     ///< do not do content downloads over HTTP
 
#else /* ENABLE_NETWORK */
 
#endif
 
};
 

	
 
/** Settings related to the creation of games. */
 
struct GameCreationSettings {
 
	uint32 generation_seed;                  ///< noise seed for world generation
 
	Year   starting_year;                    ///< starting date
 
	uint8  map_x;                            ///< X size of map
 
	uint8  map_y;                            ///< Y size of map
 
	byte   land_generator;                   ///< the landscape generator
 
	byte   oil_refinery_limit;               ///< distance oil refineries allowed from map edge
 
	byte   snow_line_height;                 ///< a number 0-15 that configured snow line height
 
	byte   tgen_smoothness;                  ///< how rough is the terrain from 0-3
 
	byte   tree_placer;                      ///< the tree placer algorithm
 
	byte   heightmap_rotation;               ///< rotation director for the heightmap
 
	byte   se_flat_world_height;             ///< land height a flat world gets in SE
 
	byte   town_name;                        ///< the town name generator used for town names
 
	byte   landscape;                        ///< the landscape we're currently in
 
	byte   snow_line;                        ///< the snowline level in this game
 
	byte   water_borders;                    ///< bitset of the borders that are water
 
	uint16 custom_town_number;               ///< manually entered number of towns
 
	byte   variety;                          ///< variety level applied to TGP
 
};
 

	
 
/** Settings related to construction in-game */
 
struct ConstructionSettings {
 
	bool   build_on_slopes;                  ///< allow building on slopes
 
	bool   autoslope;                        ///< allow terraforming under things
 
	bool   longbridges;                      ///< allow 100 tile long bridges
 
	bool   signal_side;                      ///< show signals on right side
 
	bool   extra_dynamite;                   ///< extra dynamite
 
	bool   road_stop_on_town_road;           ///< allow building of drive-through road stops on town owned roads
 
	bool   road_stop_on_competitor_road;     ///< allow building of drive-through road stops on roads owned by competitors
 
	uint8  raw_industry_construction;        ///< type of (raw) industry construction (none, "normal", prospecting)
 
	uint8  industry_platform;                ///< the amount of flat land around an industry
 
	bool   freeform_edges;                   ///< allow terraforming the tiles at the map edges
 
	uint8  extra_tree_placement;             ///< (dis)allow building extra trees in-game
 
};
 

	
 
/** Settings related to the AI. */
 
struct AISettings {
 
	bool   ai_in_multiplayer;                ///< so we allow AIs in multiplayer
 
	bool   ai_disable_veh_train;             ///< disable types for AI
 
	bool   ai_disable_veh_roadveh;           ///< disable types for AI
 
	bool   ai_disable_veh_aircraft;          ///< disable types for AI
 
	bool   ai_disable_veh_ship;              ///< disable types for AI
 
	uint32 ai_max_opcode_till_suspend;       ///< max opcode calls till AI will suspend
 
};
 

	
 
/** Settings related to the old pathfinder. */
 
struct OPFSettings {
 
	uint16 pf_maxlength;                     ///< maximum length when searching for a train route for new pathfinder
 
	byte   pf_maxdepth;                      ///< maximum recursion depth when searching for a train route for new pathfinder
 
};
 

	
 
/** Settings related to the new pathfinder. */
 
struct NPFSettings {
 
	/**
 
	 * The maximum amount of search nodes a single NPF run should take. This
 
	 * limit should make sure performance stays at acceptable levels at the cost
 
	 * of not being perfect anymore.
 
	 */
 
	uint32 npf_max_search_nodes;
 
	uint32 maximum_go_to_depot_penalty;      ///< What is the maximum penalty that may be endured for going to a depot
 

	
 
	uint32 npf_rail_firstred_penalty;        ///< the penalty for when the first signal is red (and it is not an exit or combo signal)
 
	uint32 npf_rail_firstred_exit_penalty;   ///< the penalty for when the first signal is red (and it is an exit or combo signal)
 
	uint32 npf_rail_lastred_penalty;         ///< the penalty for when the last signal is red
 
	uint32 npf_rail_station_penalty;         ///< the penalty for station tiles
 
	uint32 npf_rail_slope_penalty;           ///< the penalty for sloping upwards
 
	uint32 npf_rail_curve_penalty;           ///< the penalty for curves
 
	uint32 npf_rail_depot_reverse_penalty;   ///< the penalty for reversing in depots
 
	uint32 npf_rail_pbs_cross_penalty;       ///< the penalty for crossing a reserved rail track
 
	uint32 npf_rail_pbs_signal_back_penalty; ///< the penalty for passing a pbs signal from the backside
 
	uint32 npf_buoy_penalty;                 ///< the penalty for going over (through) a buoy
 
	uint32 npf_water_curve_penalty;          ///< the penalty for curves
 
	uint32 npf_road_curve_penalty;           ///< the penalty for curves
 
	uint32 npf_crossing_penalty;             ///< the penalty for level crossings
 
	uint32 npf_road_drive_through_penalty;   ///< the penalty for going through a drive-through road stop
 
	uint32 npf_road_dt_occupied_penalty;     ///< the penalty multiplied by the fill percentage of a drive-through road stop
 
	uint32 npf_road_bay_occupied_penalty;    ///< the penalty multiplied by the fill percentage of a road bay
 
};
 

	
src/table/settings.h
Show inline comments
 
@@ -387,96 +387,97 @@ const SettingDesc _settings[] = {
 
	    SDT_BOOL(GameSettings, pf.roadveh_queue,                                                    0, 0,  true,                    STR_CONFIG_SETTING_ROAD_VEHICLE_QUEUEING,  NULL),
 

	
 
	SDT_CONDBOOL(GameSettings, pf.new_pathfinding_all,                           0,             86, 0, 0, false,                    STR_NULL,                                  NULL),
 
	SDT_CONDBOOL(GameSettings, pf.yapf.ship_use_yapf,                           28,             86, 0, 0, false,                    STR_NULL,                                  NULL),
 
	SDT_CONDBOOL(GameSettings, pf.yapf.road_use_yapf,                           28,             86, 0, 0,  true,                    STR_NULL,                                  NULL),
 
	SDT_CONDBOOL(GameSettings, pf.yapf.rail_use_yapf,                           28,             86, 0, 0,  true,                    STR_NULL,                                  NULL),
 

	
 
	 SDT_CONDVAR(GameSettings, pf.pathfinder_for_trains,             SLE_UINT8, 87, SL_MAX_VERSION, 0, MS,    2,     1,       2, 1, STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS,  NULL),
 
	 SDT_CONDVAR(GameSettings, pf.pathfinder_for_roadvehs,           SLE_UINT8, 87, SL_MAX_VERSION, 0, MS,    2,     1,       2, 1, STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES, NULL),
 
	 SDT_CONDVAR(GameSettings, pf.pathfinder_for_ships,              SLE_UINT8, 87, SL_MAX_VERSION, 0, MS,    0,     0,       2, 1, STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS,   NULL),
 

	
 
	    SDT_BOOL(GameSettings, vehicle.never_expire_vehicles,                                       0,NN, false,                    STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES,  NULL),
 
	     SDT_VAR(GameSettings, vehicle.max_trains,                  SLE_UINT16,                     0, 0,   500,     0,    5000, 0, STR_CONFIG_SETTING_MAX_TRAINS,             RedrawScreen),
 
	     SDT_VAR(GameSettings, vehicle.max_roadveh,                 SLE_UINT16,                     0, 0,   500,     0,    5000, 0, STR_CONFIG_SETTING_MAX_ROAD_VEHICLES,      RedrawScreen),
 
	     SDT_VAR(GameSettings, vehicle.max_aircraft,                SLE_UINT16,                     0, 0,   200,     0,    5000, 0, STR_CONFIG_SETTING_MAX_AIRCRAFT,           RedrawScreen),
 
	     SDT_VAR(GameSettings, vehicle.max_ships,                   SLE_UINT16,                     0, 0,   300,     0,    5000, 0, STR_CONFIG_SETTING_MAX_SHIPS,              RedrawScreen),
 
	SDTG_CONDBOOL(NULL,             0, NN, _old_vds.servint_ispercent, false,            STR_NULL, NULL, 0, 119),
 
	SDTG_CONDVAR(NULL,  SLE_UINT16, 0, D0, _old_vds.servint_trains,      150, 5, 800, 0, STR_NULL, NULL, 0, 119),
 
	SDTG_CONDVAR(NULL,  SLE_UINT16, 0, D0, _old_vds.servint_roadveh,     150, 5, 800, 0, STR_NULL, NULL, 0, 119),
 
	SDTG_CONDVAR(NULL,  SLE_UINT16, 0, D0, _old_vds.servint_ships,       360, 5, 800, 0, STR_NULL, NULL, 0, 119),
 
	SDTG_CONDVAR(NULL,  SLE_UINT16, 0, D0, _old_vds.servint_aircraft,    150, 5, 800, 0, STR_NULL, NULL, 0, 119),
 
	    SDT_BOOL(GameSettings, order.no_servicing_if_no_breakdowns,                                 0, 0,  true,                    STR_CONFIG_SETTING_NOSERVICE,              NULL),
 
	    SDT_BOOL(GameSettings, vehicle.wagon_speed_limits,                                          0,NN,  true,                    STR_CONFIG_SETTING_WAGONSPEEDLIMITS,       UpdateConsists),
 
	SDT_CONDBOOL(GameSettings, vehicle.disable_elrails,                         38, SL_MAX_VERSION, 0,NN, false,                    STR_CONFIG_SETTING_DISABLE_ELRAILS,        SettingsDisableElrail),
 
	 SDT_CONDVAR(GameSettings, vehicle.freight_trains,               SLE_UINT8, 39, SL_MAX_VERSION, 0,NN,     1,     1,     255, 1, STR_CONFIG_SETTING_FREIGHT_TRAINS,         NULL),
 
	SDT_CONDBOOL(GameSettings, order.timetabling,                               67, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_TIMETABLE_ALLOW,        NULL),
 
	 SDT_CONDVAR(GameSettings, vehicle.plane_speed,                  SLE_UINT8, 90, SL_MAX_VERSION, 0,NN,     4,     1,       4, 0, STR_CONFIG_SETTING_PLANE_SPEED,            NULL),
 
	SDT_CONDBOOL(GameSettings, vehicle.dynamic_engines,                         95, SL_MAX_VERSION, 0,NN,  true,                    STR_CONFIG_SETTING_DYNAMIC_ENGINES,        ChangeDynamicEngines),
 
	 SDT_CONDVAR(GameSettings, vehicle.plane_crashes,                SLE_UINT8,138, SL_MAX_VERSION, 0,MS,     2,     0,       2, 1, STR_CONFIG_SETTING_PLANE_CRASHES,          NULL),
 

	
 
	    SDT_BOOL(GameSettings, station.join_stations,                                               0, 0,  true,                    STR_CONFIG_SETTING_JOINSTATIONS,           NULL),
 
	SDTC_CONDBOOL(             gui.sg_full_load_any,                            22,             92, 0, 0,  true,                    STR_NULL,                                  NULL),
 
	    SDT_BOOL(GameSettings, order.improved_load,                                                 0,NN,  true,                    STR_CONFIG_SETTING_IMPROVEDLOAD,           NULL),
 
	    SDT_BOOL(GameSettings, order.selectgoods,                                                   0, 0,  true,                    STR_CONFIG_SETTING_SELECTGOODS,            NULL),
 
	SDTC_CONDBOOL(             gui.sg_new_nonstop,                              22,             92, 0, 0, false,                    STR_NULL,                                  NULL),
 
	    SDT_BOOL(GameSettings, station.nonuniform_stations,                                         0,NN,  true,                    STR_CONFIG_SETTING_NONUNIFORM_STATIONS,    NULL),
 
	     SDT_VAR(GameSettings, station.station_spread,               SLE_UINT8,                     0, 0,    12,     4,      64, 0, STR_CONFIG_SETTING_STATION_SPREAD,         InvalidateStationBuildWindow),
 
	    SDT_BOOL(GameSettings, order.serviceathelipad,                                              0, 0,  true,                    STR_CONFIG_SETTING_SERVICEATHELIPAD,       NULL),
 
	    SDT_BOOL(GameSettings, station.modified_catchment,                                          0, 0,  true,                    STR_CONFIG_SETTING_CATCHMENT,              StationCatchmentChanged),
 
	SDT_CONDBOOL(GameSettings, order.gradual_loading,                           40, SL_MAX_VERSION, 0,NN,  true,                    STR_CONFIG_SETTING_GRADUAL_LOADING,        NULL),
 
	SDT_CONDBOOL(GameSettings, construction.road_stop_on_town_road,             47, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD,      NULL),
 
	SDT_CONDBOOL(GameSettings, construction.road_stop_on_competitor_road,      114, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD,NULL),
 
	SDT_CONDBOOL(GameSettings, station.adjacent_stations,                       62, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_ADJACENT_STATIONS,      NULL),
 
	SDT_CONDBOOL(GameSettings, economy.station_noise_level,                     96, SL_MAX_VERSION, 0,NN, false,                    STR_CONFIG_SETTING_NOISE_LEVEL,            InvalidateTownViewWindow),
 
	SDT_CONDBOOL(GameSettings, station.distant_join_stations,                  106, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS,  DeleteSelectStationWindow),
 

	
 
	    SDT_BOOL(GameSettings, economy.inflation,                                                   0, 0,  true,                    STR_CONFIG_SETTING_INFLATION,              NULL),
 
	     SDT_VAR(GameSettings, construction.raw_industry_construction, SLE_UINT8,                   0,MS,     0,     0,       2, 0, STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD, InvalidateBuildIndustryWindow),
 
	 SDT_CONDVAR(GameSettings, construction.industry_platform,       SLE_UINT8,148, SL_MAX_VERSION, 0, 0,     1,     0,       4, 0, STR_CONFIG_SETTING_INDUSTRY_PLATFORM,      NULL),
 
	    SDT_BOOL(GameSettings, economy.multiple_industry_per_town,                                  0, 0, false,                    STR_CONFIG_SETTING_MULTIPINDTOWN,          NULL),
 
	SDT_CONDNULL(                                                            1,  0, 140),
 
	    SDT_BOOL(GameSettings, economy.bribe,                                                       0, 0,  true,                    STR_CONFIG_SETTING_BRIBE,                  NULL),
 
	SDT_CONDBOOL(GameSettings, economy.exclusive_rights,                        79, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_ALLOW_EXCLUSIVE,        NULL),
 
	SDT_CONDBOOL(GameSettings, economy.give_money,                              79, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_ALLOW_GIVE_MONEY,       NULL),
 
	     SDT_VAR(GameSettings, game_creation.snow_line_height,       SLE_UINT8,                     0, 0, DEF_SNOWLINE_HEIGHT, MIN_SNOWLINE_HEIGHT, DEF_SNOWLINE_HEIGHT, 0, STR_CONFIG_SETTING_SNOWLINE_HEIGHT, NULL),
 
	SDT_CONDNULL(                                                            4,  0, 143),
 
	     SDT_VAR(GameSettings, game_creation.starting_year,          SLE_INT32,                     0,NC,DEF_START_YEAR,MIN_YEAR,MAX_YEAR,1,STR_CONFIG_SETTING_STARTING_YEAR,  NULL),
 
	SDT_CONDNULL(                                                            4,  0, 104),
 
	    SDT_BOOL(GameSettings, economy.smooth_economy,                                              0, 0,  true,                    STR_CONFIG_SETTING_SMOOTH_ECONOMY,         NULL),
 
	    SDT_BOOL(GameSettings, economy.allow_shares,                                                0, 0, false,                    STR_CONFIG_SETTING_ALLOW_SHARES,           NULL),
 
	 SDT_CONDVAR(GameSettings, economy.feeder_payment_share,         SLE_UINT8,134, SL_MAX_VERSION, 0, 0,    75,     0,     100, 0, STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE,   NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_growth_rate,             SLE_UINT8, 54, SL_MAX_VERSION, 0, MS,    2,     0,       4, 0, STR_CONFIG_SETTING_TOWN_GROWTH,            NULL),
 
	 SDT_CONDVAR(GameSettings, economy.larger_towns,                 SLE_UINT8, 54, SL_MAX_VERSION, 0, D0,    4,     0,     255, 1, STR_CONFIG_SETTING_LARGER_TOWNS,           NULL),
 
	 SDT_CONDVAR(GameSettings, economy.initial_city_size,            SLE_UINT8, 56, SL_MAX_VERSION, 0, 0,     2,     1,      10, 1, STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER,   NULL),
 
	SDT_CONDBOOL(GameSettings, economy.mod_road_rebuild,                        77, SL_MAX_VERSION, 0, 0,  true,                    STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD,  NULL),
 

	
 
	SDT_CONDNULL(1, 0, 106), // previously ai-new setting.
 
	    SDT_BOOL(GameSettings, ai.ai_in_multiplayer,                                                0, 0, true,                     STR_CONFIG_SETTING_AI_IN_MULTIPLAYER,      NULL),
 
	    SDT_BOOL(GameSettings, ai.ai_disable_veh_train,                                             0, 0, false,                    STR_CONFIG_SETTING_AI_BUILDS_TRAINS,       NULL),
 
	    SDT_BOOL(GameSettings, ai.ai_disable_veh_roadveh,                                           0, 0, false,                    STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES,NULL),
 
	    SDT_BOOL(GameSettings, ai.ai_disable_veh_aircraft,                                          0, 0, false,                    STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT,     NULL),
 
	    SDT_BOOL(GameSettings, ai.ai_disable_veh_ship,                                              0, 0, false,                    STR_CONFIG_SETTING_AI_BUILDS_SHIPS,        NULL),
 
	 SDT_CONDVAR(GameSettings, ai.ai_max_opcode_till_suspend,       SLE_UINT32,107, SL_MAX_VERSION, 0, NG, 10000, 5000,250000,2500, STR_CONFIG_SETTING_AI_MAX_OPCODES,         NULL),
 

	
 
	     SDT_VAR(GameSettings, vehicle.extend_vehicle_life,          SLE_UINT8,                     0, 0,     0,     0,     100, 0, STR_NULL,                                  NULL),
 
	     SDT_VAR(GameSettings, economy.dist_local_authority,         SLE_UINT8,                     0, 0,    20,     5,      60, 0, STR_NULL,                                  NULL),
 
	     SDT_VAR(GameSettings, pf.wait_oneway_signal,                SLE_UINT8,                     0, 0,    15,     2,     255, 0, STR_NULL,                                  NULL),
 
	     SDT_VAR(GameSettings, pf.wait_twoway_signal,                SLE_UINT8,                     0, 0,    41,     2,     255, 0, STR_NULL,                                  NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_noise_population[0],    SLE_UINT16, 96, SL_MAX_VERSION, 0, 0,   800,   200,   65535, 0, STR_NULL,                                  NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_noise_population[1],    SLE_UINT16, 96, SL_MAX_VERSION, 0, 0,  2000,   400,   65535, 0, STR_NULL,                                  NULL),
 
	 SDT_CONDVAR(GameSettings, economy.town_noise_population[2],    SLE_UINT16, 96, SL_MAX_VERSION, 0, 0,  4000,   800,   65535, 0, STR_NULL,                                  NULL),
 

	
 
	 SDT_CONDVAR(GameSettings, pf.wait_for_pbs_path,                 SLE_UINT8,100, SL_MAX_VERSION, 0, 0,    30,     2,     255, 0, STR_NULL,                                  NULL),
 
	SDT_CONDBOOL(GameSettings, pf.reserve_paths,                               100, SL_MAX_VERSION, 0, 0, false,                    STR_NULL,                                  NULL),
 
	 SDT_CONDVAR(GameSettings, pf.path_backoff_interval,             SLE_UINT8,100, SL_MAX_VERSION, 0, 0,    20,     1,     255, 0, STR_NULL,                                  NULL),
 

	
 
	     SDT_VAR(GameSettings, pf.opf.pf_maxlength,                          SLE_UINT16,                     0, 0,  4096,                    64,   65535, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.opf.pf_maxdepth,                            SLE_UINT8,                     0, 0,    48,                     4,     255, 0, STR_NULL,         NULL),
 

	
 
	     SDT_VAR(GameSettings, pf.npf.npf_max_search_nodes,                    SLE_UINT,                     0, 0, 10000,                   500,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_firstred_penalty,               SLE_UINT,                     0, 0, ( 10 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_firstred_exit_penalty,          SLE_UINT,                     0, 0, (100 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_lastred_penalty,                SLE_UINT,                     0, 0, ( 10 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_station_penalty,                SLE_UINT,                     0, 0, (  1 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_slope_penalty,                  SLE_UINT,                     0, 0, (  1 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_curve_penalty,                  SLE_UINT,                     0, 0, (  1 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
 
	     SDT_VAR(GameSettings, pf.npf.npf_rail_depot_reverse_penalty,          SLE_UINT,                     0, 0, ( 50 * NPF_TILE_LENGTH),   0,  100000, 0, STR_NULL,         NULL),
0 comments (0 inline, 0 general)