1.72b
only for test
This commit is contained in:
parent
2ed1046572
commit
c03293b6f3
@ -1 +1,2 @@
|
||||
default
|
||||
character_creator
|
@ -26,13 +26,26 @@ for i in ipairs(source_list) do
|
||||
local green = source_list[i][5]
|
||||
local blue = source_list[i][6]
|
||||
|
||||
if wieldskin == "white" then
|
||||
|
||||
wieldskin2 = "color_handwhite.png^(color_handwhite2.png^[colorize:#"..colour..":70)"
|
||||
|
||||
elseif wieldskin == "black" then
|
||||
|
||||
wieldskin2 = "color_handblack.png^(color_handwhite2.png^[colorize:#"..colour..":70)"
|
||||
|
||||
else
|
||||
|
||||
wieldskin2 = "color_handwhite.png^(color_handwhite2.png^[colorize:#"..colour..":70)"
|
||||
|
||||
end
|
||||
|
||||
minetest.register_node("color:" .. name, {
|
||||
|
||||
description = desc .. " color",
|
||||
|
||||
inventory_image = "blocks.png^[colorize:#"..colour..":70",
|
||||
tiles = {"color_white.png^[colorize:#"..colour..":70"},
|
||||
wield_image = "color_handwhite.png^(color_handwhite2.png^[colorize:#"..colour..":70)",
|
||||
wield_image = wieldskin2,
|
||||
wield_scale = {x=1,y=1,z=0.5},
|
||||
is_ground_content = true,
|
||||
groups = {snappy = 2, choppy = 2, wool = 2},
|
||||
|
BIN
mods/Nodes/color/textures/color_handblack.png
Normal file
BIN
mods/Nodes/color/textures/color_handblack.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@ -96,6 +96,7 @@ local function load_skin(player)
|
||||
player:set_attribute("character_creator:height", skin_default.height)
|
||||
|
||||
local function load_data(data_name)
|
||||
|
||||
local key = player:get_attribute("character_creator:" .. data_name)
|
||||
local index = table.indexof(skins_array[data_name], key)
|
||||
if index == -1 then
|
||||
@ -173,6 +174,22 @@ local function change_skin(player)
|
||||
|
||||
local name = player:get_player_name()
|
||||
|
||||
wieldskin3 = player:get_attribute("character_creator:skin")
|
||||
|
||||
if wieldskin3 == "skinwhite.png" then
|
||||
|
||||
wieldskin = "white"
|
||||
|
||||
elseif wieldskin3 == "skinblack.png" then
|
||||
|
||||
wieldskin = "black"
|
||||
|
||||
else
|
||||
|
||||
wieldskin = "white"
|
||||
|
||||
end
|
||||
|
||||
if minetest.get_modpath("multiskin") then
|
||||
multiskin.layers[name].skin = texture
|
||||
armor:set_player_armor(player)
|
||||
@ -361,6 +378,16 @@ minetest.register_chatcommand("skin", {
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("say", {
|
||||
params = "<text>",
|
||||
description = "Send text to chat",
|
||||
privs = {talk = true},
|
||||
func = function( _ , text)
|
||||
minetest.chat_send_all(text)
|
||||
return true, "Text was sent successfully"
|
||||
end,
|
||||
})
|
||||
|
||||
if minetest.global_exists("unified_inventory") then
|
||||
unified_inventory.register_button("character_creator", {
|
||||
type = "image",
|
||||
|
Loading…
x
Reference in New Issue
Block a user