mirror of
https://github.com/mt-mods/currency.git
synced 2024-11-22 12:23:44 +01:00
Merge pull request #9 from AntumDeluge/pipeworks_fixes
Test for global 'pipeworks' before calling
This commit is contained in:
commit
3ee673da21
6
shop.lua
6
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)
|
||||
|
Loading…
Reference in New Issue
Block a user