Rubidium
bab5a8a787
Codechange: use std::source_location over __FILE__ and __LINE__ for Backup
3 months ago
Loïc Guilloux
845b894fd8
Remove: [Script] random_deviation from setting description table ( #12221 )
3 months ago
Loïc Guilloux
fad77261ea
Fix f6dd505: Missing savegame conversion for current_order ( #12188 )
4 months ago
Loïc Guilloux
3ffa176870
Change: [Script] Store randomizers in savegame ( #12063 )
4 months ago
Tyler Trahan
b2b4cceb49
Fix #11997 : Adjust economy date by 1920 when loading TTD/TTO savegames ( #12007 )
4 months ago
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
4 months ago
Patric Stout
849fd5ae03
Change: [Script] replace easy/medium/hard values with default value ( #11959 )
4 months ago
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
4 months ago
Peter Nelson
60dcf3b5e2
Codechange: Rename TownEffect to TownAcceptanceEffect.
...
This makes it clearer that TownEffect only affects acceptance behaviour.
4 months ago
Loïc Guilloux
ab1407fc43
Fix: [Script] Apply random deviation only at script start ( #11944 )
5 months ago
dP
897b59c158
Add: [GS] Allow to set max loan for each company separately ( #11224 )
5 months ago
Koen Bussemaker
5a55c4a934
Feature: [NewGRF] Allow higher max speeds for ships
5 months ago
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
5 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
5 months ago
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
5 months ago
Peter Nelson
c0ab436077
Codechange: Store Colours in Colours type. ( #11625 )
...
This reduces casts, some magic numbers, and introduces a bit of type-safety.
5 months ago
Peter Nelson
400ae65ff2
Codechange: Redefine some cargo-related values in terms of CargoID instead of CargoType.
...
Values used as special filter types are now defined as offsets from NUM_CARGO instead of confusingly reusing CARGO_NO_REFIT/CARGO_AUTO_REFIT types.
5 months ago
Peter Nelson
952d111b94
Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
...
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
5 months ago
Kuhnovic
f1e999ec59
Feature: Region-based pathfinder for ships ( #10543 )
5 months ago
Rubidium
e3f49ee7a0
Codechange: coding style fixes
5 months ago
Peter Nelson
bfb4254226
Fix: Changing default livery did not propagate to group liveries.
...
#11614 attempted to address this but did not handle 2CC properly, and changes to the default livery were not handled.
6 months ago
Tyler Trahan
1f41e773d6
Codechange: Use consistent name for bay road stops
...
As of #10494 , this is how we describe original dead-end road stops.
7 months ago
Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Peter Nelson
9602de474d
Codechange: Use iterators and/or range-for on cargo related loops.
8 months ago
Peter Nelson
b5dc9328f2
Change: Store station blocked/wires/pylons flags in map. ( #11337 )
...
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.
This potentially affects rail pathfinding performance.
Savegame version is not bumped, as the flags can just be updated every
time.
9 months ago
PeterN
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
9 months ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
9 months ago
Patric Stout
07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype ( #11190 )
...
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
10 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
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
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Rubidium
acec34a0fe
Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex
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
Peter Nelson
e6740046ee
Codechange: Use range-for iteration.
1 year ago
Peter Nelson
cef3a2570d
Codechange: Use standard iterator-erase-loop pattern.
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Rubidium
a312a6c1b2
Codechange: make md5sumToString std::string compatible
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
1 year ago
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares ( #10709 )
1 year ago
Rubidium
33c4fbff8f
Codechange: use fmt::format_to instead of seprintf to fill load crash message
1 year ago
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Rubidium
f5f6306af3
Codechange: use string/fmt instead of printf for ShowInfo(F)
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
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