diff --git a/settlements/bookgen.lua b/settlements/bookgen.lua index bcb9f39..be4253b 100644 --- a/settlements/bookgen.lua +++ b/settlements/bookgen.lua @@ -87,7 +87,9 @@ minetest.register_abm({ local book = town_def.generate_book(closest_settlement.pos, town_name) if book then inv:add_item("books", book) - bookshelf_on_construct(pos) -- this should safely update the bookshelf's infotext without disturbing its contents + if bookshelf_on_construct then + bookshelf_on_construct(pos) -- this should safely update the bookshelf's infotext without disturbing its contents + end end end end, diff --git a/settlements/mod.conf b/settlements/mod.conf index 93f7391..13c702a 100644 --- a/settlements/mod.conf +++ b/settlements/mod.conf @@ -1,4 +1,4 @@ name = settlements description = API for adding small settlements to map generation. depends = named_waypoints -optional_depends = commoditymarket, intllib +optional_depends = commoditymarket, intllib, default