1
0
Fork 0

fix mcl_armor inventory images

dyable-leather-armor
AFCMS 2022-05-01 00:37:22 +02:00
parent b4611dc20f
commit 126d74b428
No known key found for this signature in database
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"), legs = get_texture_function("mcl_armor_leggings_leather.png"),
feet = get_texture_function("mcl_armor_boots_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", repair_material = "mcl_mobitems:leather",
}) })
minetest.register_chatcommand("colort", { -- This command is only temporary
params = "", -- Short parameter description
description = "", -- Full description minetest.register_chatcommand("color_leather", {
func = function(name, params) params = "<color>",
description = "Colorize a leather armor",
func = function(name, param)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
local item = player:get_wielded_item() if player then
item:get_meta():set_string("color", "#951d1d") local item = player:get_wielded_item()
player:set_wielded_item(item) item:get_meta():set_string("color", param)
return true, "Done." player:set_wielded_item(item)
return true, "Done."
else
return false, "Player isn't online"
end
end, end,
}) })