Commit Graph

246 Commits

Author SHA1 Message Date
Patric Stout fa1e27994d Feature: allow the use of TURN to connect client and server together
TURN is a last resort, used only if all other methods failed.
TURN is a relay approach to connect client and server together, where
openttd.org (by default) is the middleman.

It is very unlikely either the client or server cannot connect to
the STUN server, as they are both already connected to the Game
Coordinator. But in the odd case it does fail, estabilishing the
connection fails without any further possibility to recover.
2021-07-20 19:57:23 +02:00
Rubidium 178ea3196b Remove: includes to network/core/config.h from headers when only three cpp files need it 2021-07-11 22:13:59 +02:00
Patric Stout b6a116a247
Add: allow setting your server visibility to "invite-only" (#9434)
In this mode you do register to the Game Coordinator, but your
server will not show up in the public server listing. You can give
your friends the invite code of the server with which they can
join.
2021-07-11 21:57:05 +02:00
Patric Stout e4d216e44b Feature: join servers based on their invite code
This removes the need to know a server IP to join it. Invite codes
are small (~7 characters) indentifiers for servers, which can be
exchanged with other players to join the servers.
2021-07-11 20:38:42 +02:00
Patric Stout 8a2da49413 Remove: old server listing via Master Server
This removes all UDP from the game except for a local broadcast
to find LAN games.

So long Master Server, and tnx for all the fish!
2021-07-10 20:17:07 +02:00
Tyler Trahan d09210e1c6 Feature: Configurable subsidy duration 2021-06-10 23:26:16 +02:00
Patric Stout e9e4588db1
Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311) 2021-05-30 10:40:59 +02:00
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
rubidium42 2022e34824 Codechange: move locale settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 02fdb5b210 Codechange: move server name/id in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 cc6c078dec Codechange: move hostnames in settings to std::string 2021-05-13 23:13:17 +02:00
rubidium42 c73d64adf9 Codechange: move passwords in settings to std::string 2021-05-13 23:13:17 +02:00
Patric Stout be37a2cab8 Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can
just use a single last_joined setting.
2021-04-29 20:12:11 +02:00
Patric Stout 05612d60ae Remove: "language" field from server/client
The original idea was that people could find a server they could
talk in their native language on. This isn't really used in that
way. There are several reasons for removing this:

- the client also sends his "language" to the server, but nothing
  is doing anything with this.
- flags are a bad way to represent languages, and over the years
  we had several (rightfully) complaints about this.
- most servers have their language set to "All", and prefix the
  servername with the language it is about. This is a much more
  efficient way to do the same.

All in all, this feature should go back to the drawing board.
Maybe it could work in another form, but this form is not it.
2021-04-20 17:24:38 +02:00
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
2021-03-26 12:22:32 +01:00
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
2021-03-26 12:22:32 +01:00
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
This better reflects what it is, and hopefully removes a bit of
the confusion people are having what this setting actually does.

Additionally, update the text on the setting to better inform
users what it is doing exactly, so they can make an educated
decision on how to change it.

Next commit will introduce an "auto" value, which should be the
new default. The rename has as added benefit that everyone will
start out on the "auto" value.
2021-03-26 12:22:32 +01:00
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
This is an indication value; the game tries to get as close as it
can, but due to the complex tropic rules, that is unlikely to be
exact.

In the end, it picks a height-level to base the desert/tropic
line on. This is strictly seen not needed, as we can convert any
tile to either. But it is the simplest way to get started with
this without redoing all related functions.
2021-03-26 12:22:32 +01:00
Patric Stout cafe4eed6e Feature: setting to indicate snow coverage for arctic climate (replaces snow line height)
Setting the snow coverage (in % of the map) makes a lot more sense
to the human, while still allowing the niche player to set (by
finding the correct %) a snow line height they like. This makes for
easier defaults, as it decoupled terrain height from amount of snow.

Maps can never be 100% snow, as we do not have sprites for coastal
tiles.

Internally, this calculates the best snow line height to approach
this coverage as close as possible.
2021-03-26 12:22:32 +01:00
Matt Kimber bcb3313e13
Feature: allow setting maximum zoom level at which sprites are drawn (#8604) 2021-03-13 10:00:53 +01:00
Patric Stout 74aa934441 Codechange: validate that "max" value of settings fit in their storage
This is an easy mistake to make, so protect us against making such
mistakes, by validating it doesn't happen.
2021-03-01 23:17:47 +01:00
Patric Stout c3dc27e37e Add: settings to limit your fast-forward game speed
By default this setting is set to 2500% normal game speed.
2021-02-28 18:04:51 +00:00
Patric Stout fa170b9ace Feature: configurable refresh-rate and change default to 60fps
Most modern games run on 60 fps, and for good reason. This gives
a much smoother experiences.

As some people have monitors that can do 144Hz or even 240Hz, allow
people to configure the refresh rate. Of course, the higher you
set the value, the more time the game spends on drawing pixels
instead of simulating the game, which has an effect on simulation
speed.

The simulation will still always run at 33.33 fps, and is not
influences by this setting.
2021-02-19 10:43:15 +01:00
Charles Pigott 188bf0fbc9 Change: Remove disable_unsuitable_building setting
This setting is no longer useful, as you can now always build roads,
canals, etc.
2021-01-08 16:43:51 +01:00
Kuhnovic a3a7928372
Feature: option to auto remove signals when in the way during rail construction (#8274) 2021-01-07 10:17:05 +01:00
frosch 2bb691f50e Change: Remove the LAN/Internet combobox from the server list in favour of adding two separate search buttons. 2020-12-25 00:40:35 +01:00
Pavel Stupnikov c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures (#8282) 2020-12-14 23:35:07 +01:00
stormcone b524f1ae21 Feature: Show the name of the NewGRF in the build vehicle window. 2020-01-04 18:42:35 +01:00
Niels Martin Hansen 2fd871e2af Feature: Configurable game ending year
Functionally reverts 683b65ee1
2019-12-28 12:27:39 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Jack Baron 7c9dedb94f Feature: Configure minimum share trading years 2019-10-19 20:31:44 +01:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Niels Martin Hansen 140a96b3a0 Change: Limit memory allocations for each Squirrel instance
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
2019-05-11 15:34:33 +02:00
Charles Pigott bd87f11355 Codechange: Remove DistributionTypeByte 2019-04-29 17:40:22 +01:00
Charles Pigott f20b75d712 Codechange: Remove TownLayoutByte type 2019-04-29 17:40:22 +01:00
Charles Pigott 0e439aeab7 Codechange: Remove TownFoundingByte type 2019-04-29 17:40:22 +01:00
Charles Pigott 96a4787710 Codechange: Set ZoomLevel's base type to byte instead of using ZoomLevelByte 2019-04-29 17:40:22 +01:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
Charles Pigott fe448a2616 Remove: OPF 2019-03-16 22:30:11 +00:00
PeterN dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. (#7234)
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.

"Company stations can serve industries with attached neutral stations"

When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.

When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
Peter Nelson b8a0107ad1 Change: Add configurable curve penalty for ships. 2019-03-08 16:52:08 +01:00
Niels Martin Hansen 52572cafa6 Add: Option for population-linear town cargo generation
Introduce a new default algorithm for town cargo generation (passengers and mail), and a game setting to choose between the new and original algorithm.

The original town cargo generation algorithm has the property of the generated amount relating to the square of each building's population, meaning large towns easily produce more cargo than can realistically be transported. The problem is excessive cargo is amplified if playing with cargodist.

The new algorithm introduced instead has a linear relation to the population. The result is that smaller towns will produce slightly more cargo, while the largest towns will produce about a fourth of what they would with the original algorithm.

Existing savegames will use the original algorithm, while new games will default to the new algorithm.
2019-03-04 20:19:44 +01:00
Gabda87 a0293d313d Add #4115: default company colour setting (#6998)
Works only in single player.
2019-01-10 10:45:38 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
Niels Martin Hansen 4fb76db42f Feature #986: Automatic save when losing connection to a network game 2018-06-23 15:22:31 +02:00
PeterN cfe6a8ea4f
Add: Replace independment map scrolling GUI settings with single option, and add choice to not lock cursor position when scrolling. (#6756) 2018-04-28 22:27:14 +01:00
peter1138 d934ef9b00 (svn r27825) -Feature [FS#4950]: Add option to close windows with right click (Flamefire) 2017-03-24 18:55:16 +00:00
frosch 2f7de4fd99 (svn r27144) -Change: The chatbox-width setting now uses percent of screen width instead of pixels. 2015-02-12 20:00:23 +00:00
rubidium ddfc8372ee (svn r26884) -Change: scale the NewGRF's snow line level according to the configured maximum map height 2014-09-21 12:02:03 +00:00
rubidium f41b55f0ff (svn r26880) -Add: stub settings for limiting bridge and map height 2014-09-21 11:27:34 +00:00
planetmaker 61e129cc22 (svn r26815) -Change: Allow to set the granularity of the tooltip hover time in milliseconds instead of seconds. New default value is 250ms 2014-09-13 13:30:31 +00:00
rubidium f9c9ff6ec3 (svn r25508) -Change: split unit localisation choice into a choice per type of unit, and move it to the advanced settings
-Feature [FS#5482]: have tractive effort in imperial (lbf) and metric (kgf) units
-Feature: have weights and volumes in imperial units (short tons, gallons)
2013-06-29 09:47:18 +00:00
fonsinchen 0fc198cb00 (svn r25365) -Feature: show cargo by next hops and final destinations in the station GUI 2013-06-09 13:08:52 +00:00
fonsinchen a49a4eec6e (svn r25351) -Add: settings for link graph 2013-06-09 12:56:35 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
frosch 345c3203d7 (svn r24845) -Add: News ticker sound setting to adv. settings window. 2012-12-23 21:08:42 +00:00
frosch 21b43b63f5 (svn r24843) -Codechange: Move news display options into the general settings framework. (based on patch by eagle_rainbow) 2012-12-23 21:07:12 +00:00
frosch 6bb43a6561 (svn r24792) -Add: Readd difficulty settings to advanced settings unless they are already present in other settings windows. 2012-12-05 19:38:44 +00:00
frosch d1ab0f03bc (svn r24790) -Remove: Classic difficulty profiles. 2012-12-05 19:36:41 +00:00
frosch 812ae4140a (svn r24789) -Add: Separate setting to control the default settings of newly added scripts and random AIs. 2012-12-05 19:36:04 +00:00
frosch a499435351 (svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables. 2012-12-05 19:34:45 +00:00
frosch 5b2da98ca3 (svn r24785) -Add: Various methods to open the OSK. (based on patch by Eagle_rainbow) 2012-12-05 19:34:25 +00:00
frosch dc930b6689 (svn r24672) -Add [FS#5356]: Remember the basic/advanced/expert filter selection. 2012-11-08 11:20:32 +00:00
frosch 72fc771039 (svn r24590) -Feature: More options for the auto-scroll setting. (adf88) 2012-10-13 09:16:20 +00:00
frosch e1fda49027 (svn r24194) -Change: Rename the 'signal_side' setting to 'train_signal_side', and add a third option while doing so. 2012-05-01 15:53:51 +00:00
michi_cc f3e295b4ec (svn r24134) -Add: Configurable limits for tree planting. 2012-04-17 19:43:52 +00:00
michi_cc 708d5b6712 (svn r24129) -Feature [FS#3660]: Option to minimise signal distance when dragging over obstacles. (adf88) 2012-04-17 19:43:29 +00:00
rubidium 182969f531 (svn r23769) -Codechange: make the lag/join start timeouts configurable as well 2012-01-07 14:43:45 +00:00
rubidium bddfcaef95 (svn r23764) -Fix [FS#4955]: make default timeouts for certain states lower and configurable 2012-01-06 21:49:06 +00:00
truebrain c99950c215 (svn r23606) -Add: GameScanner, to auto-detect game scripts, and wire it in the console 2011-12-19 20:55:56 +00:00
frosch 1ea449630d (svn r23497) -Add: Advanced display setting to control the linewidth in graphs. (ChillCore) 2011-12-11 15:55:31 +00:00
michi_cc d3b7b89493 (svn r23415) -Feature: Infrastructure maintenance costs. 2011-12-03 23:40:46 +00:00
truebrain 9dde1287aa (svn r23387) -Fix: move ai.script_max_opcode_till_suspend to script.script_max_opcode_till_suspend 2011-12-01 12:04:22 +00:00
peter1138 4e97261315 (svn r23314) -Add: Add settings to restrict viewport zoom levels. 2011-11-24 12:20:14 +00:00
truebrain e30256692f (svn r23303) -Add: economy.fund_buildings, to disallow funding buildings 2011-11-23 16:10:18 +00:00
rubidium 47c5d30b5d (svn r23084) -Codechange: get rid of a redundant variable 2011-11-03 22:49:03 +00:00
rubidium 0ad82be1f3 (svn r22807) -Feature-ish: show a message about missing strings in the intro window if a certain (configurable) threshold has been reached and its not a stable release 2011-08-21 19:23:06 +00:00
rubidium dc5f44883b (svn r22797) -Add: progress bar for scanning NewGRFs 2011-08-21 12:53:13 +00:00
rubidium 0041408e4f (svn r22767) -Add: river generation 2011-08-20 14:14:17 +00:00
frosch d29def43b0 (svn r22626) -Fix [FS#4622]: Also initialise _old_vds with newgame settings; TTD savegames do not contain these settings. 2011-07-03 10:59:25 +00:00
frosch bfd09004fe (svn r22417) -Add: an advanced setting to specify the default palette to use for NewGRFs without action 14 palette information; this makes the default choice independent from the used base graphics and '-i' option. 2011-05-03 20:30:26 +00:00
rubidium f90044d343 (svn r22202) -Codechange: make MusicFileSettings a proper citizen of the client settings 2011-03-05 18:00:48 +00:00
alberth 4364cec392 (svn r22001) -Codechange: Rename difficulty.number_industries to difficulty.industry_density. 2011-02-06 18:26:50 +00:00
alberth d84502c432 (svn r22000) -Codechange: Introduce an enum for the industry density setting. 2011-02-06 18:11:39 +00:00
terkhen a4b08dddd1 (svn r21974) -Feature: Add a setting to enable/disable funding local road reconstruction. 2011-02-05 13:46:09 +00:00
rubidium 0fe0225751 (svn r21962) -Feature-ish: GUI setting to disable reversing at signals 2011-02-04 16:40:38 +00:00
rubidium c85d350310 (svn r21960) -Change: show the length of vehicles in tiles, instead of half tiles in the depot
-Fix [FS#4461]: don't count the number of vehicles but the length of vehicles to (configurably) limit train length
2011-02-04 15:40:35 +00:00
rubidium 46b3d114a8 (svn r21959) -Change: replace longbridges with custom maximum bridge and tunnel length setting 2011-02-04 15:37:23 +00:00
rubidium 4355231f67 (svn r21958) -Cleanup: join_stations setting; can done by distant join and could be subverted by distant join 2011-02-04 15:29:50 +00:00
rubidium 4c5ca17486 (svn r21957) -Cleanup: gotodepot and timetabling settings are more or less useless; just don't use depot orders or timetabling if you don't want to use it 2011-02-04 15:13:20 +00:00
rubidium 71f4067d19 (svn r21956) -Cleanup: always draw the bridge pillars 2011-02-04 14:38:33 +00:00
rubidium 313c1bc171 (svn r21955) -Cleanup: always show the long date in the status bar 2011-02-04 14:38:15 +00:00
rubidium 2ad1279725 (svn r21954) -Cleanup: remove setting to not show the vehicle speed in the vehicle view 2011-02-04 14:37:24 +00:00
smatz 3057a26fd5 (svn r21953) -Remove [FS#4456]: the non-uniform stations setting. Support for uniform stations has been broken for over a year 2011-02-04 14:11:14 +00:00
rubidium 62128e8263 (svn r21826) -Fix [FS#4007]: the expectations from the "always build infrastructure" setting name/description didn't match the behaviour 2011-01-16 21:10:41 +00:00
rubidium eab47d2227 (svn r21728) -Fix/Feature [FS#4331]: (configurably) limit amount of tiles that can be cleared/terraformed by a company 2011-01-04 22:50:09 +00:00
yexo 3ca65ab7b3 (svn r21695) -Codechange: add helper function to get the currently applicable GameSettings object 2011-01-02 00:34:21 +00:00
planetmaker 6331923653 (svn r21656) -Fix [FS#4345] (r3722, r15301): Use a bool instead of uint8 to store a bool and use the dedicated accessor function when reading boolean settings (glx, rubidium) 2010-12-29 13:32:35 +00:00