Change: rearrange definitions of tree info to remove hardcoded values - #14
Open
PeterN wants to merge 257 commits into
Open
Change: rearrange definitions of tree info to remove hardcoded values#14PeterN wants to merge 257 commits into
PeterN wants to merge 257 commits into
Conversation
indonesian: 121 changes by q1t0
swedish: 6 changes by joeax910 maori (new zealand): 7 changes by Kyle-McDangersword
Bumps the actions group with 4 updates in the / directory: [actions/upload-artifact](https://github.com/actions/upload-artifact), [actions/download-artifact](https://github.com/actions/download-artifact), [Apple-Actions/import-codesign-certs](https://github.com/apple-actions/import-codesign-certs) and [microsoft/microsoft-store-apppublisher](https://github.com/microsoft/microsoft-store-apppublisher). Updates `actions/upload-artifact` from 6 to 7 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v6...v7) Updates `actions/download-artifact` from 6 to 8 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v6...v8) Updates `Apple-Actions/import-codesign-certs` from 6 to 7 - [Release notes](https://github.com/apple-actions/import-codesign-certs/releases) - [Commits](Apple-Actions/import-codesign-certs@v6...v7) Updates `microsoft/microsoft-store-apppublisher` from 1.1 to 1.3 - [Release notes](https://github.com/microsoft/microsoft-store-apppublisher/releases) - [Commits](microsoft/microsoft-store-apppublisher@v1.1...v1.3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/download-artifact dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: Apple-Actions/import-codesign-certs dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: microsoft/microsoft-store-apppublisher dependency-version: '1.3' dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com>
chinese (simplified): 1 change by wensimehrp korean: 1 change by telk5093 indonesian: 180 changes by q1t0 finnish: 1 change by hpiirai maori (new zealand): 18 changes by Kyle-McDangersword
indonesian: 17 changes by q1t0 latvian: 7 changes by lexuslatvia
maori (new zealand): 26 changes by Kyle-McDangersword
chinese (traditional): 6 changes by KogentaSan maori (new zealand): 1 change by Kyle-McDangersword
…diagonal tiles (OpenTTD#15748)
…er (OpenTTD#15494) The condition is now "driving backwards at reduced speed". If a train is able to run at full speed when driving backwards then there is no need to perform manoeuvres to turn around
This allows widgets to return a different size depending on the size that would be used, allowing for more dynamic sizing.
Uses a dynamic widget to switch the buttons between 1 and 2 column layout depending on height, and improves use of space.
) The most common usage for this function is to convert a DWord from NewGRF into a label. Now the rare cases, sending over the network and script interaction, requires a std::byteswap. This reverts commit 9140a7a
…nTTD#15921) Achieves what f9e6b8b aimed to do, as a read error will replace the current set id, but as it is only replaced at the end, chaining to the same set id works correctly. Also reduces cognitive complexity.
english (au): 1 change by krysclarke english (us): 1 change by 2TallTyler greek: 1 change by gh658804 hungarian: 7 changes by vargaviktor russian: 1 change by Ln-Wolf finnish: 1 change by hpiirai portuguese: 1 change by jcteotonio portuguese (brazilian): 1 change by pasantoro polish: 1 change by pAter-exe
| @@ -1674,6 +1678,12 @@ | |||
| child_wid->current_y = ComputeMaxSize(child_wid->smallest_y, given_height - child_wid->padding.Vertical(), vert_step); | |||
| } | |||
|
|
|||
| for (const auto &child_wid : this->children) { | |||
| auto [pref_x, _] = child_wid->GetPreferredSizeForSize(child_wid->current_x, child_wid->current_y); | |||
| @@ -1848,6 +1858,12 @@ | |||
| child_wid->current_x = ComputeMaxSize(child_wid->smallest_x, given_width - child_wid->padding.Horizontal(), hor_step); | |||
| } | |||
|
|
|||
| for (const auto &child_wid : this->children) { | |||
| auto [_, pref_y] = child_wid->GetPreferredSizeForSize(child_wid->current_x, child_wid->current_y); | |||
Comment on lines
+110
to
+111
| // assert(industry != nullptr && IsValidTile(tile)); | ||
| // assert(industry->index == IndustryID::Invalid() || IsTileType(tile, TileType::Industry)); |
| uint16_t GetTreeTileCallback(CallbackID callback, uint32_t param1, uint32_t param2, TreeType treetype, TileIndex tile, std::span<int32_t> regs100 = {}); | ||
| PalSpriteID GetCustomTreeSprite(TileIndex tile, TreeType treetype); | ||
| bool GetNewTreeList(const TileInfo *ti, TreeType treetype, uint trees, std::array<TreeListEnt, 4> &te); | ||
| // bool DrawNewTrees(const TileInfo *ti, TreeType treetype); |
| @@ -104,7 +104,7 @@ | |||
| if (!ScriptEngine::IsBuildable(engine_id)) return -1; | |||
| if (!ScriptCargo::IsValidCargo(cargo)) return -1; | |||
|
|
|||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, INVALID_CLIENT_ID); | |||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, ClientID::Invalid); | |||
| @@ -104,7 +104,7 @@ | |||
| if (!ScriptEngine::IsBuildable(engine_id)) return -1; | |||
| if (!ScriptCargo::IsValidCargo(cargo)) return -1; | |||
|
|
|||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, INVALID_CLIENT_ID); | |||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, ClientID::Invalid); | |||
| @@ -104,7 +104,7 @@ | |||
| if (!ScriptEngine::IsBuildable(engine_id)) return -1; | |||
| if (!ScriptCargo::IsValidCargo(cargo)) return -1; | |||
|
|
|||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, INVALID_CLIENT_ID); | |||
| auto [res, veh_id, refit_capacity, refit_mail, cargo_capacities] = ::Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, depot, engine_id, true, cargo, ClientID::Invalid); | |||
| if (treespec == nullptr) { | ||
| treespec = std::make_unique<TreeTileInfo>(GetOriginalTreeTileInfo()[subs_id]); | ||
|
|
||
| // treespec->enabled = true; |
Comment on lines
+60
to
+61
| // treespec->anim_production = INDUSTRYTILE_NOANIM; | ||
| // treespec->anim_next = INDUSTRYTILE_NOANIM; |
PeterN
force-pushed
the
working-tree
branch
2 times, most recently
from
July 28, 2026 19:43
05a7b23 to
3fd1f5b
Compare
Tree availability is now defined by climates, tropiczones and probabilities Tree placer GUI is modified to list currently active tree types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation / Problem
Trees are full of magic. Magic sprite numbers, magic climate-based value and magic tropic-zone values.
De-magic them.
Description
Rearrange definitions of tree info to remove hardcoded values
Tree availability is now defined with climates and tropical zone.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.