Skip to content

Commit 557ac57

Browse files
authored
Merge pull request #1408 from NicksWorld/fix/magma_pathability
Prevent flow_forbid from being set without liquid present
2 parents 03fc4b2 + 72b32ea commit 557ac57

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
@@ -37,6 +37,7 @@ Template for new versions:
3737

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

4142
## Misc Improvements
4243
- `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)