Skip to content

Commit e2e976e

Browse files
authored
Merge pull request #1493 from DFHack/ab9rf-ban-honey
`ban-cooking`: don't fail when honey missing
2 parents a60f147 + f1aa7b6 commit e2e976e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ban-cooking.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ end
8181

8282
funcs.honey = function()
8383
local mat = dfhack.matinfo.find("CREATURE:HONEY_BEE:HONEY")
84-
ban_cooking('honey bee honey', mat.type, mat.index, df.item_type.LIQUID_MISC, -1)
84+
if mat then
85+
ban_cooking('honey bee honey', mat.type, mat.index, df.item_type.LIQUID_MISC, -1)
86+
end
8587
end
8688

8789
funcs.tallow = function()

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Template for new versions:
3737
- `deathcause`: added functionality to this script to fetch cause of death programatically
3838

3939
## Fixes
40+
- `ban-cooking`: will not fail trying to ban honey if the world has no honey
4041
- `confirm`: only show pause option for pausable confirmations
4142
- `confirm`: when editing a uniform, confirm discard of changes when exiting with Escape
4243
- `confirm`: when removing a manager order, show correct order description when using non-100% interface setting

0 commit comments

Comments
 (0)