Skip to content

Commit

Permalink
Prevent flow_forbid from being set without liquid present
Browse files Browse the repository at this point in the history
  • Loading branch information
NicksWorld committed Feb 23, 2025
1 parent 4af65c0 commit 72b32ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
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

0 comments on commit 72b32ea

Please sign in to comment.