1
0
Fork 0
Commit Graph

366 Commits (2ae84f3c9eb49488298dc3b0e8e079a1ee84ffb3)

Author SHA1 Message Date
Peter Nelson 2ae84f3c9e
Codechange: CargoSpec::Iterate already tests cargo validity. (#13941) 2025-04-01 18:23:26 +01:00
Peter Nelson 2909a14374 Codechange: Include table/strings.h in files that use StringIDs.
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Rubidium 754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Rubidium fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Peter Nelson 6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Peter Nelson 20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. (#13551)
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Peter Nelson d61b376998
Codechange: Use EnumBitSet for CargoClasses. (#13491) 2025-02-08 08:46:38 +00:00
Peter Nelson 40aeedeade Codechange: Use EnumBitSet for callback masks. 2025-01-31 17:08:24 +00:00
Peter Nelson 917d5cc75d
Codechange: Use EnumBitSet for RoadTypeFlags and RailTypeFlags. (#13415) 2025-01-30 22:08:51 +00:00
Peter Nelson afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Rubidium 4099acb946 Codechange: replace BSWAP32/BSWAP16 with std::byteswap 2025-01-28 19:22:12 +01:00
Jonathan G Rennison e3e3cb13c6 Change: Include new cargo classes in dump cargo types console command 2024-12-18 07:50:33 +01:00
Peter Nelson 059a4b22f7 Codechange: Use projection-based std::range::find where possible.
This simplifies matching by class members and avoids wordy lambdas.
2024-11-24 10:36:03 +00:00
Peter Nelson 908ee7292b
Codechange: Replace all FILE * with FileHandle RAII class. (#12718)
This removes the need to manually ensure all files are closed.
2024-09-16 08:45:26 +01:00
Rubidium 3094b0ce1d Feature: admin support for password authentication without sending password
Using either password authenticated key exchange (PAKE) or authorized keys
2024-07-01 17:16:55 +02:00
Michal Charemza c4b1596c97
Add: [Console] schedule command to execute a script file next in-game month (#12761) 2024-07-01 11:33:42 +02:00
Peter Nelson f6c5da4cad
Fix: Incorrect dump_info output with labels outside of ascii range. (#12723)
An unspecified cargo label is 0x00000000, which terminates C-strings.
2024-05-27 12:44:49 +01:00
Rubidium b2f1a06def Change: support listing/updating authorized keys of companies by the admin in the console 2024-05-22 22:20:10 +02:00
Rubidium a9318cf653 Cleanup: remove UI for changing the password 2024-05-07 00:03:15 +02:00
Rubidium 9dc1fdc385 Cleanup: remove client side password checks when moving to a different company 2024-05-07 00:03:15 +02:00
Rubidium a002803d1c Remove: autoclean_unprotected settings; all companies will be protected 2024-05-07 00:03:15 +02:00
Peter Nelson e20f48799e
Codechange: Make StringToContentType() clearer. (#12566)
Decouples string to ContentType mapping from position within enum.

Slightly less efficient, but removes lengthof, array indices, and casting.
2024-04-24 21:26:31 +01:00
ladysadie 727392e0b3
Codechange: Remove per font AA settings. (#12413)
OpenTTD will use the global AA font setting for all fonts from now on.
2024-04-15 21:44:33 +02:00
Peter Nelson 4eaeccdaeb
Codechange: Introduce FioRemove() to remove files. (#12491)
New function FioRemove() handles OTTD2FS conversion, and uses std::filesystem::remove instead of unlink, all in one location.
2024-04-14 23:43:50 +01:00
merni-ns 92a171c3e0
Doc: Improve the output and documentation of the font command. (#12392)
Now that the default font =/= sprite font, there is a different way to invoke the sprite font, and default size applies to default (not sprite).
Also, interface scaling now affects the font size.
2024-04-01 17:55:44 +01:00
Rubidium 0f25eaa271 Fix: crash to desktop when attempting to join a company while not joined (yet) 2024-03-23 13:33:41 +01:00
Rubidium 7580eac2d5 Codechange: create helper class for useful NetworkAuthorizedKeys functions 2024-03-18 22:56:58 +01:00
Rubidium 4af089b9be Feature: console command to change authorized keys 2024-03-17 21:21:33 +01:00
Rubidium b7dfa3eb90 Feature: authorized key authentication for rcon 2024-03-17 20:36:25 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium aff09306de Fix #12076: Do not allow 'join' command on dedicated servers 2024-03-02 14:35:26 +01:00
Loïc Guilloux 79374bc003
Fix #12074: Don't allow "part" command for dedicated servers (#12075) 2024-02-12 19:28:30 +00:00
Peter Nelson 2fd9096070
Change: Decouple and remove landscape-dependent cargo types. (#11719)
Cargo types of default engines, industries and houses are now specified in terms of label.
2024-02-04 10:16:08 +00:00
Patric Stout 0dfba564ab
Add: "restart current" console command to regenerate the map based on current settings (#11963) 2024-02-03 14:48:54 +00:00
Patric Stout a0c480c4e4
Change: "restart" now uses your newgame settings, where "reload" uses the current settings (#11962) 2024-02-03 10:19:47 +00:00
Patric Stout a1487ce620
Add: list_[scenario|heightmap] and load_[scenario|height] console commands (#11867) 2024-01-23 14:01:25 +01:00
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 2024-01-22 19:22:45 +00:00
Patric Stout 0b7410d979
Codechange: compile-time validate the string format of IConsolePrint (#11804)
This means we can no longer use runtime picking what string to use.
2024-01-16 21:04:35 +00:00
Peter Nelson 33ff64ef74
Codechange: Simplify ConvertDateToYMD by returning YearMonthDay instead of outputting to a pointer. (#11637) 2023-12-28 21:34:08 +00:00
Peter Nelson da2d21f5b0
Fix: Left-over printf-style format passed to fmt. (#11584) 2023-12-14 19:35:35 +00:00
Peter Nelson 9602de474d Codechange: Use iterators and/or range-for on cargo related loops. 2023-10-19 17:03:25 +01:00
Peter Nelson 49dae08a3b Codechange: Add missing override specifiers. 2023-09-25 21:27:45 +01:00
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
PeterN acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. (#11287) 2023-09-11 08:55:12 +00:00
Bouke Haarsma 7e54418022
Codechange: workaround CMake/Xcode duplicate file name issue (#11186)
Having a library with files with the same name isn't supported in CMake's Xcode project file generation: https://gitlab.kitware.com/cmake/cmake/-/issues/20501. One of the files is renamed to work around this bug.
2023-09-02 19:46:52 +02:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium 70de70bdcd Codechange: refactor code to remove need for stredup 2023-06-18 21:22:28 +02:00
Rubidium d4c2043294 Codechange: remove a number of unneeded c_str() calls 2023-06-15 22:14:45 +02:00
Andrii f26de0d2f9
Fix #10982: No help text for gamelog command (#10984) 2023-06-13 08:33:33 +00:00