Merge pull request #3860 from myk002/myk_zone_dungeon

[zone] dungeon cages/restraints aren't assignable
develop
Myk 2023-10-09 18:00:50 -07:00 committed by GitHub
commit 0b9103b10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

@ -60,6 +60,7 @@ Template for new versions:
- `sort`: new search widgets for Info panel tabs, including all "Creatures" subtabs, all "Objects" subtabs, "Tasks", the "Work details" subtab under "Labor", and the "Interrogate" and "Convict" screens under "Justice" - `sort`: new search widgets for Info panel tabs, including all "Creatures" subtabs, all "Objects" subtabs, "Tasks", the "Work details" subtab under "Labor", and the "Interrogate" and "Convict" screens under "Justice"
## Fixes ## Fixes
- `zone`: don't show animal assignment link for dungeon cages/restraints
## Misc Improvements ## Misc Improvements
- `overlay`: allow ``overlay_onupdate_max_freq_seconds`` to be dynamically set to 0 for a burst of high-frequency updates - `overlay`: allow ``overlay_onupdate_max_freq_seconds`` to be dynamically set to 0 for a burst of high-frequency updates

@ -961,9 +961,13 @@ CageChainOverlay.ATTRS{
local function is_valid_building() local function is_valid_building()
local bld = dfhack.gui.getSelectedBuilding(true) local bld = dfhack.gui.getSelectedBuilding(true)
return bld and bld:getBuildStage() == bld:getMaxBuildStage() and if not bld or bld:getBuildStage() ~= bld:getMaxBuildStage() then return false end
(bld:getType() == df.building_type.Cage or local bt = bld:getType()
bld:getType() == df.building_type.Chain) if bt ~= df.building_type.Cage and bt ~= df.building_type.Chain then return false end
for _,zone in ipairs(bld.relations) do
if zone.type == df.civzone_type.Dungeon then return false end
end
return true
end end
local function is_cage_selected() local function is_cage_selected()