mirror of
https://codeberg.org/usrib/emeraldbank.git
synced 2024-08-18 20:34:04 +02:00
el privilegio de admin para tiendas ya no es server
ahora es admin_shop
This commit is contained in:
parent
46875a8b1d
commit
b14ae5c5f4
10
shop.lua
10
shop.lua
@ -23,6 +23,12 @@ local S = core.get_translator(core.get_current_modname())
|
||||
|
||||
local shopcraft = core.settings:get_bool("emeraldbank.shop_craft") or true
|
||||
|
||||
-- privilege
|
||||
core.register_privilege("admin_shop", {
|
||||
description = "Permission edit others shops",
|
||||
give_to_singleplayer = false,
|
||||
})
|
||||
|
||||
local shop_timer = 5
|
||||
|
||||
local stock_h = 3
|
||||
@ -48,7 +54,7 @@ function emeraldbank.get_shop_fs(pos, clicker)
|
||||
local owner = meta:get_string("owner")
|
||||
local player_press_key = clicker:get_player_control().aux1
|
||||
local shop_fs = ""
|
||||
local is_admin = core.check_player_privs(pname, {server=true})
|
||||
local is_admin = core.check_player_privs(pname, {admin_shop=true})
|
||||
if (pname == owner or is_admin) and not player_press_key then
|
||||
shop_fs = "size[9,8.75]"..
|
||||
"label[0,0;"..S("Your stock:").."]"..
|
||||
@ -169,7 +175,7 @@ core.register_node("emeraldbank:shop", {
|
||||
|
||||
can_dig = function(pos, player)
|
||||
local pname = player:get_player_name()
|
||||
local is_admin = core.check_player_privs(pname, {server=true})
|
||||
local is_admin = core.check_player_privs(pname, {admin_shop=true})
|
||||
local meta = core.get_meta(pos)
|
||||
local owner = meta:get_string("owner")
|
||||
local inv = meta:get_inventory()
|
||||
|
Loading…
Reference in New Issue
Block a user