mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
[pclasses] Create superuser classes
- Create superuser class 'admin' - Fix #310
This commit is contained in:
parent
731e219fe5
commit
56422e2607
@ -78,7 +78,7 @@ pclasses.api.util.does_wear_full_armor = function(pname, material, noshield)
|
||||
end
|
||||
|
||||
function pclasses.api.util.can_have_item(pname, itemname)
|
||||
if not pclasses.data.reserved_items[itemname] then
|
||||
if not pclasses.data.reserved_items[itemname] or (pclasses.conf.superuser_class and pclasses.api.get_player_class(pname) == pclasses.conf.superuser_class) then
|
||||
return true
|
||||
end
|
||||
for index, class in pairs(pclasses.data.reserved_items[itemname]) do
|
||||
|
@ -15,6 +15,7 @@ pclasses.api.util = {}
|
||||
-- Configuration
|
||||
pclasses.conf = {}
|
||||
pclasses.conf.default_class = "adventurer"
|
||||
pclasses.conf.superuser_class = "admin"
|
||||
pclasses.conf.save_interval = 3 * 60
|
||||
pclasses.conf.datafile = minetest.get_worldpath() .. "/pclasses"
|
||||
pclasses.conf.gravefile = minetest.get_worldpath() .. "/graveyards"
|
||||
|
Loading…
Reference in New Issue
Block a user