9723
|
1 |
/* $Id$ */
|
|
2 |
|
|
3 |
/** @file settings_type.h Types related to global configuration settings. */
|
|
4 |
|
|
5 |
#ifndef SETTINGS_TYPE_H
|
|
6 |
#define SETTINGS_TYPE_H
|
|
7 |
|
|
8 |
#include "yapf/yapf_settings.h"
|
|
9 |
#include "date_type.h"
|
|
10 |
#include "town_type.h"
|
|
11 |
|
|
12 |
struct GameOptions {
|
|
13 |
GameDifficulty diff;
|
|
14 |
byte diff_level;
|
|
15 |
byte currency;
|
|
16 |
byte units;
|
|
17 |
byte town_name;
|
|
18 |
byte landscape;
|
|
19 |
byte snow_line;
|
|
20 |
byte autosave;
|
|
21 |
byte road_side;
|
|
22 |
};
|
|
23 |
|
|
24 |
/* These are the options for the current game
|
|
25 |
* either ingame, or loaded. Also used for networking games */
|
|
26 |
extern GameOptions _opt;
|
|
27 |
|
|
28 |
/* These are the default options for a new game */
|
|
29 |
extern GameOptions _opt_newgame;
|
|
30 |
|
|
31 |
/* Pointer to one of the two _opt OR _opt_newgame structs */
|
|
32 |
extern GameOptions *_opt_ptr;
|
|
33 |
|
|
34 |
struct Patches {
|
|
35 |
bool modified_catchment; // different-size catchment areas
|
|
36 |
bool vehicle_speed; // show vehicle speed
|
|
37 |
bool build_on_slopes; // allow building on slopes
|
|
38 |
bool mammoth_trains; // allow very long trains
|
|
39 |
bool join_stations; // allow joining of train stations
|
|
40 |
bool full_load_any; // new full load calculation, any cargo must be full
|
|
41 |
bool improved_load; // improved loading algorithm
|
|
42 |
bool gradual_loading; // load vehicles gradually
|
|
43 |
byte station_spread; // amount a station may spread
|
|
44 |
bool inflation; // disable inflation
|
|
45 |
bool selectgoods; // only send the goods to station if a train has been there
|
|
46 |
bool longbridges; // allow 100 tile long bridges
|
|
47 |
bool gotodepot; // allow goto depot in orders
|
|
48 |
uint8 raw_industry_construction; ///< Type of (raw) industry construction (none, "normal", prospecting)
|
|
49 |
bool multiple_industry_per_town; // allow many industries of the same type per town
|
|
50 |
bool same_industry_close; // allow same type industries to be built close to each other
|
|
51 |
bool lost_train_warn; // if a train can't find its destination, show a warning
|
|
52 |
uint8 order_review_system;
|
|
53 |
bool train_income_warn; // if train is generating little income, show a warning
|
|
54 |
bool status_long_date; // always show long date in status bar
|
|
55 |
bool signal_side; // show signals on right side
|
|
56 |
bool show_finances; // show finances at end of year
|
|
57 |
bool new_nonstop; // ttdpatch compatible nonstop handling
|
|
58 |
bool roadveh_queue; // buggy road vehicle queueing
|
|
59 |
bool autoscroll; // scroll when moving mouse to the edge.
|
|
60 |
byte errmsg_duration; // duration of error message
|
|
61 |
byte land_generator; // the landscape generator
|
|
62 |
byte oil_refinery_limit; // distance oil refineries allowed from map edge
|
|
63 |
byte snow_line_height; // a number 0-15 that configured snow line height
|
|
64 |
byte tgen_smoothness; // how rough is the terrain from 0-3
|
|
65 |
uint32 generation_seed; // noise seed for world generation
|
|
66 |
byte tree_placer; // the tree placer algorithm
|
|
67 |
byte heightmap_rotation; // rotation director for the heightmap
|
|
68 |
byte se_flat_world_height; // land height a flat world gets in SE
|
|
69 |
bool bribe; // enable bribing the local authority
|
|
70 |
bool nonuniform_stations; // allow nonuniform train stations
|
|
71 |
bool adjacent_stations; // allow stations to be built directly adjacent to other stations
|
|
72 |
bool always_small_airport; // always allow small airports
|
|
73 |
bool realistic_acceleration; // realistic acceleration for trains
|
|
74 |
bool wagon_speed_limits; // enable wagon speed limits
|
|
75 |
bool forbid_90_deg; // forbid trains to make 90 deg turns
|
|
76 |
bool invisible_trees; // don't show trees when buildings are transparent
|
|
77 |
bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled
|
|
78 |
bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars
|
|
79 |
bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction
|
|
80 |
bool smooth_scroll; ///< Smooth scroll viewports
|
|
81 |
bool disable_elrails; // when true, the elrails are disabled
|
|
82 |
bool measure_tooltip; // Show a permanent tooltip when dragging tools
|
|
83 |
byte liveries; // Options for displaying company liveries, 0=none, 1=self, 2=all
|
|
84 |
bool prefer_teamchat; // Choose the chat message target with <ENTER>, true=all players, false=your team
|
|
85 |
uint8 advanced_vehicle_list; // Use the "advanced" vehicle list
|
|
86 |
uint8 loading_indicators; // Show loading indicators
|
|
87 |
uint8 default_rail_type; ///< The default rail type for the rail GUI
|
|
88 |
|
|
89 |
uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right
|
|
90 |
uint8 window_snap_radius; // Windows snap at each other if closer than this
|
|
91 |
|
|
92 |
bool always_build_infrastructure; ///< Always allow building of infrastructure, even when you do not have the vehicles for it
|
|
93 |
UnitID max_trains; // max trains in game per player (these are 16bit because the unitnumber field can't hold more)
|
|
94 |
UnitID max_roadveh; // max trucks in game per player
|
|
95 |
UnitID max_aircraft; // max planes in game per player
|
|
96 |
UnitID max_ships; // max ships in game per player
|
|
97 |
|
|
98 |
bool servint_ispercent; // service intervals are in percents
|
|
99 |
uint16 servint_trains; // service interval for trains
|
|
100 |
uint16 servint_roadveh; // service interval for road vehicles
|
|
101 |
uint16 servint_aircraft; // service interval for aircraft
|
|
102 |
uint16 servint_ships; // service interval for ships
|
|
103 |
|
|
104 |
bool autorenew;
|
|
105 |
int16 autorenew_months;
|
|
106 |
int32 autorenew_money;
|
|
107 |
|
|
108 |
byte pf_maxdepth; // maximum recursion depth when searching for a train route for new pathfinder
|
|
109 |
uint16 pf_maxlength; // maximum length when searching for a train route for new pathfinder
|
|
110 |
|
|
111 |
bool bridge_pillars; // show bridge pillars for high bridges
|
|
112 |
|
|
113 |
bool ai_disable_veh_train; // disable types for AI
|
|
114 |
bool ai_disable_veh_roadveh; // disable types for AI
|
|
115 |
bool ai_disable_veh_aircraft; // disable types for AI
|
|
116 |
bool ai_disable_veh_ship; // disable types for AI
|
|
117 |
Year starting_year; // starting date
|
|
118 |
Year ending_year; // end of the game (just show highscore)
|
|
119 |
Year colored_news_year; // when does newspaper become colored?
|
|
120 |
|
|
121 |
bool keep_all_autosave; // name the autosave in a different way.
|
|
122 |
bool autosave_on_exit; // save an autosave when you quit the game, but do not ask "Do you really want to quit?"
|
|
123 |
byte max_num_autosaves; // controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1)
|
|
124 |
bool extra_dynamite; // extra dynamite
|
|
125 |
bool road_stop_on_town_road; // allow building of drive-through road stops on town owned roads
|
|
126 |
|
|
127 |
bool never_expire_vehicles; // never expire vehicles
|
|
128 |
byte extend_vehicle_life; // extend vehicle life by this many years
|
|
129 |
|
|
130 |
bool auto_euro; // automatically switch to euro in 2002
|
|
131 |
bool serviceathelipad; // service helicopters at helipads automatically (no need to send to depot)
|
|
132 |
bool smooth_economy; // smooth economy
|
|
133 |
bool allow_shares; // allow the buying/selling of shares
|
|
134 |
byte dist_local_authority; // distance for town local authority, default 20
|
|
135 |
|
|
136 |
byte wait_oneway_signal; // waitingtime in days before a oneway signal
|
|
137 |
byte wait_twoway_signal; // waitingtime in days before a twoway signal
|
|
138 |
|
|
139 |
uint8 map_x; // Size of map
|
|
140 |
uint8 map_y;
|
|
141 |
|
|
142 |
byte drag_signals_density; // many signals density
|
|
143 |
Year semaphore_build_before; // Build semaphore signals automatically before this year
|
|
144 |
bool ai_in_multiplayer; // Do we allow AIs in multiplayer
|
|
145 |
|
|
146 |
/*
|
|
147 |
* New Path Finding
|
|
148 |
*/
|
|
149 |
bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */
|
|
150 |
|
|
151 |
/**
|
|
152 |
* The maximum amount of search nodes a single NPF run should take. This
|
|
153 |
* limit should make sure performance stays at acceptable levels at the cost
|
|
154 |
* of not being perfect anymore. This will probably be fixed in a more
|
|
155 |
* sophisticated way sometime soon
|
|
156 |
*/
|
|
157 |
uint32 npf_max_search_nodes;
|
|
158 |
|
|
159 |
uint32 npf_rail_firstred_penalty; // The penalty for when the first signal is red (and it is not an exit or combo signal)
|
|
160 |
uint32 npf_rail_firstred_exit_penalty; // The penalty for when the first signal is red (and it is an exit or combo signal)
|
|
161 |
uint32 npf_rail_lastred_penalty; // The penalty for when the last signal is red
|
|
162 |
uint32 npf_rail_station_penalty; // The penalty for station tiles
|
|
163 |
uint32 npf_rail_slope_penalty; // The penalty for sloping upwards
|
|
164 |
uint32 npf_rail_curve_penalty; // The penalty for curves
|
|
165 |
uint32 npf_rail_depot_reverse_penalty; // The penalty for reversing in depots
|
|
166 |
uint32 npf_buoy_penalty; // The penalty for going over (through) a buoy
|
|
167 |
uint32 npf_water_curve_penalty; // The penalty for curves
|
|
168 |
uint32 npf_road_curve_penalty; // The penalty for curves
|
|
169 |
uint32 npf_crossing_penalty; // The penalty for level crossings
|
|
170 |
uint32 npf_road_drive_through_penalty; // The penalty for going through a drive-through road stop
|
|
171 |
|
|
172 |
bool population_in_label; // Show the population of a town in his label?
|
|
173 |
|
|
174 |
uint8 freight_trains; // Value to multiply the weight of cargo by
|
|
175 |
|
|
176 |
/** YAPF settings */
|
|
177 |
YapfSettings yapf;
|
|
178 |
|
|
179 |
uint8 right_mouse_btn_emulation;
|
|
180 |
|
|
181 |
uint8 scrollwheel_scrolling;
|
|
182 |
uint8 scrollwheel_multiplier;
|
|
183 |
|
|
184 |
uint8 town_growth_rate; ///< Town growth rate
|
|
185 |
uint8 larger_towns; ///< The number of cities to build. These start off larger and grow twice as fast
|
|
186 |
uint8 initial_city_size; ///< Multiplier for the initial size of the cities compared to towns
|
|
187 |
|
|
188 |
bool pause_on_newgame; ///< Whether to start new games paused or not.
|
|
189 |
|
|
190 |
TownLayoutByte town_layout; ///< Select town layout
|
|
191 |
|
|
192 |
bool timetabling; ///< Whether to allow timetabling.
|
|
193 |
bool timetable_in_ticks; ///< Whether to show the timetable in ticks rather than days.
|
|
194 |
|
|
195 |
bool autoslope; ///< Allow terraforming under things.
|
|
196 |
|
|
197 |
bool mod_road_rebuild; ///< Roadworks remove unneccesary RoadBits
|
|
198 |
|
|
199 |
bool exclusive_rights; ///< allow buying exclusive rights
|
|
200 |
bool give_money; ///< allow giving other players money
|
|
201 |
|
|
202 |
bool enable_signal_gui; ///< Show the signal GUI when the signal button is pressed
|
|
203 |
};
|
|
204 |
|
|
205 |
extern Patches _patches;
|
|
206 |
|
|
207 |
/** The patch values that are used for new games and/or modified in config file */
|
|
208 |
extern Patches _patches_newgame;
|
|
209 |
|
|
210 |
#endif /* SETTINGS_TYPE_H */
|