Skip to content

Commit c1b23c7

Browse files
authored
Separate PR
* Update stuckdoors.lua * Update deep-embark.lua
1 parent 41128ca commit c1b23c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

deep-embark.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function moveEmbarkStuff(selectedBlock, embarkTiles)
161161
local unitsAtSpawn = dfhack.units.getUnitsInBox(x1, y1, z1, x2, y2, z2)
162162
local movedUnit = false
163163
for i, unit in ipairs(unitsAtSpawn) do
164-
if unit.civ_id == df.global.plotinfo.civ_id and not unit.flags2.killed then
164+
if unit.civ_id == df.global.plotinfo.civ_id and not unit.flags1.inactive and not unit.flags2.killed then
165165
local pos = embarkTiles[math.random(1, #embarkTiles)]
166166
dfhack.units.teleport(unit, pos)
167167
reveal(pos)

fix/stuckdoors.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99

1010
-- Util function: find out if there are any units on the tile with coordinates x,y,z
1111
function unitOnTile(x, y, z)
12-
local units = dfhack.units.getUnitsInBox(x,y,z,x,y,z)
12+
local units = dfhack.units.getUnitsInBox(x,y,z,x,y,z,dfhack.units.isActive)
1313
return #(units) > 0
1414
end
1515

0 commit comments

Comments
 (0)