Commit Graph

170 Commits (3a676a5af09c94e9de8a1ce584156fb04a6b2b00)

Author SHA1 Message Date
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 5 months ago
Tyler Trahan 2a62caa30b Codechange: Use Ticks for BaseConsist timetable fields 6 months ago
Peter Nelson 9f853c10b0 Codechange: Add compile-time check that variable size matches saveload entry. 6 months ago
Peter Nelson cb53fed229 Codechange: Move VarType helpers to allow earlier use. 6 months ago
Peter Nelson 54ba757910
Fix #11556: Missing saveload change for OrderBackup. (#11557)
Apply the saveload change from #11468 to OrderBackup and bump again.
6 months ago
Tyler Trahan d28caa3ced Codechange: Use ticks for timetable start date 6 months ago
Tyler Trahan 2dd2910ab3
Feature: Cheat to fix station ratings at 100% (#11346) 7 months ago
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
Patric Stout df400ef84a
Fix: only count distance traveled in vehicles for cargo payment (#11283)
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!

Based on patch by dP.
9 months ago
Patric Stout b0e73277d6
Codechange: remove loaded_at_xy from CargoPacket as it was unused (#11276) 9 months ago
Tyler Trahan 9a602ff304
Fix #10334: Store separate newgrf-safe version of date_of_last_service. (#11124)
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.

Co-authored-by: Peter Nelson <peter1138@openttd.org>
10 months ago
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
11 months ago
rubidium42 9f6fec01cd
Codechange: rename cargo aging days to periods, as they are not really days (#11112) 11 months ago
Rubidium 993f90b6a0 Codechange: let GenerateDefaultSaveName return std::string 1 year ago
PeterN 584faaf064
Change: Reorganise industry accept/produce arrays. (#10853)
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
1 year ago
Rubidium e9c03f0dad Cleanup: remnants of C-style strings in saveload 1 year ago
Rubidium 52a7c69974 Codechange: rework Gamelog changes from union to classes 1 year ago
Patric Stout 199e41c762
Codechange: use default dtor instead of empty (#10826) 1 year ago
Patric Stout 7634553d22 Feature: opt-in survey when exiting a game
On first start-up, the game will ask if you want to participate
in our automated survey. You have to opt-in, and can easily opt-out
(via the Options) at any time.

When opt-in, whenever you exit a game, a JSON blob will be send
to the survey server hosted by OpenTTD. This JSON blob contains
information that gives a global picture of the game just played:
- What settings were used
- How many humans vs AIs
- How long the game has been played
- Basic information about the OS / CPU

All this information is kept very generic, so there is no
chance we send private information to our survey server.
Nothing in the JSON blob could identify you as a person; it
mostly tells about the game played. At any time you can see
what the JSON blob includes, by pressing the "Preview Survey
Results" button in-game.
1 year ago
Michael Lutz 72c7536325
Codechange: Use a dedicated variable for disaster vehicle action state. (#10798) 1 year ago
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Peter Nelson 912eb68981 Change: Extend entity override manager and station spec lists to support 16 bit IDs. 1 year ago
Peter Nelson 7ccdefa1c1 Change: Increase vehicle random data from 8 to 16 bits. 1 year ago
Rubidium ee723f26ba Codechange: Make FileToSaveLoad's title std::string and simplify assignments 1 year ago
Patric Stout 31ad990831
Codechange: move tick-counter into TimerGameTick (#10712) 1 year ago
Patric Stout ed83c4b0da
Change: replace per-AI "start_date" with a global "competitors_interval" (#10653)
The per-AI "start_date" is a lot of custom code, and was rarely
used in the way it was meant.

While at it, also ported this part over to the new timer system.
1 year ago
Tyler Trahan 646a7e625b
Change: Use seconds for Linkgraph update settings (#10610) 1 year ago
Charles Pigott 8aea13a85b Codechange: Use fmt for SlErrorCorruptFmt 1 year ago
dP e2f1cd44dc
Change: Increase max cargo age and let min cargo payment approach zero. (#10596)
Co-authored-by: Michael Lutz <michi@icosahedron.de>
1 year ago
Rubidium 9d2a0f3d0b Change: make GetPartialZ consistent, meaning Z of adjacent slopes continue
Previously, on a straight line of a one corner up slope with the adjacent
steep sloop the Z would increase one step every two sub pixels, except for one
case where one sub pixel is skipped. Similarly, a steep slope with two
adjacent one corner up slopes, would have a bump in the height line along the
diagonal whenever it enters/leaves the steep slope tile.
1 year ago
PeterN f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. (#10594)
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
1 year ago
Tyler Trahan e5438891e2
Cleanup: Keep spacing saveload versions by groups of five (#10576) 1 year ago
SamuXarick 6eabbaa751 Fix #10469, 5e14a20: [Script] League Table rating element is a int64 everywhere else 1 year ago
Michael Lutz 7352f812e6 Codechange: [Linkgraph] Only store present link graph edges and not all possible edges. 1 year ago
Michael Lutz 178249e7cc Codechange: Saveload macros for entries with a custom table name. 1 year ago
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 1 year ago
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 1 year ago
Rubidium 5863d78cb4 Codechange: use commented out code, or guard by #ifdef 1 year ago
Michael Lutz 150f05dc15
Change: Heading for 14 now. (#10302) 1 year ago
Tyler Trahan c19abebf8d
Feature: Multi-track level crossings (#9931) 2 years ago
Nicolas Chappe f8a7b76675 Fix #9665: [Linkgraph] Fix travel times of non-direct journeys 2 years ago
dP 548f0496a9
Change: Make _tick_counter 64bit to avoid wrapping (#10035) 2 years ago
SamuXarick e404d16929
Fix #9591: Update station docking tiles upon placing a water object on a docking tile (#9594) 3 years ago
Loïc Guilloux 38a64eb2aa
Change: Allow all tiles around docks to be docking tiles (#9578) 3 years ago
Patric Stout 394c749b6b
Change: Heading for 13 now (#9573) 3 years ago
Nicolas Chappe 977604ef08 Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
3 years ago
Loïc Guilloux 460991ecf4
Feature: Persistant rotation of numbered auto/netsave after restart (#9397)
It was always starting from 0 on openttd restart.
Now the most recent auto/netsave number will be used as a base to generate the next filename.
3 years ago
Stephan a70aa5df49
Add #9188: netsave now keeps multiple version around, similar to autosave (#9395) 3 years ago
glx22 6e627f35ac Cleanup: Remove now unneeded ChunkHandler members 3 years ago
glx22 c1a9fe6fbd Codechange: Use static array of references to ChunkHandler 3 years ago