summaryrefslogtreecommitdiff
path: root/src/table
AgeCommit message (Collapse)Author
2021-07-02Add: store headers for most savegame chunksPatric Stout
When a header is added, the chunk changes from CH_ARRAY type to CH_TABLE type.
2021-07-02Feature: framework to make savegames self-descriptivePatric Stout
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-02Change: move sensitive information to secrets.cfg and private information to ↵Patric Stout
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-02Codechange: move network-related settings out of settings.iniPatric Stout
This to prepare the code to split up network-related settings into private / secrets / generic.
2021-06-28Change: [Emscripten] set default scrolling mode to non-pointer-locking (#9191)embeddedt
2021-06-26Fix #9386: compilers failing to compile with LTO by using variants instead ↵rubidium42
of new + unique_ptr With std::variant all memory can be figured out at compile time, so the compiler needs to keep track of fewer elements. It also saves out a unique_ptr and its memory management, over a slight impact for resolving a setting.
2021-06-26Codechange: use C-style strings instread of std::string in the SettingDesc ↵rubidium42
constructor This as using std::string causes much more variables to be tracked, potentially causing problemes for certain compilers in certain situations
2021-06-26Codechange: remove overloading on UpdateServiceIntervalrubidium42
One UpdateServiceInterval has two parameters to update the service interval for a vehicle type, the other for all vehicle types at once. Rename the latter to help with function resolution for the introduction of variants.
2021-06-15Change: prefix SL_ARR with the length of the arrayPatric Stout
This means that during loading we can validate that what is saved is also that what is expected. Additionally, this makes all list types similar to how they are stored on disk: First a gamma to indicate length, followed by the data. The size still depends on the type.
2021-06-13Codechange: make the name of SettingDesc a std::stringrubidium42
2021-06-10Feature: Configurable subsidy durationTyler Trahan
2021-06-06Codechange: merge guiflags and flags in settings .ini filesPatric Stout
It was rather confusing which one was for what, especially as some SaveLoad flags were settings-only. Clean up this mess a bit by having only Setting flags.
2021-06-03Codechange: rename SettingGuiFlag to SettingFlag (#9332)Patric Stout
It is a lovely organicly grown enum, where it started off with GUI-only flags, and after that a few flags got added that can be considered GUI-only (the GUI disables/enables based on them), to only have flags added that has nothing to do with the GUI. So be less confusing, and rename them to what they do. Additionally, I took this opportunity to rename 0ISDISABLED to reflect what it really does.
2021-05-30Codechange: use setting name instead of index for HandleOldDiffCustom() (#9311)Patric Stout
2021-05-29Codechange: use setting name instead of index for CmdChange(Company)Setting ↵Patric Stout
(#9306) This is mostly done as there are now constraints on settings.ini you might not expected. For example, conditional settings always have to come last, as otherwise they would influence the index.
2021-05-29Codechange: Rename window related DeleteXXX to match new behaviourglx22
2021-05-29Doc: describe what each settings-file is aboutPatric Stout
2021-05-29Codechange: move all settings.ini files to table/settingsPatric Stout
2021-05-29Cleanup: set the base in the setting templates, instead of defining the base ↵rubidium42
for every setting This has the added benefit of not getting mistaken that multiple bases can be used for the same SettingTable
2021-05-29Fix: [Network] Prevent an empty server name to be set anywhererubidium42
2021-05-29Codechange: use separate pre and post callbacks for int settingsrubidium42
2021-05-29Codechange: use separate pre and post callbacks for string settingsrubidium42
2021-05-27Codechange: remove SettingDescType in lieu of the actual classesrubidium42
2021-05-27Codechange: let OneOfMany and ManyOfMany be their own classes as wellrubidium42
2021-05-27Codechange: make BoolSettingDesc its own sub classrubidium42
2021-05-27Codechange: make sub classes of SettingDesc for the different types of settingsrubidium42
2021-05-27Codechange: make SettingDesc an instance in the setting table to allow for ↵rubidium42
sub classes
2021-05-27Codechange: use initializer_lists for the settings tablesrubidium42
Not using vectors as those require copying from the initializer list and that makes unique_ptrs to the actual SettingDesc objects later impossible.
2021-05-27Cleanup: remove and/or fix some confusing commentsrubidium42
The comments for SettingDescType; it is a byte, so not 4 bytes and since it is not a flag there are about 250 other possibilities left instead of 9. SettingGuiFlag is uint16 so has 2 bytes allocated. SettingDescGlobVarList and related comments imply that global vars cannot be used elsewhere, but they are used for settings just fine. Even then the type is not used anywhere else but the definition of the table.
2021-05-15Change: Use gender-neutral pronounsrubidium42
2021-05-13Codechange: add constant for number of original cargoes.frosch
2021-05-13Codechange: clean up C-string support from settingsrubidium42
2021-05-13Codechange: move misc settings to std::stringrubidium42
2021-05-13Codechange: move font settings to std::stringrubidium42
2021-05-13Codechange: move currency settings to std::stringrubidium42
2021-05-13Codechange: move locale settings to std::stringrubidium42
2021-05-13Codechange: move client name in settings to std::stringrubidium42
2021-05-13Codechange: move server name/id in settings to std::stringrubidium42
2021-05-13Codechange: move hostnames in settings to std::stringrubidium42
2021-05-13Codechange: move passwords in settings to std::stringrubidium42
2021-05-13Fix: Correct name of Golub-DobrzynPaweł Świątkowski
2021-05-13Fix: Replace Susz with LesznoPaweł Świątkowski
Susz is masculine, not neuter, so it should result in "Susz Mazowiecki", "Susz Morski", and not "Susz Mazowieckie" or "Susz Morskie". However, because order of the names whould not be changed, it was replaced with Leszno, which is neuter.
2021-05-12Fix #9186: Fix incorrect bounding box height causing station sprite glitch. ↵PeterN
(#9187) Increased height of small station building bounding box to cover the build rather than just the platform.
2021-05-05Change: [Network] Update server's NetworkServerGameInfo only when neededrubidium42
Split the updating in a "static" version that only needs to be called when a new map is loaded or some settings are changed, and a "dynamic" version that updates everything that changes regularly such as the current game date or the number of spectators.
2021-04-29Codechange: use NetworkAddress instead of two host/port variables where possiblePatric Stout
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
2021-04-27Feature: allow non-ASCII currency separatorsrubidium42
2021-04-24Change: use icons to indicate you/host in Online Players GUIPatric Stout
2021-04-24Feature: rework in-game Online Players GUIPatric Stout
The GUI now more clearly shows some basic information about the server you joined, your client name (and the ability to change it), and what players are in which company. It also contains useful buttons to press to join companies, chat with other people, and for admins to kick/ban people. Additionally, renamed "advertised" to "visibility"; this has to do with future additions, but also because it is more clear in wording.
2021-04-20Remove: "language" field from server/clientPatric Stout
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-11Feature: allow a toggle to enable/disable vsyncPatric Stout
Vsync should be off by default, as for most players it will be better to play without vsync. Exception exist, mainly people who play in fullscreen mode.