From ff200329647fd504a939c09ae13f7d335b6d411b Mon Sep 17 00:00:00 2001 From: Droseran <97368320+Droseran@users.noreply.github.com> Date: Sun, 24 Aug 2025 11:04:55 -0400 Subject: [PATCH 1/3] Support honey added by mods Instead of only banning honey from vanilla honey bees, support banning honey added by modded creatures as well. --- ban-cooking.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ban-cooking.lua b/ban-cooking.lua index 7ac6f3ea3..2254e116d 100644 --- a/ban-cooking.lua +++ b/ban-cooking.lua @@ -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 From 2f5aa107788b5fc1bbfbb5138d87ab14390ec659 Mon Sep 17 00:00:00 2001 From: Droseran <97368320+Droseran@users.noreply.github.com> Date: Sun, 24 Aug 2025 11:18:16 -0400 Subject: [PATCH 2/3] Update changelog.txt --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 5ecf8024e..c22c4957a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -25,6 +25,7 @@ Template for new versions: ]]] # Future +- `ban-cooking`: bans honey added by creatures other than vanilla honey bee ## New Tools From 18fa50477d40960f6f9aee08f1a8da922b866362 Mon Sep 17 00:00:00 2001 From: Droseran <97368320+Droseran@users.noreply.github.com> Date: Sun, 24 Aug 2025 11:30:05 -0400 Subject: [PATCH 3/3] Update changelog.txt --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index c22c4957a..e2d0e0210 100644 --- a/changelog.txt +++ b/changelog.txt @@ -25,13 +25,13 @@ Template for new versions: ]]] # Future -- `ban-cooking`: bans honey added by creatures other than vanilla honey bee ## New Tools ## New Features ## Fixes +- `ban-cooking`: bans honey added by creatures other than vanilla honey bee ## Misc Improvements