Skip to content

Commit 72b32ea

Browse files
committed
Prevent flow_forbid from being set without liquid present
1 parent 4af65c0 commit 72b32ea

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Template for new versions:
3636

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

4041
## Misc Improvements
4142
- `hide-tutorials`: handle tutorial popups for adventure mode

modtools/spawn-liquid.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ function spawnLiquid(position, liquid_level, liquid_type)
2121
local map_block = dfhack.maps.getTileBlock(position)
2222
local tile = dfhack.maps.getTileFlags(position)
2323

24+
if liquid_level == 0 then
25+
liquid_type = df.tile_liquid.Water
26+
end
27+
2428
tile.flow_size = liquid_level or 3
2529
tile.liquid_type = liquid_type
2630
tile.flow_forbid = liquid_type == df.tile_liquid.Magma or liquid_level >= 4
@@ -34,6 +38,8 @@ function spawnLiquid(position, liquid_level, liquid_type)
3438
z_level.update = true
3539
z_level.update_twice = true
3640

41+
df.global.world.reindex_pathfinding = true
42+
3743
resetTemperature(position)
3844
end
3945

0 commit comments

Comments
 (0)