mirror of
https://gitlab.com/lunovox/minertrade.git
synced 2025-03-15 05:31:20 +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
|
||||
|
||||
modMinerTrade.dispensing.canOpen = function(pos, playername)
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
if
|
||||
meta:get_string("owner")==playername
|
||||
or (minetest.get_modpath("tradelands") and modTradeLands.getOwnerName(pos)~="" and modTradeLands.canInteract(pos, playername))
|
||||
or (minetest.get_modpath("areas") and #areas:getNodeOwners(pos)>=1 and areas.canInteract(pos, playername))
|
||||
then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
if
|
||||
meta:get_string("owner")==playername
|
||||
or (
|
||||
minetest.get_modpath("tradelands")
|
||||
and modTradeLands.getOwnerName(pos)~=""
|
||||
and modTradeLands.canInteract(pos, playername)
|
||||
) or (
|
||||
minetest.get_modpath("areas")
|
||||
and #areas:getNodeOwners(pos)>=1
|
||||
and areas:canInteract(pos, playername)
|
||||
)
|
||||
then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local box_format = {
|
||||
|
|
Loading…
Add table
Reference in a new issue