1
0
Fork 0

fix mcl_armor inventory images

This commit is contained in:
AFCMS 2022-05-01 00:37:22 +02:00
parent b4611dc20f
commit 126d74b428
Signed by untrusted user: AFCMS
GPG Key ID: 8720389A25B652E3
1 changed files with 20 additions and 8 deletions

View File

@ -75,17 +75,29 @@ mcl_armor.register_set({
legs = get_texture_function("mcl_armor_leggings_leather.png"),
feet = get_texture_function("mcl_armor_boots_leather.png"),
},
inventory = {
head = "mcl_armor_inv_helmet_leather.png",
torso = "mcl_armor_inv_chestplate_leather.png",
legs = "mcl_armor_inv_leggings_leather.png",
feet = "mcl_armor_inv_boots_leather.png",
},
repair_material = "mcl_mobitems:leather",
})
minetest.register_chatcommand("colort", {
params = "", -- Short parameter description
description = "", -- Full description
func = function(name, params)
-- This command is only temporary
minetest.register_chatcommand("color_leather", {
params = "<color>",
description = "Colorize a leather armor",
func = function(name, param)
local player = minetest.get_player_by_name(name)
if player then
local item = player:get_wielded_item()
item:get_meta():set_string("color", "#951d1d")
item:get_meta():set_string("color", param)
player:set_wielded_item(item)
return true, "Done."
else
return false, "Player isn't online"
end
end,
})