1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Edit colors of class switches

- Solves #216
This commit is contained in:
LeMagnesium
2015-08-16 15:28:15 +02:00
parent 195a0822a2
commit e281845f45
6 changed files with 7 additions and 4 deletions

View File

@ -3,7 +3,7 @@
--
pclasses.api.register_class("adventurer", {
orb_color = { r = 255, g = 200, b = 200 },
switch_color = { r = 142, g = 00, b = 00},
on_assigned = function(pname)
minetest.chat_send_player(pname, "You are now an adventurer")
end

View File

@ -14,7 +14,7 @@ function pclasses.api.register_class(cname, def)
cname .. ". Reason : no definition table.")
return
end
pclasses.register_class_switch_orb(cname, def.orb_color)
pclasses.register_class_switch(cname, def.switch_color)
pclasses.classes[cname] = def
return true

View File

@ -64,7 +64,7 @@ local classes_items = {
["adventurer"] = "unified_inventory:bag_large"
}
function pclasses.register_class_switch_orb(cname, color)
function pclasses.register_class_switch(cname, color)
color = color or { r = 255, g = 255, b = 255 }
local txtcolor = string.format("#%02x%02x%02x", color.r, color.g, color.b)
local overlay = "pclasses_class_switch_orb_overlay.png"