Peter Nelson
473728f181
Codechange: Use EnumBitSet for ExtraEngineFlags.
2025-01-29 21:46:39 +00:00
Peter Nelson
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Peter Nelson
fb6781015a
Codechange: Use std::endian instead of TTD_ENDIAN defines.
2025-01-28 19:37:34 +00:00
Peter Nelson
b70438b76a
Fix #13392 : Signs of removed stations are no longer visible. ( #13395 )
...
Add "Ghost" option for station sign visibility.
2025-01-28 19:10:32 +00:00
Rubidium
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Peter Nelson
4397aa3909
Codechange: Make StationType an enum class. ( #13339 )
2025-01-19 20:53:08 +00:00
Peter Nelson
d22fd78b1c
Codefix: Sprite offsets and counts are not SpriteIDs. ( #13336 )
2025-01-19 15:58:13 +00:00
Peter Nelson
4c8f1b0f81
Add: Ability to toggle visibility of station signs by facility. ( #13207 )
2025-01-14 21:23:35 +00:00
Loïc Guilloux
46f181c8a6
Fix #13299 : Merge IT_INVALID and INVALID_INDUSTRYTYPE ( #13300 )
...
* Fix #13299 : Merge IT_INVALID and INVALID_INDUSTRYTYPE
* Codefix: Use NUM_INDUSTRYTILES where it's intended
2025-01-10 01:17:11 +01:00
glx22
b88df0b2d7
Fix: Restore ability to disable service interval
2025-01-05 23:31:50 +01:00
glx22
7493b2d0c1
Codechange: Add callback to IntSettingDesc to support dynamic min/max
2025-01-05 23:31:50 +01:00
Loïc Guilloux
a52923b3b9
Codechange: Make GetDefaultValueCallback() more similar to other setting override callbacks ( #13259 )
2025-01-04 00:17:47 +01:00
Peter Nelson
d38ecd6525
Change: Log changes to sandbox settings. ( #13267 )
...
One of the features of cheats is that there is a record of a cheat being used.
As cheats are slowly ending up in settings instead, add a flag so that changes to these sandbox settings are logged.
2025-01-03 23:12:49 +00:00
Rubidium
666f7bfe23
Doc: mention that frozen production can yield varying production per period
2025-01-02 06:01:37 +01:00
Rubidium
f55ba40b13
Codechange: use TileIndex constructor explicitly
2025-01-01 16:25:23 +01:00
Rubidium
921980d5e2
Codechange: use explicit Year constructor call in data tables
2025-01-01 00:38:35 +01:00
Peter Nelson
cba329d9e2
Add: Translatable list separator. ( #13149 )
...
Some languages should use a separator other than ", " to separate list items, so it is now a translatable string.
2024-12-06 12:32:36 +00:00
Peter Nelson
e73d6fcaac
Codechange: Store grfid with entity grfprops.
...
This allows using the grfid without having to dereference the grffile pointer.
Uses no extra storage as it fits within otherwise wasted padding space.
2024-12-05 18:17:58 +00:00
Peter Nelson
46176a81e3
Add #12975 : Cargo class bits 13 and 14 now define potable and non-potable. ( #12979 )
2024-12-01 13:48:18 +00:00
Peter Nelson
a4b4095232
Codechange: Shuffle Engine members around to reduce size. ( #13115 )
...
Reduces overall size of Engine from 752 to 720 bytes.
2024-11-22 23:58:13 +00:00
Peter Nelson
98c8445519
Codechange: Limit house default cargo label lists to original slot counts. ( #13079 )
...
Same as for IndustrySpec and IndustryTileSpec.
2024-11-15 08:07:02 +00:00
Peter Nelson
61aff3fa49
Codechange: Limit industry default cargo label lists to original slot counts. ( #13072 )
...
IndustrySpec and IndustryTileSpec cargo label lists are only used for original industries. Original industries can only have up to 2 inputs and 3 outputs. Therefore having space for 16 input/outputs slots is unnecessary
This saves 216 bytes per industry type, and 164 bytes per industry tile type.
2024-11-14 19:05:18 +00:00
Tyler Trahan
c3bb512bd9
Remove: Hidden setting for adjacent stations ( #12862 )
2024-11-06 14:11:07 -05:00
Peter Nelson
a1233ee8a1
Codechange: Use span instead of marker terminated array for indexed sprite loading. ( #13050 )
2024-11-02 14:47:49 +00:00
Peter Nelson
e1697a6ad1
Codechange: Don't use enums for non-enumerated values. ( #13031 )
...
In the past we have used enums to hold an arbitrary values. These values
are not enumerated types, so make them constants instead.
2024-10-27 18:02:49 +00:00
Rubidium
ce641af6a9
Codechange: use StationGfx over RoadStopDir + optional offset for drive through stop
2024-10-23 18:19:32 +02:00
Peter Nelson
d08636c841
Codechange: Store station layout tiles as std::span.
...
Using std::span provides both the start and end of the list, which allows validating that the requested layout is in range.
2024-08-03 14:57:34 +01:00
Peter Nelson
70a2ed062d
Codechange: Rename CBID_STATION_SPRITE_LAYOUT and CBID_STATION_TILE_LAYOUT.
...
These callbacks both select rail station tile layouts, the difference is one happens when drawing, the other happens when building. Change the names to make this clearer.
2024-08-03 14:57:34 +01:00
Peter Nelson
b9c44b29be
Codechange: Pass AirportSpec instead of index to airport resolver object. ( #12866 )
...
This avoids retrieving AirportSpec again when it is already available.
2024-07-17 18:16:22 +01:00
Rubidium
da6900f606
Change: disable the insecure admin login by default
2024-07-01 17:16:55 +02:00
Jonathan G Rennison
eebd5e47db
Add: Road waypoint default graphics
2024-06-24 22:12:08 +02:00
Jonathan G Rennison
9c84e5df3f
Add: Road waypoint functionality
2024-06-24 22:12:08 +02:00
Steve Goldman
c3a051a213
Codechange: Referencing enum for 'scroll_mode' setting in gui_settings.ini
2024-06-24 21:56:26 +02:00
Steve Goldman
c53ed9fad6
Codechange: Creating enum for 'scrollwheel_scrolling' setting
2024-06-24 21:56:26 +02:00
merni-ns
0409577277
Add: Setting to disable warning for old vehicles ( #12714 )
2024-06-15 17:14:29 -04:00
Loïc Guilloux
29ce013eda
Codechange: Pass avail(able) as reference instead of pointer since they are never nullptr ( #12696 )
2024-05-18 17:04:16 +02:00
Peter Nelson
d5671030b1
Codechange: Add NewGRFSpecsBase class to hold class/index information.
...
Standardises how the class index is stored in the spec, instead of relying ot the Spec structs having the same members.
This allows retrieving class_index and index without searching or using pointer arithmetic.
'cls_id' is renamed to 'class_index' to make it clearer that it is an index rather than the multichar label of the class.
2024-05-11 02:12:41 +01:00
merni-ns
798ec4184b
Cleanup: Remove unused function InvalidateShipPathCache
...
This was only used in the callback when changing the ship pathfinder setting.
2024-05-10 10:38:44 +02:00
merni-ns
55a7c59d13
Remove: NPF and pathfinder change settings
2024-05-10 10:38:44 +02:00
Rubidium
457d51fc49
Cleanup: remove company password hashing and anything related to it
2024-05-07 00:03:15 +02:00
Rubidium
a002803d1c
Remove: autoclean_unprotected settings; all companies will be protected
2024-05-07 00:03:15 +02:00
Peter Nelson
cf96d49ced
Codechange: Use vector for airport tile layouts. ( #12607 )
...
Simplify AirportSpec data by storing layout information together in a vector, instead of separate arrays.
This removes manual memory management and separate count members.
The default layouts will be copied instead of always referring to the originals.
2024-05-02 11:37:54 +00:00
Peter Nelson
f146680121
Codechange: Use vector for industry random sounds. ( #12606 )
...
Use a vector to store the list of random sounds played for an industry.
The removes manual memory allocation, flags to control memory management, a separate count member, and a try/catch block.
2024-05-01 19:55:00 +00:00
André Cheng
ceb0053dd9
Codechange: Correct return type of GetDefaultValueCallback
2024-04-25 20:07:54 +02:00
André Cheng
339b0ea0ff
Change: Show correct default value and unit for vehicle service interval setting
2024-04-25 20:07:54 +02:00
André Cheng
fd80a1ec66
Fix #11345 : Use correct default button value for vehicle service interval setting
2024-04-25 20:07:54 +02:00
André Cheng
a4071b78d7
Codechange: Add callback to IntSettingDesc to support more default values
2024-04-25 20:07:54 +02:00
Rubidium
1691b41b54
Codechange: use C++ containers for parsing the settings int lists
2024-04-20 11:57:45 +02:00
ladysadie
727392e0b3
Codechange: Remove per font AA settings. ( #12413 )
...
OpenTTD will use the global AA font setting for all fonts from now on.
2024-04-15 21:44:33 +02:00
Rubidium
1fcf1a136d
Codechange: use single function returning std::span over two functions that return size and begin
2024-04-07 22:02:16 +02:00