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

Prevent flow_forbid from being set without liquid present #1408

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Template for new versions:

## Fixes
- `position`: support for adv mode look cursor
- `gui/liquids`: using the remove tool with magma selected will no longer create unexpected unpathable tiles

## Misc Improvements
- `hide-tutorials`: handle tutorial popups for adventure mode
Expand Down
6 changes: 6 additions & 0 deletions modtools/spawn-liquid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ function spawnLiquid(position, liquid_level, liquid_type)
local map_block = dfhack.maps.getTileBlock(position)
local tile = dfhack.maps.getTileFlags(position)

if liquid_level == 0 then
liquid_type = df.tile_liquid.Water
end

tile.flow_size = liquid_level or 3
tile.liquid_type = liquid_type
tile.flow_forbid = liquid_type == df.tile_liquid.Magma or liquid_level >= 4
Expand All @@ -34,6 +38,8 @@ function spawnLiquid(position, liquid_level, liquid_type)
z_level.update = true
z_level.update_twice = true

df.global.world.reindex_pathfinding = true

resetTemperature(position)
end

Expand Down