From f60bf85a01bf68b71f810173924dff464af3b655 Mon Sep 17 00:00:00 2001 From: Droseran <97368320+Droseran@users.noreply.github.com> Date: Tue, 28 Nov 2023 16:36:18 -0500 Subject: [PATCH 1/2] Update ban-cooking.lua The creature ID is currently NIL due to being an uninitialized variable, causing ban-cooking to error if a creature alcohol has the [EDIBLE_COOKED] token. This replaces the uninitialized variable with the one containing the creature ID. --- ban-cooking.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ban-cooking.lua b/ban-cooking.lua index eca6b63c57..0a672834ba 100644 --- a/ban-cooking.lua +++ b/ban-cooking.lua @@ -90,7 +90,7 @@ funcs.booze = function() for _, c in ipairs(df.global.world.raws.creatures.all) do for _, m in ipairs(c.material) do if m.flags.ALCOHOL and m.flags.EDIBLE_COOKED then - local matinfo = dfhack.matinfo.find(creature_id.id, m.id) + local matinfo = dfhack.matinfo.find(c.creature_id, m.id) ban_cooking(c.name[2] .. ' ' .. m.id, matinfo.type, matinfo.index, df.item_type.DRINK, -1) end end From 378156be0c4b043816d0036d9d6d048e573fbc0b Mon Sep 17 00:00:00 2001 From: Droseran <97368320+Droseran@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:46:39 -0500 Subject: [PATCH 2/2] Update changelog.txt Added ban-cooking fix to changelog --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index ce9ac65c9e..2909fae9a3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -31,6 +31,7 @@ Template for new versions: ## New Features ## Fixes +- `ban-cooking`: fix banning creature alcohols resulting in error ## Misc Improvements - `gui/control-panel`: reduce frequency for `warn-stranded` check to once every 2 days