Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blueprinted constructions over stairs #1332

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Conversation

nickthetinker
Copy link
Contributor

@nickthetinker nickthetinker commented Nov 6, 2024

Fixes: DFHack/dfhack#5012

Quickfort blueprints can't place bridges over stairs

The previous code is more restrictive than vanilla UI.

In-game, bridges may be placed in any supported position with a walkable, adjacent tile, including over any kind of stair. In-game, floor hatches, grates, and bars do not require an adjacent floor for placement.

Initially I thought these changes may be too simple to be correct, but upon further study and testing, I can find no issues.

These changes are in keeping with the 'mission statement' from the original dev found in the top comment of the build.ua file: "In general, we enforce the same rules as the in-game UI for allowed placement of buildings (e.g. beds have to be inside, doors have to be adjacent to a wall, etc.). A notable exception is that we allow constructions and machine components to be designated regardless of whether they are reachable or currently supported. This allows the user to designate an entire floor of an above-ground building or an entire power system without micromanagement."

related to issue #5012
Quickfort blueprints can't place bridges over stairs

The previous code is more restrictive than vanilla UI.

In-game, bridges may be placed in any supported position with a walkable, adjacent tile, including over any kind of stair. 
In-game, floor hatches, grates, and bars do not require an adjacent floor for placement.

Initially I thought these changes may be too simple to be correct, but upon further study and testing, I can find no issues. 

These changes are in keeping with the 'mission statement' from the original dev found in the top comment of the build.ua file:
"In general, we enforce the same rules as the in-game UI for allowed placement of
buildings (e.g. beds have to be inside, doors have to be adjacent to a wall,
etc.). A notable exception is that we allow constructions and machine components
to be designated regardless of whether they are reachable or currently
supported. This allows the user to designate an entire floor of an above-ground
building or an entire power system without micromanagement."
@myk002
Copy link
Member

myk002 commented Nov 10, 2024

Did you also test to ensure the new logic is correct for other buildings that use is_tile_coverable -- that is, floor hatches, floor grates, and floor bars?

Nevermind: I found the discussion in the associated issue. Reading there

@nickthetinker
Copy link
Contributor Author

nickthetinker commented Nov 11, 2024 via email

@ab9rf ab9rf changed the title Update build.lua Fix blueprinted constructions over stairs Nov 11, 2024
@nickthetinker
Copy link
Contributor Author

nickthetinker commented Nov 12, 2024 via email

Copy link
Member

@myk002 myk002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for testing thoroughly. Getting these rules right is tricky.

Could you add a line about what has been fixed to changelog.txt? https://github.com/DFHack/scripts/blob/master/changelog.txt#L35

nickthetinker added a commit to nickthetinker/scripts that referenced this pull request Nov 12, 2024
Added line to changelog related to PR DFHack#1332
- `gui/quickfort`: fix build mode evluation rules to allow placement of various furniture and constructions on tiles with stair shapes or without orthagonal floor.
@nickthetinker
Copy link
Contributor Author

nickthetinker commented Nov 12, 2024 via email

@myk002 myk002 merged commit a193597 into DFHack:master Nov 12, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Quickfort blueprints can't place bridges over stairs
2 participants