aboutsummaryrefslogtreecommitdiff
path: root/shop.lua
diff options
context:
space:
mode:
Diffstat (limited to 'shop.lua')
-rw-r--r--shop.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/shop.lua b/shop.lua
index b5d2351..301a08c 100644
--- a/shop.lua
+++ b/shop.lua
@@ -37,6 +37,8 @@ default.shop.formspec = {
end,
}
+local have_pipeworks = minetest.global_exists("pipeworks")
+
default.shop.check_privilege = function(listname,playername,meta)
--[[if listname == "pl1" then
if playername ~= meta:get_string("pl1") then
@@ -108,9 +110,9 @@ minetest.register_node("currency:shop", {
inv:set_size("stock", 3*2)
inv:set_size("owner_wants", 3*2)
inv:set_size("owner_gives", 3*2)
- if minetest.get_modpath("pipeworks") then pipeworks.after_place(pos) end
+ if have_pipeworks then pipeworks.after_place(pos) end
end,
- after_dig_node = (pipeworks and pipeworks.after_dig),
+ after_dig_node = (have_pipeworks and pipeworks and pipeworks.after_dig),
tube = {
insert_object = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)