mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-08 19:40:21 +01:00
743507564f
- Moved the holographic item's name as a field in switch_params (pclasses.api.register_class) - Added wizard class' skeleton for later - Fixed a few bugs in nodes, inventory and api - Splitted tick function to bury items in two - Items from 3d_armor's armor inventory are also affected by inventory vacuuming (from tick function). The player's static armor inventory is first cleared, then copied to the detached one, then armor updates everything else (rendering, model, etc) - Fixed itemname of admin shield to reserve it properly - Return graveyard inventory if it already exists. Do not create it every two seconds
26 lines
799 B
Lua
Executable File
26 lines
799 B
Lua
Executable File
-----------------
|
|
-- Admin class --
|
|
-----------------
|
|
|
|
--
|
|
-- https://github.com/MinetestForFun/minetest-minetestforfun-server/issues/139
|
|
--
|
|
|
|
pclasses.api.register_class("admin", {
|
|
on_assigned = function(pname)
|
|
minetest.chat_send_player(pname, "Hello admin.")
|
|
end,
|
|
switch_params = {
|
|
color = {r = 255, g = 00, b = 224},
|
|
holo_item = "maptools:pick_admin"
|
|
}
|
|
})
|
|
|
|
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")
|