Commit Graph

52678 Commits

Author SHA1 Message Date
Jonathan G Rennison
ca6741bfb4 Version: Committing version data for tag: jgrpp-0.42.0 2021-07-04 15:05:17 +01:00
Jonathan G Rennison
d24f24cfcc Merge pull request #295 from telk5093/jgrpp
Update: Korean translation
2021-07-04 15:04:11 +01:00
TELK
9dcc6f770c Update: Korean translation up to 158608442c 2021-07-04 22:00:06 +09:00
TELK
34e30766a3 Update: Korean translation up to 0f73fe765f 2021-07-04 22:00:06 +09:00
TELK
25e2e79bcc Update: Korean translation up to 0773dde669 2021-07-04 22:00:06 +09:00
TELK
757f140286 Update: Korean translation for drag_drop_group_name 2021-07-04 22:00:06 +09:00
TELK
2892bdde2e Update: Korean translation for 9d4d72cd1e 2021-07-04 22:00:06 +09:00
Jonathan G Rennison
f90d7662d8 Increase verbosity of station docking mismatch check in CheckCaches 2021-07-03 23:16:57 +01:00
Jonathan G Rennison
158608442c Merge pull request #281 from VacuumBreather/train_speed_adaptation
# Conflicts:
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/extended_ver_sl.h
2021-07-03 23:00:25 +01:00
Jonathan G Rennison
9edc13b889 Make sure setting set correctly on loading existing saves 2021-07-03 22:56:17 +01:00
Jonathan G Rennison
fb4e10626e Make look ahead distance vaiable with speed, within a reasonable range 2021-07-03 22:50:43 +01:00
translators
05bdfadcb6 Update: Translations from eints
norwegian (bokmal): 1 change by Anolitt
japanese: 1 change by scabtert
2021-07-03 18:49:50 +00:00
Loïc Guilloux
0fa2007560 Fix cdb3dd049: GOAL chunk was not using the header for loading (#9409) 2021-07-03 18:26:24 +02:00
rubidium42
d38ad7d80c Cleanup: remove declaration of undefined function 2021-07-03 11:26:13 +02:00
rubidium42
979783f90e Codechange: replace InjectDParam/ShiftParameters by setting the right parameter values in the first place 2021-07-03 11:26:13 +02:00
Patric Stout
1d9912134d Doc: guidelines for network-compatible patch-packs that want to add fields to existing chunks 2021-07-02 22:21:58 +02:00
Patric Stout
3e3049fd0e Codechange: make savegame-version checks more obvious in SlCompanyLiveries::Load
num_liveries indirectly contained the same information, but this
makes reading these things pretty difficult. So use IsSavegameVersionBefore()
like everywhere else instead.
2021-07-02 22:21:58 +02:00
Patric Stout
4e645ce749 Codechange: using "until" in function names can be confusing
IsSavegameVersionUntil() did a [0, N] check, not [0, N) as the
name suggests.

Until can be a confusing word, where people consider it to be
including the upperbound. Dictionary states it means "before",
excluding the upperbound. There are long debates about who is right.

So, simply remove away from this ambiguity, and call it "before"
and "before or at". This makes the world easier for everyone.
2021-07-02 22:21:58 +02:00
Patric Stout
9643a1b80a Doc: explain the binary structure of our (new) savegames 2021-07-02 22:21:58 +02:00
Patric Stout
1ed2405907 Cleanup: remove SLE_NULL and friends
We no longer need them. If you want to remove a field .. just
remove it! Because of the headers in the savegame, on loading,
it will do the right thing and skip the field.

Do remember to bump the savegame version, as otherwise older
clients can still load the game, but will reset the field you
have removed .. that might be unintentially.
2021-07-02 22:21:58 +02:00
Patric Stout
3826703bc3 Add: store headers for chunks with SL_STRUCTLIST 2021-07-02 22:21:58 +02:00
Patric Stout
cdb3dd0493 Add: store headers for most savegame chunks
When a header is added, the chunk changes from CH_ARRAY type to
CH_TABLE type.
2021-07-02 22:21:58 +02:00
Patric Stout
7dd5fd6ed4 Feature: framework to make savegames self-descriptive
We won't be able to make it fully self-descriptive (looking at you
MAP-chunks), but anything else can. With this framework, we can
add headers for each chunk explaining how each chunk looks like
in detail.

They also will all be tables, making it a lot easier to read in
external tooling, and opening the way to consider a database
(like SQLite) to use as savegame format.

Lastly, with the headers in the savegame, you can freely add
fields without needing a savegame version bump; older versions
of OpenTTD will simply ignore the new field. This also means
we can remove all the SLE_CONDNULL, as they are irrelevant.

The next few commits will start using this framework.
2021-07-02 22:21:58 +02:00
translators
513641f9ba Update: Translations from eints
english (us): 1 change by 2TallTyler
german: 1 change by Wuzzy2
dutch: 1 change by Afoklala
2021-07-02 18:50:57 +00:00
Patric Stout
75b6051b7a Change: move sensitive information to secrets.cfg and private information to private.cfg
We often ask people for their openttd.cfg, which now includes their
passwords, usernames, etc. It is easy for people to overlook this,
unwillingly sharing information they shouldn't.

By splitting this information over either private.cfg or secrets.cfg,
we make it more obvious they shouldn't be sharing those files, and
hint to what is inside them.
2021-07-02 14:30:14 +02:00
Patric Stout
4f3bf84af4 Codechange: simplify SaveVersionInConfig()
Clearly someone really wanted to generalize the function, but
in reality it makes it a lot longer than needed. Let's keep it
simple.
2021-07-02 14:30:14 +02:00
Patric Stout
66dc0ce196 Codechange: C++-ify the usage of IniFile in settings.cpp
Instead of creating the object on heap and use a pointer, create
the object on stack and use a guaranteed-not-null pointer.
The size of IniFile doesn't warrent the forcing to heap.

Additionally, use a subclass instead of a function to do some
initial bookkeeping on an IniFile meant to read a configuration.
2021-07-02 14:30:14 +02:00
Patric Stout
a42251fc72 Codechange: move network-related settings out of settings.ini
This to prepare the code to split up network-related settings
into private / secrets / generic.
2021-07-02 14:30:14 +02:00
Rubidium
9c7a7b53a1 Codechange: use a contructor for NewsItem to set the values
And use std::unique_ptr to manage the memory of the allocated data
2021-07-01 19:04:38 +02:00
rubidium42
9a7750f14e Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function 2021-07-01 19:04:38 +02:00
rubidium42
aa9818db90 Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete 2021-07-01 19:04:38 +02:00
translators
df601b8559 Update: Translations from eints
finnish: 1 change by hpiirai
2021-06-30 18:53:37 +00:00
Jonathan G Rennison
b23ba0c6c0 Fix founding towns not filling the nearby station cache, causing desyncs
See: https://github.com/OpenTTD/OpenTTD/issues/9407
2021-06-30 17:30:08 +01:00
Jonathan G Rennison
587039daba Use CMD_LOG_AUX for all goal/story related commands 2021-06-30 17:14:27 +01:00
Jonathan G Rennison
232cfee8b5 Fix house placing picking wrong town when placing outside town enabled 2021-06-30 17:14:05 +01:00
Jonathan G Rennison
1ef18caa9a Show town window debug button in scenario editor 2021-06-30 17:13:29 +01:00
Jonathan G Rennison
98e2cb2e3e Open routing restriction window on ctrl-click of any non-prog signal
See: #294
2021-06-30 17:10:08 +01:00
Patric Stout
d38079d053 Fix f7e390bd: freeaddrinfo() is not guaranteed to handle a nullptr graceful (#9404) 2021-06-29 23:02:25 +02:00
Loïc Guilloux
b6fb020388 Change: [strgen] Change warnings for translations into infos (#9406)
Unless invoked with -w, --warning ("print a warning for any untranslated strings") or -t, --todo ("replace any untranslated strings with '<TODO>'").

Eints normally fixes the warnings after a Pull Request, so it is not really useful information for the developer to see as a warning.
2021-06-29 22:19:24 +02:00
Jonathan G Rennison
0f73fe765f Merge pull request #293 from VacuumBreather/station_cargo_history
Add station cargo history
2021-06-29 19:53:18 +01:00
translators
8336d21b25 Update: Translations from eints
swedish: 27 changes by joeax910
korean: 4 changes by telk5093
russian: 1 change by Ln-Wolf
portuguese: 1 change by azulcosta
2021-06-29 18:52:43 +00:00
Jonathan G Rennison
b438380a1e Add station cargo history save/load support 2021-06-29 19:37:20 +01:00
Jonathan G Rennison
37c7cf9899 Remove number of days from hard-coded X axis label string
To support later day number changes and/or translations
2021-06-29 19:37:20 +01:00
Jonathan G Rennison
5698507d0b Change station cargo history storage format
Use uint16 to avoid truncation issues
Don't reserve memory for unused cargoes
Store history as ring buffer
Update history graph immediately on storage date
Show total waiting cargo
2021-06-29 19:37:20 +01:00
Jonathan G Rennison
f901da344e Add CargoTypesBit helper method to CargoSpec 2021-06-29 18:06:12 +01:00
Jonathan G Rennison
0b4dc151d5 Rename to BuildVehicleWindowCommon to BuildVehicleWindowBase
See: #287
2021-06-29 00:56:11 +01:00
Jonathan G Rennison
0773dde669 Merge pull request #287 from VacuumBreather/advanced_train_purchase_window
Advanced train purchase window
2021-06-29 00:43:26 +01:00
Jonathan G Rennison
dd5866c2c2 Fix loco and wagon button rows having different heights 2021-06-29 00:29:19 +01:00
Jonathan G Rennison
5e418128da Add setting for whether to use dual pane train purchase window 2021-06-29 00:11:07 +01:00
Jonathan G Rennison
70f7509126 Create common base class for build vehicle windows 2021-06-29 00:08:49 +01:00