1.72b
only for test
This commit is contained in:
parent
2ed1046572
commit
c03293b6f3
@ -1 +1,2 @@
|
|||||||
default
|
default
|
||||||
|
character_creator
|
@ -26,13 +26,26 @@ for i in ipairs(source_list) do
|
|||||||
local green = source_list[i][5]
|
local green = source_list[i][5]
|
||||||
local blue = source_list[i][6]
|
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, {
|
minetest.register_node("color:" .. name, {
|
||||||
|
|
||||||
description = desc .. " color",
|
description = desc .. " color",
|
||||||
|
|
||||||
inventory_image = "blocks.png^[colorize:#"..colour..":70",
|
inventory_image = "blocks.png^[colorize:#"..colour..":70",
|
||||||
tiles = {"color_white.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},
|
wield_scale = {x=1,y=1,z=0.5},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {snappy = 2, choppy = 2, wool = 2},
|
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 |
@ -33,8 +33,8 @@ minetest.after(0, function()
|
|||||||
skin = associative_to_array(skins.skin),
|
skin = associative_to_array(skins.skin),
|
||||||
tshirt = associative_to_array(skins.tshirt),
|
tshirt = associative_to_array(skins.tshirt),
|
||||||
shoes = associative_to_array(skins.shoes),
|
shoes = associative_to_array(skins.shoes),
|
||||||
pants = associative_to_array(skins.pants),
|
pants = associative_to_array(skins.pants),
|
||||||
face = associative_to_array(skins.face),
|
face = associative_to_array(skins.face),
|
||||||
|
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
@ -96,6 +96,7 @@ local function load_skin(player)
|
|||||||
player:set_attribute("character_creator:height", skin_default.height)
|
player:set_attribute("character_creator:height", skin_default.height)
|
||||||
|
|
||||||
local function load_data(data_name)
|
local function load_data(data_name)
|
||||||
|
|
||||||
local key = player:get_attribute("character_creator:" .. data_name)
|
local key = player:get_attribute("character_creator:" .. data_name)
|
||||||
local index = table.indexof(skins_array[data_name], key)
|
local index = table.indexof(skins_array[data_name], key)
|
||||||
if index == -1 then
|
if index == -1 then
|
||||||
@ -109,8 +110,8 @@ local function load_skin(player)
|
|||||||
load_data("skin")
|
load_data("skin")
|
||||||
load_data("tshirt")
|
load_data("tshirt")
|
||||||
load_data("shoes")
|
load_data("shoes")
|
||||||
load_data("pants")
|
load_data("pants")
|
||||||
load_data("face")
|
load_data("face")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -126,7 +127,7 @@ local function save_skin(player)
|
|||||||
save_data("tshirt")
|
save_data("tshirt")
|
||||||
save_data("shoes")
|
save_data("shoes")
|
||||||
save_data("pants")
|
save_data("pants")
|
||||||
save_data("face")
|
save_data("face")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -173,6 +174,22 @@ local function change_skin(player)
|
|||||||
|
|
||||||
local name = player:get_player_name()
|
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
|
if minetest.get_modpath("multiskin") then
|
||||||
multiskin.layers[name].skin = texture
|
multiskin.layers[name].skin = texture
|
||||||
armor:set_player_armor(player)
|
armor:set_player_armor(player)
|
||||||
@ -361,6 +378,16 @@ minetest.register_chatcommand("skin", {
|
|||||||
end
|
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
|
if minetest.global_exists("unified_inventory") then
|
||||||
unified_inventory.register_button("character_creator", {
|
unified_inventory.register_button("character_creator", {
|
||||||
type = "image",
|
type = "image",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user