src/settings_type.h
author frosch
Sat, 14 Jun 2008 19:13:23 +0000
changeset 10964 7fb05c02258a
parent 10835 976b9d25c2be
permissions -rw-r--r--
(svn r13518) -Fix [FS#2083]: Properly count number of non-north housetiles.
2186
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2154
diff changeset
     1
/* $Id$ */
461a2aff3486 (svn r2701) Insert Id tags into all source files
tron
parents: 2154
diff changeset
     2
8704
2857ec554839 (svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents: 8647
diff changeset
     3
/** @file settings_type.h Types related to global configuration settings. */
6919
339210ecccd3 (svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents: 6670
diff changeset
     4
8704
2857ec554839 (svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents: 8647
diff changeset
     5
#ifndef SETTINGS_TYPE_H
2857ec554839 (svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents: 8647
diff changeset
     6
#define SETTINGS_TYPE_H
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
     7
8636
2b158acb649c (svn r11702) -Codechange: move all date related stuff to date*.
rubidium
parents: 8634
diff changeset
     8
#include "date_type.h"
8709
4187ad809fe7 (svn r11776) -Codechange: more header splittings to reduce the dependencies.
rubidium
parents: 8704
diff changeset
     9
#include "town_type.h"
10444
3876060cdef7 (svn r12986) -Codechange: move the landscape and transport related types from openttd.h to their own headers.
rubidium
parents: 10382
diff changeset
    10
#include "transport_type.h"
10784
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
    11
#include "network/core/config.h"
3900
4984308f9125 (svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents: 3890
diff changeset
    12
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
    13
/** Settings related to the difficulty of the game */
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
    14
struct DifficultySettings {
10708
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    15
	byte   max_no_competitors;               ///< the number of competitors (AIs)
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    16
	byte   competitor_start_time;            ///< how long to wait for the first competitors (AIs)
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    17
	byte   number_towns;                     ///< the amount of towns
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    18
	byte   number_industries;                ///< the amount of industries
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    19
	uint32 max_loan;                         ///< the maximum initial loan
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    20
	byte   initial_interest;                 ///< amount of interest (to pay over the loan)
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    21
	byte   vehicle_costs;                    ///< amount of money spent on vehicle running cost
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    22
	byte   competitor_speed;                 ///< the speed at which the AI builds
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    23
	byte   competitor_intelligence;          ///< the competior's (AI) intelligence
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    24
	byte   vehicle_breakdowns;               ///< likelihood of vehicles breaking down
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    25
	byte   subsidy_multiplier;               ///< amount of subsidy
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    26
	byte   construction_cost;                ///< how expensive is building
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    27
	byte   terrain_type;                     ///< the mountainousness of the landscape
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    28
	byte   quantity_sea_lakes;               ///< the amount of seas/lakes
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    29
	byte   economy;                          ///< how volatile is the economy
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    30
	byte   line_reverse_mode;                ///< reversing at stations or not
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    31
	byte   disasters;                        ///< are disasters enabled
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    32
	byte   town_council_tolerance;           ///< minimum required town ratings to be allowed to demolish stuff
5f1e9cffcfa5 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
rubidium
parents: 10707
diff changeset
    33
	byte   diff_level;                       ///< the difficulty level
8764
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8709
diff changeset
    34
};
65746a5248ec (svn r11832) -Codechange: get rid of (quite) some VARDEFs.
rubidium
parents: 8709
diff changeset
    35
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    36
/** Settings related to the GUI and other stuff that is not saved in the savegame. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    37
struct GUISettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    38
	bool   vehicle_speed;                    ///< show vehicle speed
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    39
	bool   sg_full_load_any;                 ///< new full load calculation, any cargo must be full read from pre v93 savegames
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    40
	bool   lost_train_warn;                  ///< if a train can't find its destination, show a warning
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    41
	uint8  order_review_system;              ///< perform order reviews on vehicles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    42
	bool   train_income_warn;                ///< if train is generating little income, show a warning
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    43
	bool   status_long_date;                 ///< always show long date in status bar
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    44
	bool   show_finances;                    ///< show finances at end of year
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    45
	bool   sg_new_nonstop;                   ///< ttdpatch compatible nonstop handling read from pre v93 savegames
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    46
	bool   new_nonstop;                      ///< ttdpatch compatible nonstop handling
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    47
	bool   autoscroll;                       ///< scroll when moving mouse to the edge
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    48
	byte   errmsg_duration;                  ///< duration of error message
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    49
	bool   link_terraform_toolbar;           ///< display terraform toolbar when displaying rail, road, water and airport toolbars
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    50
	bool   reverse_scroll;                   ///< right-Click-Scrolling scrolls in the opposite direction
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    51
	bool   smooth_scroll;                    ///< smooth scroll viewports
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    52
	bool   measure_tooltip;                  ///< show a permanent tooltip when dragging tools
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    53
	byte   liveries;                         ///< options for displaying company liveries, 0=none, 1=self, 2=all
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    54
	bool   prefer_teamchat;                  ///< choose the chat message target with <ENTER>, true=all players, false=your team
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    55
	uint8  advanced_vehicle_list;            ///< use the "advanced" vehicle list
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    56
	uint8  loading_indicators;               ///< show loading indicators
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    57
	uint8  default_rail_type;                ///< the default rail type for the rail GUI
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    58
	uint8  toolbar_pos;                      ///< position of toolbars, 0=left, 1=center, 2=right
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    59
	uint8  window_snap_radius;               ///< windows snap at each other if closer than this
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    60
	bool   always_build_infrastructure;      ///< always allow building of infrastructure, even when you do not have the vehicles for it
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
    61
	byte   autosave;                         ///< how often should we do autosaves?
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    62
	bool   keep_all_autosave;                ///< name the autosave in a different way
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    63
	bool   autosave_on_exit;                 ///< save an autosave when you quit the game, but do not ask "Do you really want to quit?"
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    64
	byte   max_num_autosaves;                ///< controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    65
	bool   population_in_label;              ///< show the population of a town in his label?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    66
	uint8  right_mouse_btn_emulation;        ///< should we emulate right mouse clicking?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    67
	uint8  scrollwheel_scrolling;            ///< scrolling using the scroll wheel?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    68
	uint8  scrollwheel_multiplier;           ///< how much 'wheel' per incoming event from the OS?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    69
	bool   pause_on_newgame;                 ///< whether to start new games paused or not
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    70
	bool   enable_signal_gui;                ///< show the signal GUI when the signal button is pressed
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    71
	Year   ending_year;                      ///< end of the game (just show highscore)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    72
	Year   colored_news_year;                ///< when does newspaper become colored?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    73
	bool   timetable_in_ticks;               ///< whether to show the timetable in ticks rather than days
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    74
	bool   bridge_pillars;                   ///< show bridge pillars for high bridges
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    75
	bool   auto_euro;                        ///< automatically switch to euro in 2002
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    76
	byte   drag_signals_density;             ///< many signals density
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    77
	Year   semaphore_build_before;           ///< build semaphore signals automatically before this year
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    78
	bool   autorenew;                        ///< should autorenew be enabled for new companies?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    79
	int16  autorenew_months;                 ///< how many months from EOL of vehicles should autorenew trigger for new companies?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    80
	int32  autorenew_money;                  ///< how much money before autorenewing for new companies?
10835
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
    81
	byte   news_message_timeout;             ///< how much longer than the news message "age" should we keep the message in the history
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
    82
};
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
    83
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
    84
/** Settings related to currency/unit systems. */
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
    85
struct LocaleSettings {
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
    86
	byte   currency;                         ///< currency we currently use
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
    87
	byte   units;                            ///< unit system we show everything
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
    88
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
    89
10784
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
    90
/** All settings related to the network. */
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
    91
struct NetworkSettings {
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
    92
#ifdef ENABLE_NETWORK
10787
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    93
	uint16 sync_freq;                                     ///< how often do we check whether we are still in-sync
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    94
	uint8  frame_freq;                                    ///< how often do we send commands to the clients
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    95
	uint16 max_join_time;                                 ///< maximum amount of time, in game ticks, a client may take to join
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    96
	bool   pause_on_join;                                 ///< pause the game when people join
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    97
	char   server_bind_ip[NETWORK_HOSTNAME_LENGTH];       ///< IP address the server binds to
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    98
	uint16 server_port;                                   ///< port the server listens on
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
    99
	char   server_name[NETWORK_NAME_LENGTH];              ///< name of the server
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   100
	char   server_password[NETWORK_PASSWORD_LENGTH];      ///< passowrd for joining this server
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   101
	char   rcon_password[NETWORK_PASSWORD_LENGTH];        ///< passowrd for rconsole (server side)
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   102
	bool   server_advertise;                              ///< advertise the server to the masterserver
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   103
	uint8  lan_internet;                                  ///< search on the LAN or internet for servers
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   104
	char   player_name[NETWORK_NAME_LENGTH];              ///< name of the player
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   105
	char   default_company_pass[NETWORK_PASSWORD_LENGTH]; ///< default password for new companies in encrypted form
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   106
	char   connect_to_ip[NETWORK_HOSTNAME_LENGTH];        ///< default for the "Add server" query
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   107
	char   network_id[NETWORK_UNIQUE_ID_LENGTH];          ///< semi-unique ID of the client
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   108
	bool   autoclean_companies;                           ///< automatically remove companies that are not in use
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   109
	uint8  autoclean_unprotected;                         ///< remove passwordless companies after this many months
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   110
	uint8  autoclean_protected;                           ///< remove the password from passworded companies after this many months
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   111
	uint8  max_companies;                                 ///< maximum amount of companies
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   112
	uint8  max_clients;                                   ///< maximum amount of clients
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   113
	uint8  max_spectators;                                ///< maximum amount of spectators
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   114
	Year   restart_game_year;                             ///< year the server restarts
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   115
	uint8  min_players;                                   ///< minimum amount of players to unpause the game
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   116
	uint8  server_lang;                                   ///< language of the server
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   117
	bool   reload_cfg;                                    ///< reload the config file before restarting
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   118
	char   last_host[NETWORK_HOSTNAME_LENGTH];            ///< IP address of the last joined server
b27774766fc8 (svn r13337) -Doc: add documentation to some variables in settings_type.h.
rubidium
parents: 10784
diff changeset
   119
	uint16 last_port;                                     ///< port of the last joined server
10784
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
   120
#else /* ENABLE_NETWORK */
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
   121
#endif
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
   122
};
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
   123
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   124
/** Settings related to the creation of games. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   125
struct GameCreationSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   126
	uint32 generation_seed;                  ///< noise seed for world generation
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   127
	Year   starting_year;                    ///< starting date
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   128
	uint8  map_x;                            ///< X size of map
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   129
	uint8  map_y;                            ///< Y size of map
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   130
	byte   land_generator;                   ///< the landscape generator
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   131
	byte   oil_refinery_limit;               ///< distance oil refineries allowed from map edge
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   132
	byte   snow_line_height;                 ///< a number 0-15 that configured snow line height
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   133
	byte   tgen_smoothness;                  ///< how rough is the terrain from 0-3
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   134
	byte   tree_placer;                      ///< the tree placer algorithm
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   135
	byte   heightmap_rotation;               ///< rotation director for the heightmap
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   136
	byte   se_flat_world_height;             ///< land height a flat world gets in SE
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
   137
	byte   town_name;                        ///< the town name generator used for town names
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
   138
	byte   landscape;                        ///< the landscape we're currently in
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
   139
	byte   snow_line;                        ///< the snowline level in this game
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   140
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   141
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   142
/** Settings related to construction in-game */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   143
struct ConstructionSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   144
	bool   build_on_slopes;                  ///< allow building on slopes
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   145
	bool   autoslope;                        ///< allow terraforming under things
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   146
	bool   longbridges;                      ///< allow 100 tile long bridges
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   147
	bool   signal_side;                      ///< show signals on right side
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   148
	bool   extra_dynamite;                   ///< extra dynamite
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   149
	bool   road_stop_on_town_road;           ///< allow building of drive-through road stops on town owned roads
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   150
	uint8  raw_industry_construction;        ///< type of (raw) industry construction (none, "normal", prospecting)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   151
};
8960
135129062641 (svn r12034) -Codechange: A bit of code style cleaning, regarding comments.
belugas
parents: 8764
diff changeset
   152
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   153
/** Settings related to the AI. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   154
struct AISettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   155
	bool   ainew_active;                     ///< is the new AI active?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   156
	bool   ai_in_multiplayer;                ///< so we allow AIs in multiplayer
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   157
	bool   ai_disable_veh_train;             ///< disable types for AI
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   158
	bool   ai_disable_veh_roadveh;           ///< disable types for AI
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   159
	bool   ai_disable_veh_aircraft;          ///< disable types for AI
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   160
	bool   ai_disable_veh_ship;              ///< disable types for AI
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   161
};
8960
135129062641 (svn r12034) -Codechange: A bit of code style cleaning, regarding comments.
belugas
parents: 8764
diff changeset
   162
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   163
/** Settings related to the old pathfinder. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   164
struct OPFSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   165
	uint16 pf_maxlength;                     ///< maximum length when searching for a train route for new pathfinder
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   166
	byte   pf_maxdepth;                      ///< maximum recursion depth when searching for a train route for new pathfinder
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   167
};
1218
353a7773bc3c (svn r1722) -Feature: Bigger maps - anyone?
tron
parents: 1178
diff changeset
   168
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   169
/** Settings related to the new pathfinder. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   170
struct NPFSettings {
1700
b8ecf0494fdd (svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents: 1688
diff changeset
   171
	/**
4549
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4387
diff changeset
   172
	 * The maximum amount of search nodes a single NPF run should take. This
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4387
diff changeset
   173
	 * limit should make sure performance stays at acceptable levels at the cost
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   174
	 * of not being perfect anymore.
4549
60410aa1aa88 (svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents: 4387
diff changeset
   175
	 */
1700
b8ecf0494fdd (svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents: 1688
diff changeset
   176
	uint32 npf_max_search_nodes;
b8ecf0494fdd (svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents: 1688
diff changeset
   177
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   178
	uint32 npf_rail_firstred_penalty;        ///< the penalty for when the first signal is red (and it is not an exit or combo signal)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   179
	uint32 npf_rail_firstred_exit_penalty;   ///< the penalty for when the first signal is red (and it is an exit or combo signal)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   180
	uint32 npf_rail_lastred_penalty;         ///< the penalty for when the last signal is red
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   181
	uint32 npf_rail_station_penalty;         ///< the penalty for station tiles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   182
	uint32 npf_rail_slope_penalty;           ///< the penalty for sloping upwards
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   183
	uint32 npf_rail_curve_penalty;           ///< the penalty for curves
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   184
	uint32 npf_rail_depot_reverse_penalty;   ///< the penalty for reversing in depots
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   185
	uint32 npf_buoy_penalty;                 ///< the penalty for going over (through) a buoy
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   186
	uint32 npf_water_curve_penalty;          ///< the penalty for curves
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   187
	uint32 npf_road_curve_penalty;           ///< the penalty for curves
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   188
	uint32 npf_crossing_penalty;             ///< the penalty for level crossings
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   189
	uint32 npf_road_drive_through_penalty;   ///< the penalty for going through a drive-through road stop
6574
e1d1a12faaf7 (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents: 6417
diff changeset
   190
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   191
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   192
/** Settings related to the yet another pathfinder. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   193
struct YAPFSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   194
	bool   disable_node_optimization;        ///< whether to use exit-dir instead of trackdir in node key
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   195
	uint32 max_search_nodes;                 ///< stop path-finding when this number of nodes visited
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   196
	bool   ship_use_yapf;                    ///< use YAPF for ships
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   197
	bool   road_use_yapf;                    ///< use YAPF for road
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   198
	bool   rail_use_yapf;                    ///< use YAPF for rail
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   199
	uint32 road_slope_penalty;               ///< penalty for up-hill slope
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   200
	uint32 road_curve_penalty;               ///< penalty for curves
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   201
	uint32 road_crossing_penalty;            ///< penalty for level crossing
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   202
	uint32 road_stop_penalty;                ///< penalty for going through a drive-through road stop
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   203
	bool   rail_firstred_twoway_eol;         ///< treat first red two-way signal as dead end
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   204
	uint32 rail_firstred_penalty;            ///< penalty for first red signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   205
	uint32 rail_firstred_exit_penalty;       ///< penalty for first red exit signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   206
	uint32 rail_lastred_penalty;             ///< penalty for last red signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   207
	uint32 rail_lastred_exit_penalty;        ///< penalty for last red exit signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   208
	uint32 rail_station_penalty;             ///< penalty for non-target station tile
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   209
	uint32 rail_slope_penalty;               ///< penalty for up-hill slope
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   210
	uint32 rail_curve45_penalty;             ///< penalty for curve
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   211
	uint32 rail_curve90_penalty;             ///< penalty for 90-deg curve
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   212
	uint32 rail_depot_reverse_penalty;       ///< penalty for reversing in the depot
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   213
	uint32 rail_crossing_penalty;            ///< penalty for level crossing
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   214
	uint32 rail_look_ahead_max_signals;      ///< max. number of signals taken into consideration in look-ahead load balancer
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   215
	int32  rail_look_ahead_signal_p0;        ///< constant in polynomial penalty function
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   216
	int32  rail_look_ahead_signal_p1;        ///< constant in polynomial penalty function
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   217
	int32  rail_look_ahead_signal_p2;        ///< constant in polynomial penalty function
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   218
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   219
	uint32 rail_longer_platform_penalty;           ///< penalty for longer  station platform than train
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   220
	uint32 rail_longer_platform_per_tile_penalty;  ///< penalty for longer  station platform than train (per tile)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   221
	uint32 rail_shorter_platform_penalty;          ///< penalty for shorter station platform than train
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   222
	uint32 rail_shorter_platform_per_tile_penalty; ///< penalty for shorter station platform than train (per tile)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   223
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   224
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   225
/** Settings related to all pathfinders. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   226
struct PathfinderSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   227
	uint8  pathfinder_for_trains;            ///< the pathfinder to use for trains
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   228
	uint8  pathfinder_for_roadvehs;          ///< the pathfinder to use for roadvehicles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   229
	uint8  pathfinder_for_ships;             ///< the pathfinder to use for ships
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   230
	bool   new_pathfinding_all;              ///< use the newest pathfinding algorithm for all
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   231
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   232
	bool   roadveh_queue;                    ///< buggy road vehicle queueing
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   233
	bool   forbid_90_deg;                    ///< forbid trains to make 90 deg turns
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   234
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   235
	byte   wait_oneway_signal;               ///< waitingtime in days before a oneway signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   236
	byte   wait_twoway_signal;               ///< waitingtime in days before a twoway signal
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   237
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   238
	OPFSettings  opf;                        ///< pathfinder settings for the old pathfinder
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   239
	NPFSettings  npf;                        ///< pathfinder settings for the new pathfinder
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   240
	YAPFSettings yapf;                       ///< pathfinder settings for the yet another pathfinder
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   241
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   242
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   243
/** Settings related to orders. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   244
struct OrderSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   245
	bool   improved_load;                    ///< improved loading algorithm
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   246
	bool   gradual_loading;                  ///< load vehicles gradually
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   247
	bool   selectgoods;                      ///< only send the goods to station if a train has been there
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   248
	bool   gotodepot;                        ///< allow goto depot in orders
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   249
	bool   no_servicing_if_no_breakdowns;    ///< dont send vehicles to depot when breakdowns are disabled
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   250
	bool   timetabling;                      ///< whether to allow timetabling
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   251
	bool   serviceathelipad;                 ///< service helicopters at helipads automatically (no need to send to depot)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   252
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   253
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   254
/** Settings related to vehicles. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   255
struct VehicleSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   256
	bool   mammoth_trains;                   ///< allow very long trains
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   257
	bool   realistic_acceleration;           ///< realistic acceleration for trains
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   258
	bool   wagon_speed_limits;               ///< enable wagon speed limits
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   259
	bool   disable_elrails;                  ///< when true, the elrails are disabled
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   260
	UnitID max_trains;                       ///< max trains in game per player
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   261
	UnitID max_roadveh;                      ///< max trucks in game per player
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   262
	UnitID max_aircraft;                     ///< max planes in game per player
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   263
	UnitID max_ships;                        ///< max ships in game per player
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   264
	bool   servint_ispercent;                ///< service intervals are in percents
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   265
	uint16 servint_trains;                   ///< service interval for trains
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   266
	uint16 servint_roadveh;                  ///< service interval for road vehicles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   267
	uint16 servint_aircraft;                 ///< service interval for aircraft
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   268
	uint16 servint_ships;                    ///< service interval for ships
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   269
	uint8  plane_speed;                      ///< divisor for speed of aircraft
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   270
	uint8  freight_trains;                   ///< value to multiply the weight of cargo by
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   271
	bool   dynamic_engines;                  ///< enable dynamic allocation of engine data
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   272
	bool   never_expire_vehicles;            ///< never expire vehicles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   273
	byte   extend_vehicle_life;              ///< extend vehicle life by this many years
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
   274
	byte   road_side;                        ///< the side of the road vehicles drive on
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   275
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   276
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   277
/** Settings related to the economy. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   278
struct EconomySettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   279
	bool   inflation;                        ///< disable inflation
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   280
	bool   bribe;                            ///< enable bribing the local authority
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   281
	bool   smooth_economy;                   ///< smooth economy
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   282
	bool   allow_shares;                     ///< allow the buying/selling of shares
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   283
	byte   dist_local_authority;             ///< distance for town local authority, default 20
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   284
	bool   exclusive_rights;                 ///< allow buying exclusive rights
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   285
	bool   give_money;                       ///< allow giving other players money
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   286
	bool   mod_road_rebuild;                 ///< roadworks remove unneccesary RoadBits
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   287
	bool   multiple_industry_per_town;       ///< allow many industries of the same type per town
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   288
	bool   same_industry_close;              ///< allow same type industries to be built close to each other
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   289
	uint8  town_growth_rate;                 ///< town growth rate
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   290
	uint8  larger_towns;                     ///< the number of cities to build. These start off larger and grow twice as fast
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   291
	uint8  initial_city_size;                ///< multiplier for the initial size of the cities compared to towns
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   292
	TownLayoutByte town_layout;              ///< select town layout
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   293
	bool   station_noise_level;              ///< build new airports when the town noise level is still within accepted limits
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   294
	uint16 town_noise_population[3];         ///< population to base decision on noise evaluation (@see town_council_tolerance)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   295
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   296
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   297
/** Settings related to stations. */
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   298
struct StationSettings {
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   299
	bool   modified_catchment;               ///< different-size catchment areas
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   300
	bool   join_stations;                    ///< allow joining of train stations
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   301
	bool   nonuniform_stations;              ///< allow nonuniform train stations
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   302
	bool   adjacent_stations;                ///< allow stations to be built directly adjacent to other stations
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   303
	bool   always_small_airport;             ///< always allow small airports
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   304
	byte   station_spread;                   ///< amount a station may spread
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   305
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   306
10775
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   307
/** All settings together for the game. */
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   308
struct GameSettings {
10707
81a4013a7680 (svn r13255) -Codechange: move _opt to _settings.
rubidium
parents: 10703
diff changeset
   309
	DifficultySettings   difficulty;         ///< settings related to the difficulty
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   310
	GameCreationSettings game_creation;      ///< settings used during the creation of a game (map)
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   311
	ConstructionSettings construction;       ///< construction of things in-game
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   312
	AISettings           ai;                 ///< what may the AI do?
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   313
	PathfinderSettings   pf;                 ///< settings for all pathfinders
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   314
	OrderSettings        order;              ///< settings related to orders
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   315
	VehicleSettings      vehicle;            ///< options for vehicles
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   316
	EconomySettings      economy;            ///< settings to change the economy
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   317
	StationSettings      station;            ///< settings related to station management
10835
976b9d25c2be (svn r13386) -Fix: global currency/units setting being overriden when loading a savegame.
rubidium
parents: 10787
diff changeset
   318
	LocaleSettings       locale;             ///< settings related to used currency/unit system in the current game
10703
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   319
};
2c998f3776d1 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
rubidium
parents: 10695
diff changeset
   320
10775
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   321
/** All settings that are only important for the local client. */
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   322
struct ClientSettings {
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   323
	GUISettings          gui;                ///< settings related to the GUI
10784
c3c7b558b4f1 (svn r13334) -Codechange: move the network settings variables from network/network_internal to settings.
rubidium
parents: 10775
diff changeset
   324
	NetworkSettings      network;            ///< settings related to the network
10775
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   325
};
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   326
10775
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   327
/** The current settings for this game. */
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   328
extern ClientSettings _settings_client;
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   329
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   330
/** The current settings for this game. */
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   331
extern GameSettings _settings_game;
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   332
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   333
/** The settings values that are used for new games and/or modified in config file. */
7061477bfbcf (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents: 10767
diff changeset
   334
extern GameSettings _settings_newgame;
0
29654efe3188 (svn r1) Import of revision 975 of old (crashed) SVN
truelight
parents:
diff changeset
   335
8704
2857ec554839 (svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents: 8647
diff changeset
   336
#endif /* SETTINGS_TYPE_H */