Patric Stout
8f22066b9a
Fix #12147 : reset all saved settings to their default before loading a game ( #12210 )
2024-03-02 16:05:43 +01:00
Peter Nelson
f0a891c4f7
Cleanup: Remove unused last_num_specs from SlRoadStopTileData. ( #12198 )
...
Inadvertently copy & pasted from another Sl handler.
2024-03-01 02:00:13 +00:00
Loïc Guilloux
fad77261ea
Fix f6dd505: Missing savegame conversion for current_order ( #12188 )
2024-02-27 21:25:49 +01:00
Peter Nelson
56cf89d189
Change: Use bitmap for free unit ID generation. ( #12165 )
...
This improves performance of finding the next free unit number for a vehicle.
Based loosely on pool's used slot bitmap.
2024-02-25 12:36:13 +00:00
Rubidium
4c117dd2d8
Revert #11993 : new number format system does not and cannot work for CJK languages
...
There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.
This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
2024-02-22 20:40:12 +01:00
Rubidium
a4d4301a0c
Codechange: We are heading to 15
2024-02-18 21:48:54 +01:00
Rubidium
609d0071d5
Change: Remove saving of digit group and decimal separator configurations from the savegame
2024-02-17 14:33:16 +01:00
Rubidium
e67fc33172
Codechange: Add support for NULL strings in SaveLoadCompat
2024-02-17 14:33:16 +01:00
Jonathan G Rennison
5ab5f4ace7
Codefix df691eb3: Reloading GRFs destructed small UFO targeting road vehicle ( #12072 )
2024-02-12 00:51:18 +00:00
Loïc Guilloux
3ffa176870
Change: [Script] Store randomizers in savegame ( #12063 )
2024-02-12 01:22:57 +01:00
Peter Nelson
df691eb31e
Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle. ( #12064 )
...
* Codechange: Don't scan vehicle pool to find targeting disaster vehicle when deleting any vehicle.
When deleting a vehicle, the vehicle pool is scanned to find a targetting disaster vehicle. With lots of vehicles this can take some time, especially when deleting multiple consecutive vehicles.
Disasters vehicles can actually only target road vehicles. Store the DisasterVehicle index in the road vehicle, so that no pool scan is necessary.
* Change: Small UFOs no longer target a vehicle which is already a target.
2024-02-11 23:04:29 +00:00
Loïc Guilloux
977aba73be
Change: Store running AI config inside Company ( #12003 )
2024-02-09 22:55:49 +01:00
Jonathan G Rennison
bed3ef6f6b
Cleanup: Incorrect savegame number for SLV_DEPOT_UNBUNCHING constant ( #12045 )
2024-02-09 17:50:29 +00:00
Tyler Trahan
b2b4cceb49
Fix #11997 : Adjust economy date by 1920 when loading TTD/TTO savegames ( #12007 )
2024-02-05 18:09:29 -05: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
Rubidium
7a740eefa0
Codechange: use std::unique_ptr for managing SaveLoadParams
2024-02-03 21:38:33 +01:00
Rubidium
4b372b6050
Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees
2024-02-03 21:38:33 +01:00
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
2024-02-03 08:04:24 -05:00
Patric Stout
849fd5ae03
Change: [Script] replace easy/medium/hard values with default value ( #11959 )
2024-02-03 09:15:03 +00:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Peter Nelson
60dcf3b5e2
Codechange: Rename TownEffect to TownAcceptanceEffect.
...
This makes it clearer that TownEffect only affects acceptance behaviour.
2024-02-02 20:37:49 +00:00
Loïc Guilloux
ab1407fc43
Fix: [Script] Apply random deviation only at script start ( #11944 )
2024-02-01 10:48:40 +01:00
dP
897b59c158
Add: [GS] Allow to set max loan for each company separately ( #11224 )
2024-01-30 19:15:19 +01:00
Tyler Trahan
2b1f78d2ca
Fix: Use alternate timekeeping units in savegame title ( #11912 )
2024-01-29 22:11:00 +00:00
Koen Bussemaker
5a55c4a934
Feature: [NewGRF] Allow higher max speeds for ships
2024-01-28 14:54:51 +01:00
Tyler Trahan
21581b6ab3
Feature: Setting for minutes per calendar year ( #11428 )
2024-01-23 18:33:54 -05:00
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
2024-01-23 11:36:09 -05:00
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
2024-01-21 20:56:50 +00:00
Peter Nelson
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
Rubidium
4cc97e04e6
Fix #11801 , 51f1e93: CalcClosestTownFromTile needs the kd-tree to be valid
2024-01-17 23:40:19 +01:00
Rubidium
47c0184a0b
Codechange: replace ROR/ROL with std::rotr/rotl
2024-01-17 23:05:40 +01:00
Jonathan G Rennison
17d47ba06f
Fix 661bdae2: cargo_payment not cleared when aircraft loading cancelled
2024-01-17 06:33:54 +01:00
Patric Stout
fd073a2810
Remove: replace custom span with std::span
2024-01-17 00:25:08 +01:00
Patric Stout
8b4c5a6269
Codechange: compile-time validate the string format of SlErrorCorruptFmt ( #11805 )
2024-01-16 20:58:55 +00:00
Rubidium
661bdae2e5
Fix #11785 , cf16f45: when bumping aircraft into the air, remove them from the loading vehicle list again
2024-01-16 00:08:19 +01:00
Rubidium
f99793547e
Fix fbd71a9: for TTO savegames, getting the savegame type left the file pointing to the wrong location
2024-01-16 00:08:19 +01:00
Rubidium
d5518f6263
Fix 36a0818: TTO did not save company shares
2024-01-16 00:08:19 +01:00
Rubidium
51f1e939e8
Change: be more resilient against missing towns in old loader
2024-01-16 00:08:19 +01:00
Rubidium
67b405d2f6
Fix #11783 , 953445a: TTO savegames are not 65536 by 65536
2024-01-16 00:08:19 +01:00
Rubidium
f5b320e502
Codechange: use range based for loop, instead of tile numbers
2024-01-16 00:08:19 +01:00
Rubidium
b09a4384d9
Codechange: remove need to use separate array for old_map3
2024-01-16 00:08:19 +01:00
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.
2024-01-09 18:56:05 +00:00
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.
2024-01-09 18:56:05 +00:00
Kuhnovic
f1e999ec59
Feature: Region-based pathfinder for ships ( #10543 )
2024-01-08 20:29:05 +01:00
Rubidium
3a676a5af0
Codechange: replace static inline with static for non-class functions
2024-01-06 13:37:33 +01:00
Rubidium
e3f49ee7a0
Codechange: coding style fixes
2024-01-04 16:23:54 +01:00
Peter Nelson
934545a674
Fix: Calculation of initial engine age was inaccurate. ( #11660 )
...
Engine age in months was calculated as the difference in days / 32, instead of the actually difference in months. This would result in engines being artificially younger if a game was started at a later date.
2023-12-31 15:47:32 +00:00
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.
2023-12-28 23:16:19 +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