mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-21 16:01:22 +00:00
Tentativa de correção de bug
Animatron declarou que o a máquina dispensadora está causando bug junto com o multiprotetor áreas. erro: https://disroot.org/upload/p06tHnX-uswbozO1/Screenshot_1.png
This commit is contained in:
parent
fab0efad65
commit
5456150647
1 changed files with 16 additions and 9 deletions
|
@ -105,15 +105,22 @@ modMinerTrade.dispensing.exchange = function(meta)
|
||||||
end
|
end
|
||||||
|
|
||||||
modMinerTrade.dispensing.canOpen = function(pos, playername)
|
modMinerTrade.dispensing.canOpen = function(pos, playername)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
if
|
if
|
||||||
meta:get_string("owner")==playername
|
meta:get_string("owner")==playername
|
||||||
or (minetest.get_modpath("tradelands") and modTradeLands.getOwnerName(pos)~="" and modTradeLands.canInteract(pos, playername))
|
or (
|
||||||
or (minetest.get_modpath("areas") and #areas:getNodeOwners(pos)>=1 and areas.canInteract(pos, playername))
|
minetest.get_modpath("tradelands")
|
||||||
then
|
and modTradeLands.getOwnerName(pos)~=""
|
||||||
return true
|
and modTradeLands.canInteract(pos, playername)
|
||||||
end
|
) or (
|
||||||
return false
|
minetest.get_modpath("areas")
|
||||||
|
and #areas:getNodeOwners(pos)>=1
|
||||||
|
and areas:canInteract(pos, playername)
|
||||||
|
)
|
||||||
|
then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local box_format = {
|
local box_format = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue