Skip to content

Commit accdadf

Browse files
authored
Merge pull request #1497 from Droseran/ban-cooking-modded-honey
Support for modded honey in ban-cooking
2 parents e4cdfb4 + ceec97a commit accdadf

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ban-cooking.lua

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,18 @@ funcs.booze = function()
8080
end
8181

8282
funcs.honey = function()
83-
local mat = dfhack.matinfo.find("CREATURE:HONEY_BEE:HONEY")
84-
if mat then
85-
ban_cooking('honey bee honey', mat.type, mat.index, df.item_type.LIQUID_MISC, -1)
83+
for _, c in ipairs(df.global.world.raws.creatures.all) do
84+
for _, m in ipairs(c.material) do
85+
if m.flags.EDIBLE_COOKED then
86+
for _, s in ipairs(m.reaction_product.id) do
87+
if s.value == "DRINK_MAT" then
88+
local matinfo = dfhack.matinfo.find(c.creature_id, m.id)
89+
ban_cooking(c.name[2] .. ' ' .. m.id, matinfo.type, matinfo.index, df.item_type.LIQUID_MISC, -1)
90+
break
91+
end
92+
end
93+
end
94+
end
8695
end
8796
end
8897

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Template for new versions:
3434
## New Features
3535

3636
## Fixes
37+
- `ban-cooking`: bans honey added by creatures other than vanilla honey bee
3738
- `uniform-unstick`: added quivers, backpacks, and flasks/waterskins to uniform analysis
3839
- `uniform-unstick`: the ``--drop`` option now only evaluates clothing as possible items to drop
3940
- `uniform-unstick`: the ``--free`` option no longer redundantly reports an improperly assigned item when that item is removed from a uniform

0 commit comments

Comments
 (0)