Skip to content

Commit

Permalink
Separate PR
Browse files Browse the repository at this point in the history
* Update stuckdoors.lua
* Update deep-embark.lua
  • Loading branch information
Bumber64 authored Sep 28, 2024
1 parent 41128ca commit c1b23c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deep-embark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function moveEmbarkStuff(selectedBlock, embarkTiles)
local unitsAtSpawn = dfhack.units.getUnitsInBox(x1, y1, z1, x2, y2, z2)
local movedUnit = false
for i, unit in ipairs(unitsAtSpawn) do
if unit.civ_id == df.global.plotinfo.civ_id and not unit.flags2.killed then
if unit.civ_id == df.global.plotinfo.civ_id and not unit.flags1.inactive and not unit.flags2.killed then
local pos = embarkTiles[math.random(1, #embarkTiles)]
dfhack.units.teleport(unit, pos)
reveal(pos)
Expand Down
2 changes: 1 addition & 1 deletion fix/stuckdoors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end

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

Expand Down

0 comments on commit c1b23c7

Please sign in to comment.