1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00
Commit Graph

28559 Commits

Author SHA1 Message Date
Tyler Trahan
82ce84e5f9 Codechange: Use economy timer for vehicle day proc 2024-01-22 08:26:38 -05:00
Tyler Trahan
255b2e8a1a Doc: Clarify in economy and calendar timer files the usecases for each 2024-01-22 08:26:38 -05:00
Tyler Trahan
01297cfff2 Codechange: Sync calendar and economy dates when loading NewGRFs 2024-01-22 08:26:38 -05:00
Tyler Trahan
86b66eba6c Codechange: Use economy dates for linkgraphs 2024-01-22 08:26:38 -05:00
Tyler Trahan
ec7c4de29e Codechange: Use economy dates for timetables 2024-01-22 08:26:38 -05:00
Tyler Trahan
941fed6afc Codechange: Use economy dates for subsidy date displays 2024-01-22 08:26:38 -05:00
Tyler Trahan
ca4c010898 Codechange: Use economy dates for vehicle service dates 2024-01-22 08:26:38 -05:00
Tyler Trahan
02cc81cd94 Codechange: Use economy dates when drawing graphs 2024-01-22 08:26:37 -05:00
Tyler Trahan
44e86b5c75 Codechange: Track the company age in economy years 2024-01-22 08:26:37 -05:00
Tyler Trahan
6b1ed89445 Codechange: Use economy dates to clean up old news items 2024-01-22 08:26:37 -05:00
Tyler Trahan
98fd5a46be Codechange: Use economy dates for economy statistics and interest payments 2024-01-22 08:26:37 -05:00
Tyler Trahan
c03487f099 Codechange: Use economy dates for industry production changes and closures 2024-01-22 08:26:37 -05:00
Tyler Trahan
4da107e6f1 Codechange: Use economy dates when debugging 2024-01-22 08:26:37 -05:00
Tyler Trahan
b2efe18ab8 Codechange: Split daily/monthly/yearly timers into economy and calendar timers 2024-01-22 08:26:37 -05:00
Tyler Trahan
3530b542e7 Codechange: Update both calendar and economy dates when changing date in Scenario Editor 2024-01-22 08:26:37 -05:00
Tyler Trahan
ce18f4faec Codechange: Sync economy and calendar dates when using date cheat 2024-01-22 08:26:37 -05:00
Tyler Trahan
b8e404048f Codechange: Sync economy and calendar dates when starting a new game 2024-01-22 08:26:37 -05:00
Tyler Trahan
e21c6cfb8a Codechange: Sync economy and calendar dates when loading old saves 2024-01-22 08:26:30 -05:00
Tyler Trahan
a2cceb9865 Codechange: Add economy date timer and variables 2024-01-22 08:26:04 -05:00
Tyler Trahan
123e51db77 Codechange: Move TimerGameCalendar functions to a parent TimerGameCommon class 2024-01-22 08:26:04 -05:00
EmperorJake
419f48dfb3 Change: set amount of smoke/sparks to "realistic" by default (#11624) 2024-01-21 21:23:35 +00:00
Kuhnovic
b38d3c2208 Change: simplified water region evaluation, removed savegame data (#11750) 2024-01-21 20:56:50 +00:00
Patric Stout
1985e7415b Fix: smooth-scrolling large distances didn't got smoothly in one direction (#11861) 2024-01-21 20:52:44 +00:00
c7d5cedc7b Codechange: Replace C-style TICC/TOCC macros with C++ RAII implementation. (#11857)
Usage is more robust, and will always include timing when the TicToc object goes out of scope.
2024-01-21 18:38:40 +00:00
691c628b07 Codechange: Use named initialization for unscaled WidgetDimensions. (#11859)
Remove now-unused WD_* enums.
2024-01-21 18:10:49 +00:00
Patric Stout
0c81579363 Fix #6377: two tarballs with the same folder in them were considered as one (#11855) 2024-01-21 19:06:58 +01:00
SamuXarick
6588680ccc Revert #6923: start_date parameter is no longer in use
There was an issue with the start_date parameter for AIs. It did not let Random AIs to have their configure button clickable once the game has started, and this was due to the start_date not being pushed into the config.

But now that start_date is no longer in use since #10653, this workaround can be safely removed.
2024-01-21 18:49:08 +01:00
Patric Stout
f35e257adc Fix #9722: create vital windows as soon as local_company is set (#11858)
Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.
2024-01-21 17:36:33 +00:00
a9a0bfffc1 Change: Disable building rail infrastructure if train build limit is zero. (#11847)
This matches the behaviour of road, ship and aircraft infrastructure.
2024-01-21 16:51:23 +00:00
89474701bc Codechange: Use templates to deduplicate goal widgets. (#11852) 2024-01-21 16:23:17 +00:00
Patric Stout
fa8294ebe7 Remove: rdtsc and TIC/TOC based on CPU ticks (#11856)
Use TIC/TOC based on std::chrono instead. This information is also
easier to compare with others, as although it depends on CPU, it
means a bit more if "yours takes 4ms and mine takes 10ms".
2024-01-21 15:38:15 +00:00
Patric Stout
fe035c306e Codechange: prevent out-of-bound read (even if the result is never used) (#11853) 2024-01-21 14:25:00 +00:00
8797cc7ef2 Codechange: Replace GroupStatistics' num_engines with std::map. (#11849)
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.
2024-01-21 14:09:44 +00:00
c0ab436077 Codechange: Store Colours in Colours type. (#11625)
This reduces casts, some magic numbers, and introduces a bit of type-safety.
2024-01-21 13:23:04 +00:00
0841978304 Codechange: Use vector and iterators to store old/new vehicles during autoreplace. (#11851)
This avoids malloc/free of 3 arrays along index counting, and the data for each part is kept together.
2024-01-21 09:21:22 +00:00
Patric Stout
66a16d5ddf Fix: [CI] wait for all targets to succeeded before uploading to any (#11845)
Otherwise it is possible Steam upload happens while CDN upload
does not, which is a bit awkward.
2024-01-20 23:51:50 +00:00
Patric Stout
526a0db956 Fix: [CI] don't share Rust cache between legacy and generic linux (#11848)
The resulting binaries of generic can't run on legacy.
2024-01-20 22:05:56 +00:00
Rubidium
2d77f09a81 Codechange: use std::shared_ptr for vector of TCPConnecters 2024-01-20 23:03:44 +01:00
Patric Stout
71b8801b61 Fix bd85f61a: [Linux] don't include sys/random.h on older glibc systems (#11844) 2024-01-20 20:43:06 +00:00
Tyler Trahan
fa479c4a7c Cleanup: Describe modifier keys more consistently in tooltips (#11716) 2024-01-20 19:26:39 +00:00
Tyler Trahan
500870627d Change: Rewrite a few main toolbar tooltips (#11717) 2024-01-20 13:49:34 -05:00
translators
4d79d86812 Update: Translations from eints
catalan: 18 changes by J0anJosep
2024-01-20 18:38:38 +00:00
d6ccfdbbd9 Fix #11827: Make Layouter::GetCharPosition() aware of ligatures. (#11831)
When ligatures happen the precise individual character position is not known, so instead return the previous position (which is that of the ligature.)
2024-01-20 17:16:42 +00:00
Rubidium
086cbd0d72 Codechange: add constexpr to math functions where applicable 2024-01-20 17:30:36 +01:00
Rubidium
dfe70181f1 Codechange: add constexpr to bitmath functions where applicable 2024-01-20 17:30:36 +01:00
Rubidium
4c51534b6a Remove: LeastCommonMultiple / GreatestCommonDivisor
Use std::lcm / std::gcd instead.
2024-01-20 16:45:21 +01:00
Rubidium
1403f24fa9 Codechange: replace LeastCommonMultiple with std::lcm 2024-01-20 16:45:21 +01:00
Patric Stout
bd85f61a40 Change: use a stronger hash and actual random information to generate Uids 2024-01-20 14:23:03 +01:00
Patric Stout
37244bc8c5 Codechange: MacOS already has MIN/MAX macros defined
This is caused because we use PreCompile Headers, and one of them
includes a system headers which defines MIN/MAX.
2024-01-20 14:23:03 +01:00
Patric Stout
63a3d56b8a Add: monocypher 4.0.2
Monocypher will take care of all our encryption needs; as most
OSes and vcpkg doesn't have it available, we vendor it.
2024-01-20 14:23:03 +01:00