Conversation
chdoc
requested changes
Oct 6, 2026
chdoc
left a comment
Member
There was a problem hiding this comment.
This looks pretty good, the requested changes are mostly nitpicks.
Comment on lines
+45
to
+46
| local tile_array_width = df.global.world.world_data.constructions.width | ||
| local tile_array_height = df.global.world.world_data.constructions.height |
Member
There was a problem hiding this comment.
Since df.global.world.world_data.constructions is a global object, it makes sense to get a global reference to this at the beginning of the file instead of various local references to its parts.
Comment on lines
+48
to
+49
| for i = 1, tile_array_width do | ||
| for j = 1, tile_array_height do |
Member
There was a problem hiding this comment.
If the point is to index a C++ data structure, please iterate from 0 to n-1
Comment on lines
+74
to
+75
| local region_x = construction.square_pos["x"][0] | ||
| local region_y = construction.square_pos["y"][0] |
Member
There was a problem hiding this comment.
Suggested change
| local region_x = construction.square_pos["x"][0] | |
| local region_y = construction.square_pos["y"][0] | |
| local region_x = construction.square_pos.x[0] | |
| local region_y = construction.square_pos.y[0] |
| local material = "" | ||
|
|
||
| if df.item_type[square.item_type] == "WOOD" then | ||
| subtype = "wooden" |
Member
There was a problem hiding this comment.
Not a strong preference, but I would prefer:
Suggested change
| subtype = "wooden" | |
| subtype = "wood" |
| for i = 1, tile_array_width do | ||
| for j = 1, tile_array_height do | ||
| for _, square in ipairs(df.global.world.world_data.constructions.map[i - 1]:_displace(j - 1).square) do | ||
| if df.world_construction_square_bridgest:is_instance(square) then |
Member
There was a problem hiding this comment.
Instead of an instance check you may want to try using square:getType()
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.
This PR addresses the position of bridges in the geodata export (as discussed on Discord), pinpointing them down to the midmap tile rather than the world tile as before.
As a result, they now correctly coincide with roads crossing rivers (diamonds = old, starbursts = new):

It also adds an attribute for the exact materials of bridges and roads (e.g. mudstone, pear wood, willow...) using dfhack.matinfo.decode/2 for the names.