Skip to content

Commit 53e25d5

Browse files
authored
Update deep-embark.lua
getUnitsInBox now only returns active units
1 parent f15dd35 commit 53e25d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
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.flags1.inactive and not unit.flags2.killed then
164+
if unit.civ_id == df.global.plotinfo.civ_id and not unit.flags2.killed then
165165
local pos = embarkTiles[math.random(1, #embarkTiles)]
166166
dfhack.units.teleport(unit, pos)
167167
reveal(pos)

0 commit comments

Comments
 (0)