1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01: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

@ -9,7 +9,8 @@
pclasses.api.register_class("admin", {
on_assigned = function(pname)
minetest.chat_send_player(pname, "Hello admin.")
end
end,
switch_color = {r = 255, g = 00, b = 224}
})
pclasses.api.reserve_item("admin", "3d_armor:helmet_admin")

View File

@ -21,6 +21,7 @@ pclasses.api.register_class("hunter", {
on_unassigned = function(pname)
sprint.set_default_maxstamina(pname)
end,
switch_color = {r = 60, g = 75, b = 00}
})

View File

@ -16,6 +16,7 @@ pclasses.api.register_class("warrior", {
on_unassigned = function(pname)
sprint.set_default_maxstamina(pname)
end,
switch_color = {r = 00, g = 00, b = 114}
})
pclasses.api.reserve_item("warrior", "moreores:sword_mithril")

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"