forked from VoxeLibre/VoxeLibre
some fixes
This commit is contained in:
parent
95e165b50b
commit
b4611dc20f
|
@ -39,11 +39,15 @@ end
|
||||||
|
|
||||||
local function get_texture_function(texture)
|
local function get_texture_function(texture)
|
||||||
local function get_texture(obj, itemstack)
|
local function get_texture(obj, itemstack)
|
||||||
|
minetest.chat_send_all("called")
|
||||||
local color = itemstack:get_meta():get_string("color")
|
local color = itemstack:get_meta():get_string("color")
|
||||||
|
minetest.chat_send_all("|"..color.."|")
|
||||||
if color == "" or color == nil then
|
if color == "" or color == nil then
|
||||||
|
minetest.chat_send_all("No color: "..texture)
|
||||||
return texture
|
return texture
|
||||||
else
|
else
|
||||||
return texture.."[colorize:"..color..":"..colorize_value
|
minetest.chat_send_all("Color: "..texture.."^[colorize:"..color..":"..colorize_value)
|
||||||
|
return texture.."^[colorize:"..color..":"..colorize_value
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return get_texture
|
return get_texture
|
||||||
|
@ -75,11 +79,13 @@ mcl_armor.register_set({
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_chatcommand("colort", {
|
minetest.register_chatcommand("colort", {
|
||||||
params = "<name> <privilege>", -- Short parameter description
|
params = "", -- Short parameter description
|
||||||
description = "Remove privilege from player", -- Full description
|
description = "", -- Full description
|
||||||
func = function(name, param)
|
func = function(name, params)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
local item = player:get_wielded_item()
|
local item = player:get_wielded_item()
|
||||||
item:get_meta():set_string("color", "#951d1d")
|
item:get_meta():set_string("color", "#951d1d")
|
||||||
|
player:set_wielded_item(item)
|
||||||
|
return true, "Done."
|
||||||
end,
|
end,
|
||||||
})
|
})
|
Loading…
Reference in New Issue