1
0
Fork 0
Commit Graph

23359 Commits (5dc02a686f63d74dfd1463d526c0f47f1d5ce8e8)

Author SHA1 Message Date
Rubidium 6e0378f7c1 Codechange: use IndustryID instead of int 2025-02-07 19:26:34 +01:00
Peter Nelson 99a32207b8
Codechange: Use preformatted strings for slider marks. (#13484) 2025-02-07 18:14:53 +00:00
Peter Nelson c3643e3ee0
Codechange: Pass raw string to editable query window. (#13481)
This avoids separating string id and parameters. EncodedString is not needed as it is the raw text that is editable.
2025-02-07 17:03:53 +00:00
Peter Nelson 8c48f9fc49
Codechange: Pass preformatted string when updating sign positions. (#13480)
This forces the strings to be formatted in advance and avoids using global string parameters.
2025-02-07 13:19:00 +00:00
Peter Nelson eaa765d615
Codechange: Disentangle news window style from news flags. (#13482)
This avoids NewsFlags being used as both bitmask and bitstuffed data.
2025-02-07 13:10:39 +00:00
Peter Nelson ccd3d3a547 Codechange: Add version of GetString() that takes parameters directly.
This allows parameters to be passed to GetString() bypassing the global parameter system.
2025-02-07 12:30:34 +00:00
Peter Nelson be00fd4447 Codechange: Use std::array as simple string parameter container.
ArrayStringParameters contains extra state that is used when formatting strings which isn't needed when creating parameter lists.

MakeParameters() now returns a std::array which contains only the parameter data. This simpler container is more widely available than before.
2025-02-07 12:30:34 +00:00
Peter Nelson fb70a7fe7e Codechange: Use EnumBitSet for IndustryTileSpecialFlags. 2025-02-07 12:30:06 +00:00
Peter Nelson 1916454776 Codechange: Use EnumBitSet for IndustryLifeTypes. 2025-02-07 12:30:06 +00:00
Peter Nelson 2bb3f368e3 Codechange: Use EnumBitSet for IndustryBehaviours. 2025-02-07 12:30:06 +00:00
translators 9d451d6350 Update: Translations from eints
english (au): 2 changes by krysclarke
spanish (mexican): 6 changes by absay
english (us): 12 changes by 2TallTyler
polish: 1 change by pAter-exe
2025-02-07 04:44:22 +00:00
Rubidium e937c4dcfd Codechange: change DestinationID into class with conversion helpers
A DestinationID is either a DepotID or StationID, where the aircraft hangar
being conceptually a depot is actually a StationID. When making those types
stronger, a lot of casts would need to be added, but this shows the intent
much better.
2025-02-06 21:03:24 +01:00
Rubidium 8ca03a3766 Codechange: make network crypto enum classes 2025-02-06 21:03:12 +01:00
Rubidium fef2baf041 Codechange: make NetworkAuthenticationMethodMask an EnumBitSet 2025-02-06 21:03:12 +01:00
Peter Nelson 693a5f42b9 Codechange: Use EnumBitSet for NWidgetDisplayFlags. 2025-02-06 19:43:35 +00:00
Peter Nelson 28eb5e05c8 Codechange: Use EnumBitSet for NWidContainerFlags. 2025-02-06 19:43:35 +00:00
translators 6089ed8059 Update: Translations from eints
english (au): 6 changes by krysclarke
chinese (traditional): 8 changes by KogentaSan
spanish (mexican): 3 changes by absay
greek: 12 changes by gh658804
russian: 12 changes by Ln-Wolf
finnish: 8 changes by hpiirai
catalan: 8 changes by J0anJosep
portuguese: 9 changes by azulcosta
portuguese (brazilian): 8 changes by pasantoro
polish: 14 changes by pAter-exe
2025-02-06 04:45:30 +00:00
Peter Nelson fe31538a27
Codechange: Use EnumBitSet for Scanner::Modes. (#13471) 2025-02-05 20:08:12 +00:00
Krys Clarke 11bbf0b6dd Fix: Spelling mistakes in STR_ERROR_CAN_T_SELL_ALL_SHIP/AIRCRAFT 2025-02-05 18:03:06 +01:00
Rubidium 2f1d0acec9 Codechange: use the appropriate type for OldWaypoint indices 2025-02-05 16:16:40 +01:00
translators fd85ab1e2c Update: Translations from eints 2025-02-05 04:43:17 +00:00
Peter Nelson ffb5e71a28
Fix: Missing error messages with sell- and autoreplace-all commands. (#13469)
If these commands failed then then the error message part was blank.
2025-02-04 22:30:42 +00:00
Peter Nelson 603630c1ae
Codechange: Allow ConvertibleThroughBase types to be used as settings. (#13466) 2025-02-04 19:06:37 +00:00
SamuXarick adc79aca09
Codechange: Refactor AllocHeightMap to return void since it always returns true (#13379) 2025-02-04 18:52:52 +00:00
Peter Nelson c31494a413 Codechange: Use EnumBitSet for RoadStopDrawModes. 2025-02-04 18:52:08 +00:00
Peter Nelson 17f6da413d Codechange: Use EnumBitSet for RoadStopSpecFlags. 2025-02-04 18:52:08 +00:00
Peter Nelson 1a6e7f2162 Codechange: Use EnumBitSet for StationSpecFlags. 2025-02-04 18:52:08 +00:00
translators 1f7760dc7a Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 2 changes by KogentaSan
spanish (mexican): 1 change by absay
russian: 2 changes by Ln-Wolf
catalan: 3 changes by J0anJosep
2025-02-04 04:42:40 +00:00
Peter Nelson e2b59449bb
Codechange: Make Squirrel handle ConvertibleThroughBase. (#13453)
This removes the need for a Money specialisation.

TileIndex specialisation remains due to unsigned/signed connivance.
2025-02-04 01:15:58 +00:00
Peter Nelson 08ed68bc85
Fix: Too many trees when generating trees at same height. (#13460)
Multiplying by tile height caused far too many trees to be generated when using maps higher than the original limit.
2025-02-03 19:35:05 +00:00
Peter Nelson 64724b8893
Codechange: Make OverflowSafeInt ConvertibleThroughBase. (#13449) 2025-02-03 12:53:45 +00:00
Jonathan G Rennison 5f4f78574f
Codefix: Town index used in CMD_BUILD_ROAD test call in IsRoadAllowedHere (#13451) 2025-02-03 13:51:06 +01:00
SamuXarick f5d43ffdf8 Change: [Script] GetWaypointID to return the StationID of any waypoint
Modified ScriptWaypoint::GetWaypointID to also return the StationID of any waypoint (including road waypoint).
2025-02-03 08:41:59 +01:00
Jonathan G Rennison 3ea4d1d4fc Fix #12912: CompanyProperties::inaugurated_year_calendar not saved 2025-02-03 08:09:45 +01:00
translators 8962ea8bcc Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 3 changes by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 3 changes by pAter-exe
2025-02-03 04:44:07 +00:00
Peter Nelson e114ed357d
Codechange: Use EnumBitSet for ObjectFlags. (#13441) 2025-02-02 21:15:03 +00:00
Rubidium 6f8b9fc737 Codechange: remove unneeded casts 2025-02-02 19:45:17 +01:00
Rubidium 9bfddcdbbe Codechange: make WindowNumber accept ConvertibleThroughBase types 2025-02-02 19:45:17 +01:00
Peter Nelson fb55ab0742
Codechange: Pass rect to DrawStationCoverageAreaText. (#13442)
This moves the overflow behaviour to the callers, making it clearer why that is desired.
2025-02-02 17:15:47 +00:00
Rubidium 5ffaf6cdb9 Fix: [Script] Wrong return value for failed preconditions Vehicle::CloneVehicle 2025-02-02 18:01:08 +01:00
Tyler Trahan 3ae715722c Doc: Rainforest is one word 2025-02-02 10:58:23 -05:00
Tyler Trahan cc475b6acb Change: Rainforest is one word 2025-02-02 10:58:23 -05:00
Rubidium 5a78bb8fac Codechange: ToWindowNumber describes better what is the intent than Pack 2025-02-02 15:57:18 +01:00
Rubidium 6b7cb4ede3 Codechange: remove unused Unpack from VehicleListIdentifier 2025-02-02 15:57:18 +01:00
Rubidium e36a9ceaf0 Codechange: allow passing extra constructor arguments via AllocateWindowDescFront 2025-02-02 15:57:18 +01:00
Rubidium 8f72a478f0 Codechange: change 'return existing window' to a template parameter
This change is made to make it possible to pass arbitrary other parameters
to the constructor of the window instances.
2025-02-02 15:57:18 +01:00
Peter Nelson 6f52a977a8 Codechange: Use EnumBitSet for GRFConfigFlags.
This is renamed from `GCF_Flag` didn't match convention.
2025-02-02 10:49:45 +00:00
Peter Nelson 877fa54f66 Codechange: Use EnumBitSet for GRFBug enum. 2025-02-02 10:49:45 +00:00
translators 52ded73b21 Update: Translations from eints
english (au): 2 changes by krysclarke
norwegian (bokmal): 2 changes by eriksorngard
spanish (mexican): 9 changes by absay
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
portuguese: 2 changes by azulcosta
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-02-02 04:40:46 +00:00
Peter Nelson 59354576d4
Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436) 2025-02-01 23:09:18 +00:00
merni-ns 9ff485b329 Fix #13304: Refer to font document in font error message
Instead of referring to readme which doesn't say anything about this anymore
2025-02-01 23:51:26 +01:00
merni-ns 2ab714b32e Change: Add fonts document to help window 2025-02-01 23:51:26 +01:00
Rubidium a49963ac39 Codechange: remove unused Pack from Order 2025-02-01 22:08:20 +01:00
Tyler Trahan 2d5565129a
Fix #13140: Scale initial industry production estimate by cargo scale (#13427) 2025-02-01 14:08:49 -05:00
Rubidium b6a092f3e0 Codechange: make EnumBitSet ConvertibleThroughBase 2025-02-01 19:22:02 +01:00
Rubidium 55588b052e Codechange: add concept of ConvertibleThroughBase for strong types
This makes it possible to write templated alternatives for ConvertibleThroughBase
which are then available for any (strong) type that implements a base() function
In the end making adding new ConvertibleThroughBase types less awkward.
2025-02-01 19:22:02 +01:00
Rubidium ac6f3542a8 Codefix: narrowing conversion warning for MSVC x86 2025-02-01 17:54:14 +01:00
Rubidium 89d0a688a9 Codechange: Use EnumBitSet for pool types 2025-02-01 17:04:04 +01:00
Peter Nelson c4c5028862
Codechange: Use EnumBitSet for SettingFlags. (#13429) 2025-02-01 15:46:51 +00:00
Peter Nelson 1d25c526b4
Codechange: Use EnumBitSet for strgen's CmdFlags. (#13428) 2025-02-01 15:45:55 +00:00
Peter Nelson 95bd53ddf1 Codechange: Use EnumBitSet for BuildingFlags. 2025-02-01 14:16:25 +00:00
Peter Nelson 113205c540 Codechange: Use EnumBitSet for HouseExtraFlags. 2025-02-01 14:16:25 +00:00
Rubidium 2c7b3bb55d Codechange: rename ClientIndex to ClientPoolID 2025-02-01 11:15:51 +01:00
Rubidium 50e581cd31 Codechange: rename AdminIndex to AdminID 2025-02-01 11:15:51 +01:00
Rubidium f3e32b2f6a Codechange: use Pool's counter instead of maintaining our own 2025-02-01 11:15:51 +01:00
translators 23dcb4f4a7 Update: Translations from eints
korean: 1 change by telk5093
russian: 2 changes by Ln-Wolf
dutch: 1 change by Afoklala
2025-02-01 04:41:55 +00:00
Rubidium b6bdb97bed Codechange: [Script] replace some enums with constexpr values of the internal type 2025-02-01 02:38:37 +01:00
Rubidium b4e3425a5f Codefix: access pool via PoolItem, not the pool itself 2025-02-01 02:38:27 +01:00
Rubidium 4ca1fe6c32 Codechange: replace MAX_UVALUE with std::numeric_limits::max 2025-02-01 01:29:02 +01:00
Peter Nelson f67589d96e
Fix 5664b1e2f6: Missing sprite detection used the wrong filename. (#13421)
This caused the missing sprite count to be incorrect.
2025-01-31 22:28:38 +00:00
Binraptor 1cba62faaf
Add: Ukrainian Hryvnia currency (#12877) 2025-01-31 19:37:58 +00:00
Tyler Trahan a0fb98df53
Change: When player joins network company, use its name instead of number in chat (#13263) 2025-01-31 14:02:17 -05:00
Peter Nelson f8b1e3033f Codechange: Use EnumBitSet for EngineFlags. 2025-01-31 18:55:31 +00:00
Peter Nelson 6c4ddb242a Codechange: Use EnumBitSet for EngineMiscFlags. 2025-01-31 18:55:31 +00:00
Peter Nelson 5664b1e2f6
Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Peter Nelson 40aeedeade Codechange: Use EnumBitSet for callback masks. 2025-01-31 17:08:24 +00:00
Peter Nelson 1dd4adc50c Add: EnumBitSet function to test if All or Any enum values are set.
This allows multiple values to be tested in one operation.
2025-01-31 17:08:24 +00:00
Peter Nelson b9ae833e96 Codechange: Use std::array for water features.
Replaces a memset() with fill().
2025-01-31 17:08:24 +00:00
translators ebc57634e4 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 3 changes by WenSimEHRP
catalan: 1 change by J0anJosep
polish: 1 change by pAter-exe
2025-01-31 04:41:56 +00:00
Peter Nelson 84b219ac64
Codefix: EngineNameContext uses enum class naming but wasn't. (#13417)
This could have caused namespace conflicts with its values.
2025-01-30 22:14:45 +00:00
Jonathan G Rennison 2fa81c89ce
Codechange: Remove unused GenWorldStatus::next_update (#13414) 2025-01-30 22:09:24 +00:00
Peter Nelson 917d5cc75d
Codechange: Use EnumBitSet for RoadTypeFlags and RailTypeFlags. (#13415) 2025-01-30 22:08:51 +00:00
SamuXarick a4d23c072d
Fix 95df7ea: Incorrect WindowClasses for deduplicated window descs. (#13412) 2025-01-30 18:51:09 +00:00
Peter Nelson a252ba3146
Codechange: Modernise NewGRF debug helper definitions. (#13410)
* Replace pointers and null-terminated lists with spans.
* Replace raw (undeleted) pointer with unique_ptr.
* Replace const char * with string_view.
2025-01-30 18:50:53 +00:00
Peter Nelson 56b1e9df1f Codechange: Use EnumBitSet for FrameFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson d30e8dd1c1 Codechange: Use EnumBitSet for WindowDefaultFlags. 2025-01-30 08:40:42 +00:00
Peter Nelson efb05396a7 Codechange: Use EnumBitSet for WindowFlags. 2025-01-30 08:40:42 +00:00
translators 248f369e86 Update: Translations from eints
english (au): 1 change by krysclarke
norwegian (bokmal): 1 change by eriksorngard
english (us): 1 change by 2TallTyler
greek: 1 change by gh658804
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
2025-01-30 04:43:04 +00:00
Peter Nelson f51627c76f Codechange: Use EnumBitSet for DepotCommand(Flag)s. 2025-01-29 21:46:39 +00:00
Peter Nelson 2560339472 Codechange: Use EnumBitSet for Border(Flag)s. 2025-01-29 21:46:39 +00:00
Peter Nelson 473728f181 Codechange: Use EnumBitSet for ExtraEngineFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson cea62a8399 Codechange: Use EnumBitSet for AspectFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 5ef495da78 Codechange: Use EnumBitSet for GroupFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 4b573b2703 Codechange: Use EnumBitSet for ViewportStringFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 05ac1dd888 Codechange: Use EnumBitSet for TileFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 3c2706f859 Codechange: Use EnumBitSet for EngineDisplayFlags. 2025-01-29 21:46:39 +00:00
Peter Nelson 6d1f56ce6b Codechange: Allow using EnumBitSet over network commands. 2025-01-29 21:46:39 +00:00
Peter Nelson fdb3555147 Add: EnumBitSet class to safely use enum class values as a bitset.
This maintains type-safe enum values and type-safe masks, and avoids using undefined enum values.
2025-01-29 21:46:39 +00:00
Peter Nelson bf6293a13f
Fix: Rail/road type conversion data is not populated on new game. (#13403)
This means that the rail/road type conversion that happens if NewGRFs are changed does not work the first time for a new game, only with a savegame.
2025-01-29 21:45:16 +00:00
translators 402aaf3d11 Update: Translations from eints
persian: 32 changes by CptMcWill
2025-01-29 04:42:38 +00:00