Commit Graph

1173 Commits (bab5a8a78713299a4ea6be0ac6b94830c031fd57)

Author SHA1 Message Date
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 3 months ago
Tyler Trahan 32b0fb9f6e
Fix #12010: Use economy timer for vehicle stats minimum age, not calendar (#12142) 3 months ago
Loïc Guilloux 845b894fd8
Remove: [Script] random_deviation from setting description table (#12221) 4 months ago
Peter Nelson 8172e25273
Codechange: Use range-for when iterating station speclists. (#12212)
This replaces indexed access.
4 months ago
Peter Nelson cff48c0f63 Codechange: Templatise SlStationSpecList to reduce duplication.
SlStationSpecList now handles both StationSpec and RoadStopSpec, and replaces indexed array access with range-for and reserve/emplace_back pattern.
4 months ago
Peter Nelson 41b3314d76 Codechange: Replace separate Station/RoadStopSpecList with template struct.
Reduces duplication and simplifies reuse.

Additionally naming an item that is used in a list as a ...List was
pretty weird.
4 months ago
Patric Stout 8f22066b9a
Fix #12147: reset all saved settings to their default before loading a game (#12210) 4 months ago
Peter Nelson f0a891c4f7
Cleanup: Remove unused last_num_specs from SlRoadStopTileData. (#12198)
Inadvertently copy & pasted from another Sl handler.
4 months ago
Loïc Guilloux fad77261ea
Fix f6dd505: Missing savegame conversion for current_order (#12188) 4 months ago
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.
4 months ago
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
4 months ago
Rubidium a4d4301a0c Codechange: We are heading to 15 4 months ago
Rubidium 609d0071d5 Change: Remove saving of digit group and decimal separator configurations from the savegame 4 months ago
Rubidium e67fc33172 Codechange: Add support for NULL strings in SaveLoadCompat 4 months ago
Jonathan G Rennison 5ab5f4ace7
Codefix df691eb3: Reloading GRFs destructed small UFO targeting road vehicle (#12072) 4 months ago
Loïc Guilloux 3ffa176870
Change: [Script] Store randomizers in savegame (#12063) 4 months ago
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.
4 months ago
Loïc Guilloux 977aba73be
Change: Store running AI config inside Company (#12003) 4 months ago
Jonathan G Rennison bed3ef6f6b
Cleanup: Incorrect savegame number for SLV_DEPOT_UNBUNCHING constant (#12045) 4 months ago
Tyler Trahan b2b4cceb49
Fix #11997: Adjust economy date by 1920 when loading TTD/TTO savegames (#12007) 5 months ago
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.
5 months ago
Rubidium 7a740eefa0 Codechange: use std::unique_ptr for managing SaveLoadParams 5 months ago
Rubidium 4b372b6050 Codechange: use std::shared_ptr to manage saveload filters instead of manually trying to avoid double frees 5 months ago
Tyler Trahan f6dd5053a3
Feature: Order flag to unbunch vehicles at depot (#11945) 5 months ago
Patric Stout 849fd5ae03
Change: [Script] replace easy/medium/hard values with default value (#11959) 5 months ago
frosch b1718478c8 Codechange: Replace old non-standard attributes with C++17/20 standard attributes. 5 months ago
Peter Nelson 60dcf3b5e2 Codechange: Rename TownEffect to TownAcceptanceEffect.
This makes it clearer that TownEffect only affects acceptance behaviour.
5 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
Tyler Trahan 2b1f78d2ca
Fix: Use alternate timekeeping units in savegame title (#11912) 5 months ago
Koen Bussemaker 5a55c4a934 Feature: [NewGRF] Allow higher max speeds for ships 5 months ago
Tyler Trahan 21581b6ab3
Feature: Setting for minutes per calendar year (#11428) 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
Rubidium 4cc97e04e6 Fix #11801, 51f1e93: CalcClosestTownFromTile needs the kd-tree to be valid 5 months ago
Rubidium 47c0184a0b Codechange: replace ROR/ROL with std::rotr/rotl 5 months ago
Jonathan G Rennison 17d47ba06f Fix 661bdae2: cargo_payment not cleared when aircraft loading cancelled 5 months ago
Patric Stout fd073a2810 Remove: replace custom span with std::span 5 months ago
Patric Stout 8b4c5a6269
Codechange: compile-time validate the string format of SlErrorCorruptFmt (#11805) 5 months ago
Rubidium 661bdae2e5 Fix #11785, cf16f45: when bumping aircraft into the air, remove them from the loading vehicle list again 5 months ago
Rubidium f99793547e Fix fbd71a9: for TTO savegames, getting the savegame type left the file pointing to the wrong location 5 months ago
Rubidium d5518f6263 Fix 36a0818: TTO did not save company shares 5 months ago
Rubidium 51f1e939e8 Change: be more resilient against missing towns in old loader 5 months ago
Rubidium 67b405d2f6 Fix #11783, 953445a: TTO savegames are not 65536 by 65536 5 months ago
Rubidium f5b320e502 Codechange: use range based for loop, instead of tile numbers 5 months ago
Rubidium b09a4384d9 Codechange: remove need to use separate array for old_map3 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