From d18677ebb1f2df102e3ab308ea6ce5f0763e34e9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Dec 2020 20:50:12 +0100 Subject: [PATCH] updates --- closet/api/api_container.lua | 9 ++- default_cloths/init.lua | 58 +++++++++++++++++ default_cloths/locale/default_cloths.es.tr | 17 +++++ default_cloths/mod.conf | 5 ++ default_cloths/textures/fabric_fabric.png | Bin 0 -> 1251 bytes fabric/init.lua | 69 +++++++++++++++++++++ fabric/locale/fabric.es.tr | 17 +++++ fabric/mod.conf | 5 ++ fabric/textures/fabric_fabric.png | Bin 0 -> 1251 bytes mirrors/init.lua | 2 - 10 files changed, 177 insertions(+), 5 deletions(-) create mode 100644 default_cloths/init.lua create mode 100644 default_cloths/locale/default_cloths.es.tr create mode 100644 default_cloths/mod.conf create mode 100644 default_cloths/textures/fabric_fabric.png create mode 100644 fabric/init.lua create mode 100644 fabric/locale/fabric.es.tr create mode 100644 fabric/mod.conf create mode 100644 fabric/textures/fabric_fabric.png diff --git a/closet/api/api_container.lua b/closet/api/api_container.lua index 9dca902..9474c1b 100644 --- a/closet/api/api_container.lua +++ b/closet/api/api_container.lua @@ -7,7 +7,7 @@ function closet.container.get_container_formspec(pos, clicker) local texture if minetest.get_modpath("3d_armor")~=nil then local clicker_name = clicker:get_player_name() - texture = armor.textures[clicker_name].skin..",".. + texture = minetest.formspec_escape(armor.textures[clicker_name].skin)..",".. armor.textures[clicker_name].armor..","..armor.textures[clicker_name].wielditem else texture = clicker:get_properties().textures[1] @@ -16,6 +16,7 @@ function closet.container.get_container_formspec(pos, clicker) local formspec = "size[8,8.25]" .. + "style[preview_model;frame_loop=0,79]".. "model[0,0;5,5;preview_model;"..model..";"..texture..";-10,195]" .. "list[current_player;cloths;3,0.25;1,4]" .. "list[nodemeta:" .. spos .. ";closet;5,0.25;3,12;]" .. @@ -29,12 +30,14 @@ end minetest.register_allow_player_inventory_action(function(player, action, inventory, inventory_info) local stack - if action == "move" and inventory_info.to_list == "cloths" then --for moving items from player inventory list 'main' to 'cloths' + if action == "move" and inventory_info.to_list == "cloths" then + --for moving items from player inventory list 'main' to 'cloths' if inventory_info.from_list == inventory_info.to_list then --for moving inside the 'cloths' inventory return 1 end stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index) - elseif action == "put" and inventory_info.listname == "cloths" then --for moving from node inventory 'closet' to player inventory 'cloths' + elseif action == "put" and inventory_info.listname == "cloths" then + --for moving from node inventory 'closet' to player inventory 'cloths' stack = inventory_info.stack else return diff --git a/default_cloths/init.lua b/default_cloths/init.lua new file mode 100644 index 0000000..598792f --- /dev/null +++ b/default_cloths/init.lua @@ -0,0 +1,58 @@ +-- +-- default_cloths +-- License:GPLv3 +-- + +-- +-- Default Cloths +-- + +minetest.register_craft({ + output = "player_api:cloth_female_upper_default", + type = "shaped", + recipe = { + {"fabric:violet", "", "fabric:violet"}, + {"fabric:dark_grey", "fabric:dark_grey", "fabric:dark_grey"}, + {"fabric:violet", "fabric:violet", "fabric:violet"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_male_upper_default", + type = "shaped", + recipe = { + {"fabric:black", "", "fabric:black"}, + {"fabric:green", "fabric:green", "fabric:green"}, + {"fabric:brown", "fabric:brown", "fabric:brown"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_male_lower_default", + type = "shaped", + recipe = { + {"fabric:blue", "fabric:blue", "fabric:blue"}, + {"fabric:blue", "", "fabric:blue"}, + {"fabric:black", "", "fabric:black"}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_female_lower_default", + type = "shaped", + recipe = { + {"fabric:blue", "fabric:blue", "fabric:blue"}, + {"fabric:white", "", "fabric:white"}, + {"", "", ""}, + } +}) + +minetest.register_craft({ + output = "player_api:cloth_female_head_default", + type = "shaped", + recipe = { + {"fabric:pink", "", ""}, + {"", "fabric:pink", ""}, + {"", "", ""}, + } +}) diff --git a/default_cloths/locale/default_cloths.es.tr b/default_cloths/locale/default_cloths.es.tr new file mode 100644 index 0000000..aa08efd --- /dev/null +++ b/default_cloths/locale/default_cloths.es.tr @@ -0,0 +1,17 @@ +# textdomain: fabric +@1 Cotton Fabric=Tela de algodón @1 +White=blanca +Grey=gris +Dark Grey=gris oscura +Black=negra +Violet=violeta +Blue=azul +Cyan=azul claro +Dark Green=verde oscuro +Green=verde +Yellow=amarilla +Brown=marrón +Orange=naranja +Red=roja +Magenta=magenta +Pink=rosa diff --git a/default_cloths/mod.conf b/default_cloths/mod.conf new file mode 100644 index 0000000..cba00b9 --- /dev/null +++ b/default_cloths/mod.conf @@ -0,0 +1,5 @@ +name = default_cloths +description = Craft the default player_api cloths +depends = player_api +optional_depends = +version = diff --git a/default_cloths/textures/fabric_fabric.png b/default_cloths/textures/fabric_fabric.png new file mode 100644 index 0000000000000000000000000000000000000000..22b4b8d43f36b15ff5899bf8631b571ce5f7421a GIT binary patch literal 1251 zcmV<91RVQ`P)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{00c`(L_t(o!^M}&FLPZK#-G!E z-nzFT716{cE+K9;5R)PXj0l1lAYp9muMn5g#E6Jn&_o0?B`y^ebtlBV)ka#?Xf&$Y z)Af$X=c8{=&nJ1GWKT|3*8XMhb=H0s@R!8^01fu)bbWmt6o7!sQL!vbp`oFFjFC#E zsHmvG?CdOUZEbPBhJXN9S648b&Cu)h0h3825;Qe6!C)}Z#l;2pV(@oFMxzlbm5Pi; zBiZeC+TGnHE_!%)psubi+S}Xve>Kq4(?gGskDu=O;NXB0gxzkZ-rio~4KOw~Mi&+5T}y}jiGVKSNg{-U2c;nLC) z3GgWD*=(F*kB^V3udk23y@LM!e!pEVkoNZW$mw))irwGer|#}<`qGHf)6<#d+65-+D2nh+n%gYPQW;2qKl2Bh?&wO;k%F0ScqtW2$>4_IWad9zrcXz?E z?8i5~UJt9)ih_ayWMpI@IXM~m`T5At&xhS^|K1NwOiWN?Vh12OoU0ogX&wrEnd_HD#bCVPbMbH33p%4m% z0$QyWa=9GQ(b4dDJgBOwf=ng@%d#+;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