Commit Graph

24457 Commits

Author SHA1 Message Date
Patric Stout 7cdf7c7ca0 Fix: [bundle] custom launch.sh is no longer required for Mac OS
Co-authored-by: Owen Rudge <owen@owenrudge.net>
2020-12-19 18:26:29 +01:00
translators 2714e0a33f Update: Translations from eints
russian: 10 changes by Ln-Wolf
finnish: 4 changes by hpiirai
slovak: 16 changes by FuryPapaya
french: 1 change by glx22
2020-12-18 18:08:06 +00:00
translators 40269f5df2 Update: Translations from eints
finnish: 47 changes by hpiirai
2020-12-17 18:01:12 +00:00
Pavel Stupnikov b2895dfcd0
Change: extend the allowed range for max loan setting (#8386) 2020-12-16 21:56:32 +01:00
Pavel Stupnikov d989fb516b
Change: send network error to the server before making an emergency save (#8387) 2020-12-16 21:23:12 +01:00
Patric Stout 88f30f7fe7
Fix #8313: use correct capitalization for TTO / DOS base-music (#8385)
DOS did not have cases in filenames. Different OS interpret
them as either all-lowercase or all-uppercase. So we try both.
All-uppercase is done by the obg/obm/obs files, and if opening
fails, OpenTTD will automatically retry the all-lowercase variant.

So for those who already have the files lowercase, nothing
changes. For those that install fresh from TTO, it should now
work out-of-the-box.
2020-12-15 22:47:57 +01:00
frosch d5f05fb781
Fix: [NewGRF] Action 7/9 conditions 0x0F to 0x12 failed, if 'param' was 0x88. (#8382)
Fix: [NewGRF] Action 7/9 conditions 0x0B to 0x12 failed, if 'param' was 0x85.
These conditions are supposed to ignore 'param' entirely.
2020-12-15 22:42:03 +01:00
Byoungchan Lee 0471de2d92
Fix: Remove unnessary reference to suppress warning (#8337)
Apple Clang version 12 (bundled with Xcode 12) complaints about copying
small objects in range loop (-Wrange-loop-analysis introduced by -Wall).
This warning can be easily avoided by removing the reference from
the const pointer type.
2020-12-15 22:39:51 +01:00
SamuXarick 1d85d71d29
Fix: for original terrain generator, keep a single gap of water at the borders (#7883)
This means that for NE/NW, it should have one more in case of
freeform-edges, and in case of SE/SW it should have one less.

Reminder: freeform-edges only adds VOID tiles on X=0 and Y=0.
2020-12-15 21:52:41 +01:00
Patric Stout e07afaeffb
Fix: a cargos sneaked in; should be cargoes for consistency (#8383) 2020-12-15 21:39:29 +01:00
Patric Stout f7b8e7e46c Fix: prefix the Nth vehicle with "#" when ungrouped
This is for consistency; most other objects add a # to indicate
it is the Nth of that object, except for Trains / RVs / Ships /
Aircrafts.
This becomes painfully apparent with unnamed vehicles in groups,
which do get a "#".
2020-12-15 21:18:03 +01:00
stormcone ca65f19b03 Feature: Show group name as part of the default vehicle name.
Only if the vehicle is member of a group and does not have a user defined name.
2020-12-15 21:18:03 +01:00
translators 1a67954ff9 Update: Translations from eints
korean: 29 changes by telk5093
finnish: 8 changes by hpiirai
slovak: 6 changes by FuryPapaya
french: 6 changes by glx22
2020-12-15 17:57:40 +00:00
Patric Stout d6c54e7eef Fix: [Git] ignore any build folder you might have
Instructions now suggest using build-host, etc. It is easier to
just ignore all build* folders.
2020-12-15 15:46:39 +01:00
Patric Stout 93ef759a25 Add: [Actions] preview workflow, where PRs can be reviewed in the browser
When a developer attaches the "preview" label, a build is created
and published on https://preview.openttd.org/. After that, new
pushes to the PR are automatically build (as long as the "preview"
label exists).

If a non-developer attaches the "preview" label, it will be
removed.
2020-12-15 15:46:39 +01:00
Patric Stout 8fbf5bef60 Fix: workarounds for two emscripten bugs in the network stack 2020-12-15 15:46:39 +01:00
Patric Stout d5b9f7ac37 Add: [Emscripten] use "relative mouse mode" with SDL2
This mode doesn't wrap the mouse constantly, but requests SDL
to lock the mouse pointer. This is needed, as with Emscripten
you are not allowed to change the mouse poisition (only to lock
it into place).
2020-12-15 15:46:39 +01:00
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
2020-12-15 15:46:39 +01:00
Patric Stout 2da07f7615 Codechange: unroll the SDL2 main loop
This commit prepares for the next commit, as Emscripten needs to
have a way to trigger a single iteration of the main loop. To
keep the real changes more clear, this commit only unrolls the
loop, and makes no changes to the logic itself.
2020-12-15 15:46:39 +01:00
Tyler Trahan f2a93dba0d
Change: set the default setting for autorenew to on for new games (#8352) 2020-12-15 09:58:37 +01:00
translators 8c42f3a8d4 Update: Translations from eints
french: 1 change by glx22
2020-12-14 23:45:41 +00:00
jostephd b1cf79da5b
Feature: new velocity unit "tiles/day" (#8278) 2020-12-15 00:39:57 +01:00
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00
frosch cc1679e317 Codechange: Apple LLVM fails to implement std::optional::value() also on pretty recent version. Use operator* instead. 2020-12-14 23:50:50 +01:00
frosch 484ea62a62 Cleanup: use std::optional instead of custom implementation. 2020-12-14 23:50:50 +01:00
frosch 5d278b62cc Codechange: switch to C++17 on all platforms. 2020-12-14 23:50:50 +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
Patric Stout 68f9925cd4
Codechange: use \u to indicate unicode chars in strings (#8379)
With \x, we sometimes had to do the "" trick, as the length is not
predefined. With C++11 bringing \u to the specs, which has a preset
length, we no longer need the "" trick.

We set the strings to u8, to ensure all compilers use UTF-8 encoding
for the \u characters.

This was triggered by newer CLangs, which start to warn if you
use "" in the middle of a string, wondering if that was your
intention. It is a good question. And this is our answer :)
2020-12-14 20:25:01 +01:00
Owen Rudge b14e3b9b9d Feature: Switch to bzip2 compression for DMG files (supported by OS X 10.4+) 2020-12-13 23:58:37 +01:00
glx22 d1fa6b129c Add: [CMake] Option to only build tools/docs 2020-12-13 22:46:46 +01:00
Patric Stout b7851e51ad Fix: set SP_WORKING_DIR earlier with '-c'
On Windows, relative folders don't work so well. So we need to
lookup the full path. This is best done in DetermineBasePaths()
and as a bonus that only sets SP_WORKING_DIR once.
2020-12-13 22:45:50 +01:00
Michael Lutz a660dce295 Fix: [CMake, MSVC] Don't copy regression exe's into a subfolder as they need have their lang files next to them. 2020-12-13 22:45:50 +01:00
Patric Stout abb746fae3
Fix: [Actions] cleanup ci-build workflow to be up-to-date (#8375)
Also, while at it, make it more like the upcoming release-workflow,
so they look a lot more similar.

Functional it should be the same, except that Windows should
now also output when a test fails.
2020-12-13 22:32:44 +01:00
Patric Stout 5d0331ecdc
Fix 8bef06a2: don't use "extern" when you want to implement a global (#8373) 2020-12-13 16:56:33 +01:00
Patric Stout da7c74ba7e Fix: change the working-dir searchpath when using '-c'
Basically, with '-c' you now create a sandbox. It will still use
your personal-dir and global-dir to find files you installed there,
but all new files are stored with a base folder identical to the
folder the configuration is in.

This is a bit of an old bug, that we many have tried to solve in
various of different ways. The code has grown sufficiently complex
that it is hard to see what consequences of actions are. This is
in my opinion the most harmless solution, while increasing the
usefulness of the '-c' flag.

In essence, the problem was that empty folders were always created
in the directory where the configuration was, but as that directory
wasn't added to any searchpath, files weren't stored there, unless
by accident it was a folder already on the searchpath. For example,
if you do './openttd -c local.cfg', it did work as expected. But
in the more generic variant, it did not.

With this patch, you can run './openttd -c /new/folder/local.cfg',
and it will create and prepare that folder to receive new files.

'content_download' is also stored in the directory the
configuration is in; this was already the case. Important to
note that there is only one search-path for 'content_download'.
In other words, when using '-c', it will not look in '~/.openttd'
inside the 'content_download' folder.
2020-12-13 16:40:56 +01:00
Patric Stout 4e12aac9c0 Codechange: to create or not to create a folder, that is the question
This was just weird. With XDG _personal_dir was created already,
but later on it was checked if it was different from config_dir,
and the creation was skipped. All this checking and validation
makes my head spin .. let's make it a bit more simple.
2020-12-13 16:40:56 +01:00
Patric Stout c66bd18a10
Add: save openttd.cfg immediately on changing a setting (#8358)
Formally it was only done on exit. This means that if it crashes
changes in settings were not stored. This is often rather
frustrating. Additionally, targets (like emscripten) where people
are unlike to use "Exit Game", will never see their configuration
stored.

The drawback is that on every setting change there is some minor
I/O of writing the ini file to disk again.
2020-12-13 16:28:06 +01:00
translators 40edc2863c Update: Translations from eints
finnish: 1 change by hpiirai
2020-12-12 17:52:42 +00:00
glx22 6fae0b83d9 Add: [CMake] targets to generate documentation 2020-12-12 15:48:04 +01:00
translators 7f5afbfdf5 Update: Translations from eints
slovak: 2 changes by FuryPapaya
2020-12-10 17:53:08 +00:00
glx22 e2eafd86de Fix: Prevent infinite recursion in commit checker 2020-12-10 01:08:44 +01:00
translators 20151e41ea Update: Translations from eints
korean: 1 change by telk5093
french: 1 change by glx22
2020-12-09 17:50:24 +00:00
translators 819ce1bf49 Update: Translations from eints
slovak: 30 changes by FuryPapaya
lithuanian: 37 changes by devastatorius
2020-12-09 13:42:08 +00:00
Owen Rudge 535e18b54e Change: Don't display OS name when the user is exiting the game 2020-12-09 09:21:34 +00:00
Patric Stout 2864d019f0
Fix: useless warning with -snull and no BaseSounds available (#8361)
If I explicitly tell the system I do not want sound, I still get
presented a nice message I do not have any BaseSounds available
on my system, and that I should download one to enjoy sound. Well,
let me tell you, with "-snull" that is really really not going to
help. So please, be quiet, and let me enjoy the game without
"boooooo" and "DING DING DING".

Thank you.
2020-12-08 10:24:59 +01:00
Owen Rudge 6e689e2038 Fix: FreeType is still required on macOS 2020-12-08 09:24:15 +00:00
Patric Stout dddf885fb4
Remove: console command "content select all" (#8363)
The intention of this function was that you could download
everything after a filter was applied; but this never really
took off. Instead, a select few people used this functionality
to download every available package on BaNaNaS. This is not in
the spirit of this service. Additionally, these few people were
good for 70% of the consumed bandwidth of BaNaNaS.
2020-12-07 14:48:13 +01:00
frosch 6198a4776b Change: [NewGRF] Use aircraft property 12 also for helicopters.
Due to keeping compatibility we can only do this for NewGRF-defined sound effects.
2020-12-06 20:31:54 +01:00
Charles Pigott cfa1b1e006 Fix: Compile warnings when asserts are disabled 2020-12-06 19:27:39 +00:00
Patric Stout ad47ebc1a8 Change: don't encourage the use of LZO
LZO was used before the first version we track in our version
control system, which dates back to Aug 2004. Somewhere before
that time a few savegames / scenarios exist which use LZO. No
other savegame / scenario does since then. Let's not encourage
people to install something that ancient.

There are no scenarios on BaNaNaS that require LZO.
2020-12-06 19:25:46 +00:00