1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-27 11:10:37 +01:00
server-nalc/mods/mff/mff_pclasses/admin.lua
crabman77 8d2683b94b fix crash si class on_update() not defined
fix wrong stamina value to hunter
remove old call of function, moved to assign api
2017-04-20 02:22:17 +02:00

34 lines
988 B
Lua
Executable File

-----------------
-- Admin class --
-----------------
--
-- https://github.com/MinetestForFun/minetest-minetestforfun-server/issues/139
--
pclasses.api.register_class("admin", {
on_assigned = function(pname, inform)
if inform then
minetest.chat_send_player(pname, "Hello admin.")
end
end,
on_unassigned = function(pname)
end,
on_update = function(pname)
-- No specific armor changes, no code
end,
switch_params = {
color = {r = 255, g = 00, b = 224},
holo_item = "maptools:pick_admin"
},
informations = "There's not much to say"
})
pclasses.api.reserve_item("admin", "3d_armor:helmet_admin")
pclasses.api.reserve_item("admin", "3d_armor:chestplate_admin")
pclasses.api.reserve_item("admin", "3d_armor:leggings_admin")
pclasses.api.reserve_item("admin", "3d_armor:boots_admin")
pclasses.api.reserve_item("admin", "shields:shield_admin")
pclasses.api.reserve_item("admin", "maptools:pick_admin")
pclasses.api.reserve_item("admin", "maptools:pick_admin_with_drops")