Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions ban-cooking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,18 @@ funcs.booze = function()
end

funcs.honey = function()
local mat = dfhack.matinfo.find("CREATURE:HONEY_BEE:HONEY")
if mat then
ban_cooking('honey bee honey', mat.type, mat.index, df.item_type.LIQUID_MISC, -1)
for _, c in ipairs(df.global.world.raws.creatures.all) do
for _, m in ipairs(c.material) do
if m.flags.EDIBLE_COOKED then
for _, s in ipairs(m.reaction_product.id) do
if s.value == "DRINK_MAT" then
local matinfo = dfhack.matinfo.find(c.creature_id, m.id)
ban_cooking(c.name[2] .. ' ' .. m.id, matinfo.type, matinfo.index, df.item_type.LIQUID_MISC, -1)
break
end
end
end
end
end
end

Expand Down
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Template for new versions:
## New Features

## Fixes
- `ban-cooking`: bans honey added by creatures other than vanilla honey bee

## Misc Improvements

Expand Down
Loading