diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-05-18 15:57:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 15:57:58 -0400 |
commit | 3ee673da2114fd9fcf3cfd42200f853ffa2530ef (patch) | |
tree | 29b5f3bc292ab5102de1554975c55efee7468b62 | |
parent | 1979be782088e44ee5fb62b9f1ebe6d93109f14a (diff) | |
parent | 85a74f32ac56859f0dfe0962bf8cc2d323334733 (diff) | |
download | currency-3ee673da2114fd9fcf3cfd42200f853ffa2530ef.tar.gz currency-3ee673da2114fd9fcf3cfd42200f853ffa2530ef.tar.bz2 currency-3ee673da2114fd9fcf3cfd42200f853ffa2530ef.zip |
Merge pull request #9 from AntumDeluge/pipeworks_fixes
Test for global 'pipeworks' before calling
-rw-r--r-- | shop.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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)
|