From 80fb59f9ac37b359c0b667af03e16d20d1645e0d Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 20 Jan 2022 09:22:17 +0100 Subject: [PATCH 01/13] add barrel --- mods/CORE/mcl_util/init.lua | 19 +++ mods/ITEMS/mcl_barrels/init.lua | 141 ++++++++++++++++++ .../mcl_barrels/locale/mcl_barrels.de.tr | 1 + .../mcl_barrels/locale/mcl_barrels.es.tr | 1 + .../mcl_barrels/locale/mcl_barrels.fr.tr | 1 + .../mcl_barrels/locale/mcl_barrels.pl.tr | 1 + .../mcl_barrels/locale/mcl_barrels.ru.tr | 1 + mods/ITEMS/mcl_barrels/locale/template.txt | 1 + mods/ITEMS/mcl_barrels/mod.conf | 3 + .../textures/mcl_barrels_barrel_bottom.png | Bin 0 -> 542 bytes .../textures/mcl_barrels_barrel_side.png | Bin 0 -> 499 bytes .../textures/mcl_barrels_barrel_top.png | Bin 0 -> 566 bytes .../textures/mcl_barrels_barrel_top_open.png | Bin 0 -> 421 bytes mods/ITEMS/mcl_chests/init.lua | 17 +-- mods/ITEMS/mcl_core/nodes_trees.lua | 1 - 15 files changed, 170 insertions(+), 17 deletions(-) create mode 100644 mods/ITEMS/mcl_barrels/init.lua create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/template.txt create mode 100644 mods/ITEMS/mcl_barrels/mod.conf create mode 100755 mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png create mode 100755 mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_side.png create mode 100755 mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top.png create mode 100755 mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top_open.png diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 9be40a1e4..a9e8e7319 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -357,6 +357,25 @@ function mcl_util.get_first_occupied_inventory_slot(inventory, listname) return mcl_util.get_eligible_transfer_item_slot(inventory, listname) end +function mcl_util.drop_items_container_get(listname) + return function(pos, oldnode, oldmetadata) + local meta = minetest.get_meta(pos) + local meta2 = meta:to_table() + if oldmetadata then + meta:from_table(oldmetadata) + end + local inv = meta:get_inventory() + for i = 1, inv:get_size(listname) do + local stack = inv:get_stack(listname, i) + if not stack:is_empty() then + local p = vector.add(pos, vector.new(math.random(0, 10)/10 - 0.5, 0, math.random(0, 10)/10 - 0.5)) + minetest.add_item(p, stack) + end + end + meta:from_table(meta2) + end +end + -- Returns true if item (itemstring or ItemStack) can be used as a furnace fuel. -- Returns false otherwise function mcl_util.is_fuel(item) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua new file mode 100644 index 000000000..cec2f46d0 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -0,0 +1,141 @@ +local S = minetest.get_translator("mcl_barrels") +local F = minetest.formspec_escape +local C = minetest.colorize + +--TODO: add craft +--TODO: add french translation +--TODO: complete ingame help and tooltips +--TODO: fix barrel rotation placement + +local open_barrels = {} + +local drop_content = mcl_util.drop_items_container_get("main") + +local function on_blast(pos) + local node = minetest.get_node(pos) + drop_content(pos, node) + minetest.remove_node(pos) +end + +local function barrel_open(pos, node, clicker) + local name = minetest.get_meta(pos):get_string("name") + + if name == "" then + name = S("Barrel") + end + + local playername = clicker:get_player_name() + + minetest.show_formspec(playername, + "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z, + table.concat({ + "size[9,8.75]", + "label[0,0;"..F(C("#313131", name)).."]", + "list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0.5;9,3;]", + mcl_formspec.get_itemslot_bg(0, 0.5, 9, 3), + "label[0,4.0;"..F(C("#313131", S("Inventory"))).."]", + "list[current_player;main;0,4.5;9,3;9]", + mcl_formspec.get_itemslot_bg(0, 4.5, 9, 3), + "list[current_player;main;0,7.74;9,1;]", + mcl_formspec.get_itemslot_bg(0, 7.74, 9, 1), + "listring[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main]", + "listring[current_player;main]", + }) + ) + + minetest.swap_node(pos, { name = "mcl_barrels:barrel_open", param2 = node.param2 }) + open_barrels[playername] = pos +end + +local function close_forms(pos) + local players = minetest.get_connected_players() + local formname = "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z + for p = 1, #players do + if vector.distance(players[p]:get_pos(), pos) <= 30 then + minetest.close_formspec(players[p]:get_player_name(), formname) + end + end +end + +local function update_after_close(pos) + local node = minetest.get_node_or_nil(pos) + if not node then return end + if node.name == "mcl_barrels:barrel_open" then + minetest.swap_node(pos, {name = "mcl_barrels:barrel_closed", param2 = node.param2}) + end +end + +local function close_barrel(player) + local name = player:get_player_name() + local open = open_barrels[name] + if open == nil then + return + end + + update_after_close(open) + + open_barrels[name] = nil +end + +minetest.register_node("mcl_barrels:barrel_closed", { + description = S("Barrel"), + --_tt_help = tt_help, + --_doc_items_longdesc = longdesc, + --_doc_items_usagehelp = usagehelp, + tiles = {"mcl_barrels_barrel_top.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, + paramtype = "light", + paramtype2 = "facedir", + --on_place = mcl_util.rotate_axis, + on_place = function(itemstack, placer, pointed_thing) + minetest.rotate_and_place(itemstack, placer, pointed_thing, minetest.is_creative_enabled(placer:get_player_name()), {}, false) + return itemstack + end, + stack_max = 64, + sounds = mcl_sounds.node_sound_wood_defaults(), + groups = {handy = 1, axey = 1, container = 2, material_wood = 1, flammable = -1, deco_block = 1}, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("main", 9*3) + end, + after_place_node = function(pos, placer, itemstack, pointed_thing) + minetest.get_meta(pos):set_string("name", itemstack:get_meta():get_string("name")) + end, + after_dig_node = drop_content, + on_blast = on_blast, + on_rightclick = barrel_open, + on_destruct = close_forms, + _mcl_blast_resistance = 2.5, + _mcl_hardness = 2.5, +}) + +minetest.register_node("mcl_barrels:barrel_open", { + description = S("Barrel Open"), + --_tt_help = tt_help, + --_doc_items_longdesc = longdesc, + --_doc_items_usagehelp = usagehelp, + _doc_items_create_entry = false, + tiles = {"mcl_barrels_barrel_top_open.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, + paramtype = "light", + paramtype2 = "facedir", + drop = "mcl_barrels:barrel_closed", + stack_max = 64, + sounds = mcl_sounds.node_sound_wood_defaults(), + groups = {handy = 1, axey = 1, container = 2, material_wood = 1, flammable = -1, deco_block = 1, not_in_creative_inventory = 1}, + after_dig_node = drop_content, + on_blast = on_blast, + on_rightclick = barrel_open, + on_destruct = close_forms, + _mcl_blast_resistance = 2.5, + _mcl_hardness = 2.5, +}) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname:find("mcl_barrels:") == 1 and fields.quit then + close_barrel(player) + end +end) + +minetest.register_on_leaveplayer(function(player) + close_barrel(player) +end) \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt new file mode 100644 index 000000000..9d12a17cd --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/template.txt @@ -0,0 +1 @@ +# textdomain: mcl_barrels \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/mod.conf b/mods/ITEMS/mcl_barrels/mod.conf new file mode 100644 index 000000000..2b0088b79 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/mod.conf @@ -0,0 +1,3 @@ +name = mcl_barrels +depends = mcl_util, mcl_formspec, mcl_sounds +author = AFCMS \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png b/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png new file mode 100755 index 0000000000000000000000000000000000000000..9c5788061835706c6f4045a97ef519f3741ad999 GIT binary patch literal 542 zcmV+(0^$9MP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qRNAp5A0000XbVXQnLvm$dbZKvHAXI5>WdJfTF*7U;qFCU`a$lR5(v{l0Q$wFc8Jb#f@E&G&D_G3azNRFd#9o zFfg#NG4cIB07wX^}$@QE?LY4_>tYMrO< zbeKWYe)8t)=;{6jQPX@K?a;OxthGt-19h%PE=hWV8bYS?YQVv4Qs6+Bvl2QU4XTqA z0WvDfy6(~ticOu>WH?xkl%lgH#-TBxQKBIra|!-tyH!fl>HuVFg|W1j9w>;!YMnp< zVxd1Jnj=iFprG!nk65&UkmEn7tQ(p;Ce$~-HyH3|!EWexU*l0hbA$^3S~iSFa5prs z26*ATspgWm@B{~|5Xe|&LPvdpVoL>ALx_1R9#yk}%F8L|@@xtx!k gHG^YoB=$}F1C39vlPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jUA5 z5Ge)$lJ5xs00DDJL_t(I%gvKZZxb;Tg}+W`JRad8G^0qV3SvV+ND(aA^#A_=wyOmKD+t)@o}OgsuFa@qbkAe>Yh*UW-MFH{Gw)~ z4XeA3iITXmr>QGCUsG43SQamx85eD|;a{=TK3gmnj{sHG zGfOD}P)d!9x()zqEda*!4f1%2XC!OemSdzj5&5M$=W6zvwKg<$h2K4(t>gXd4a-(@ zecABi_nK{I`Sy9vuhkt*U9r}N?e=f4f!{q)%MvBalMdQ?<`?x~ALnJyi4FiC!n68$ zPA$bjn}TJldp!=hBZ3sx?glb#Jue}1&LfJ9GCw~FrlUvF6N0i7!@F*@!G%3i7Q^W2 z$S&*=#dzrdU=OCnp2_6Zu;=lUeED$2MjNJw-T(gcmg~1ud$n#N$ pREwy?iHOIDzH}$bQVez~Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2jUA5 z5Go^KyJ(F700Fj1L_t(I%Y~E8Zqq;%g})|a&sgyg<4_7xMJ2YZV8fCPFTl(4AQ3y* zpte%l$ZnExH9t;M7LMIGb;a3?d}cgz&$;KGeE<6CQ7cKV6G~%=qY;I%T%2Z<#&*1M z9<3xTa-HyZx#HxxAX1>WEw?0B99=KN%N#+^@@9 zoU57X1W_6bfD~iGcFW?<@b0z7xIk$vVY}@vTI^RT#-Je7J476f@IDY{DY;I1FAr7G zK6qPfnhJ_NadlH-++V;xuEvzUTZb@0BalF|iN;9WT>yvzaQ^m1|6_ zoM$?nbmjk?Ujp#?Lq@7(PsX7fzkMLr2_jXJ>*a>UonZlF*(+A74V4X4Hgv|d)x^=L zlT#Y|)P-0Ga-EPmPx|(ZmryxRsCSL=(FkFj$NRw5P04Z<|2II-Oq}V2_4=NV=WlqQ zHT@sbecaCZpXQL70(Y)*K0-AbW|YuPggwCIK!T=@W7fo&!x$^>lFzu{b?9 z*w+8Bfk5rnr2CO)HA5Gj`^%W4)1&i;@!$U=F{)Zc6W&H-Nghz-Y;?L`_Wbv!z16dq zx9{#YSSZ$gu2N#{1*`tUb?xVVUVQJ=VxYKKtb6)n&e_k8|L*1%R8-M9xMu&)BALx? z1`AgleN^#^k-?B}^Mj>x9a99HoRq~}pa01!xZgfAcAAZLOlUOE%br6SrrvRCdVhCb zc>P*hYGc6L=PcV7l*+x@a6k6#J~PgVjRuZi6&J1A_W#|vHG$o&S~J5m_p}KJSv_C4 zOS)X(F~effDcprAiC$OzXB^vd&e=36Kh1H*g0_-*x*K&WOD8Rze`0~y@6uB)X=MTX zYuisSFjzge_nR51++t$)XR6y`(Jr0KZaQrxa;a8ZH_zF8WVv?@yV=xff0);(>;Q%# NgQu&X%Q~loCIAn3txf;{ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index ad5c781f7..aba91fe87 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -291,22 +291,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile end end - local function drop_items_chest(pos, oldnode, oldmetadata) - local meta = minetest.get_meta(pos) - local meta2 = meta:to_table() - if oldmetadata then - meta:from_table(oldmetadata) - end - local inv = meta:get_inventory() - for i=1,inv:get_size("main") do - local stack = inv:get_stack("main", i) - if not stack:is_empty() then - local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} - minetest.add_item(p, stack) - end - end - meta:from_table(meta2) - end + local drop_items_chest = mcl_util.drop_items_container_get("main") local function on_chest_blast(pos) local node = minetest.get_node(pos) diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index a5ef7aa97..36ef28dc1 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -16,7 +16,6 @@ local function register_tree_trunk(subname, description_trunk, description_bark, _doc_items_hidden = false, tiles = {tile_inner, tile_inner, tile_bark}, paramtype2 = "facedir", - on_place = mcl_util.rotate_axis, stack_max = 64, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), From d41a83651464942a43b1df7fc701a31ba4b4125d Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 20 Jan 2022 09:40:15 +0100 Subject: [PATCH 02/13] add craft --- mods/ITEMS/mcl_barrels/init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index cec2f46d0..f634c5246 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -138,4 +138,14 @@ end) minetest.register_on_leaveplayer(function(player) close_barrel(player) -end) \ No newline at end of file +end) + +--Minecraft Java Edition craft +minetest.register_craft({ + output = "mcl_barrels:barrel_closed", + recipe = { + {"group:wood", "group:wood_slab", "group:wood"}, + {"group:wood", "", "group:wood"}, + {"group:wood", "group:wood_slab", "group:wood"}, + } +}) \ No newline at end of file From 34b445b04a540656ba8a10cf0789ecaaa9637fa9 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Thu, 20 Jan 2022 09:51:29 +0100 Subject: [PATCH 03/13] fixes --- mods/ITEMS/mcl_barrels/init.lua | 1 - mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/template.txt | 3 ++- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index f634c5246..f918996dd 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -2,7 +2,6 @@ local S = minetest.get_translator("mcl_barrels") local F = minetest.formspec_escape local C = minetest.colorize ---TODO: add craft --TODO: add french translation --TODO: complete ingame help and tooltips --TODO: fix barrel rotation placement diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr index 9d12a17cd..aa73208a6 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr index 9d12a17cd..aa73208a6 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr index 9d12a17cd..7cad1e130 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel=Tonneau \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr index 9d12a17cd..aa73208a6 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr index 9d12a17cd..aa73208a6 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt index 9d12a17cd..aa73208a6 100644 --- a/mods/ITEMS/mcl_barrels/locale/template.txt +++ b/mods/ITEMS/mcl_barrels/locale/template.txt @@ -1 +1,2 @@ -# textdomain: mcl_barrels \ No newline at end of file +# textdomain: mcl_barrels +Barrel= \ No newline at end of file From e3e06b4a4bc01410e31ad1c6c5b0731b9e75f865 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sat, 22 Jan 2022 14:59:15 +0100 Subject: [PATCH 04/13] fix broken tree placement --- mods/ITEMS/mcl_core/nodes_trees.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index 36ef28dc1..a5ef7aa97 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -16,6 +16,7 @@ local function register_tree_trunk(subname, description_trunk, description_bark, _doc_items_hidden = false, tiles = {tile_inner, tile_inner, tile_bark}, paramtype2 = "facedir", + on_place = mcl_util.rotate_axis, stack_max = 64, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), From b88060dbfbb3cab1a594e0637264e129f6fa02cb Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 6 Feb 2022 19:04:13 +0100 Subject: [PATCH 05/13] add doc description to barrels --- mods/ITEMS/mcl_barrels/init.lua | 10 ++++------ mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr | 4 +++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr | 4 +++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr | 4 +++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr | 4 +++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr | 4 +++- mods/ITEMS/mcl_barrels/locale/template.txt | 4 +++- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index f918996dd..ac54497de 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -78,9 +78,8 @@ end minetest.register_node("mcl_barrels:barrel_closed", { description = S("Barrel"), - --_tt_help = tt_help, - --_doc_items_longdesc = longdesc, - --_doc_items_usagehelp = usagehelp, + _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), + _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), tiles = {"mcl_barrels_barrel_top.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", @@ -110,9 +109,8 @@ minetest.register_node("mcl_barrels:barrel_closed", { minetest.register_node("mcl_barrels:barrel_open", { description = S("Barrel Open"), - --_tt_help = tt_help, - --_doc_items_longdesc = longdesc, - --_doc_items_usagehelp = usagehelp, + _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), + _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), _doc_items_create_entry = false, tiles = {"mcl_barrels_barrel_top_open.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, paramtype = "light", diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr index aa73208a6..2b85d7161 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel= \ No newline at end of file +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr index aa73208a6..2b85d7161 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel= \ No newline at end of file +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr index 7cad1e130..408a66c4d 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel=Tonneau \ No newline at end of file +Barrel=Tonneau +Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. +To access its inventory, rightclick it. When broken, the items will drop out.=Pour accéder à son inventaire, faites un clic droit dessus. Une fois cassés, les articles tomberont. \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr index aa73208a6..2b85d7161 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel= \ No newline at end of file +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr index aa73208a6..2b85d7161 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel= \ No newline at end of file +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt index aa73208a6..2b85d7161 100644 --- a/mods/ITEMS/mcl_barrels/locale/template.txt +++ b/mods/ITEMS/mcl_barrels/locale/template.txt @@ -1,2 +1,4 @@ # textdomain: mcl_barrels -Barrel= \ No newline at end of file +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file From 0988637ea1f3bacde4c0ced53889fa4a5248cdc9 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 6 Feb 2022 22:55:09 +0100 Subject: [PATCH 06/13] add barrel tooltip help text --- mods/ITEMS/mcl_barrels/init.lua | 2 ++ mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr | 3 ++- mods/ITEMS/mcl_barrels/locale/template.txt | 3 ++- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index ac54497de..d30b4e0e0 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -78,6 +78,7 @@ end minetest.register_node("mcl_barrels:barrel_closed", { description = S("Barrel"), + _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), tiles = {"mcl_barrels_barrel_top.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, @@ -109,6 +110,7 @@ minetest.register_node("mcl_barrels:barrel_closed", { minetest.register_node("mcl_barrels:barrel_open", { description = S("Barrel Open"), + _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), _doc_items_create_entry = false, diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr index 2b85d7161..e1fa1b603 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel= Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr index 2b85d7161..e1fa1b603 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel= Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr index 408a66c4d..0e93d1ee5 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel=Tonneau Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. -To access its inventory, rightclick it. When broken, the items will drop out.=Pour accéder à son inventaire, faites un clic droit dessus. Une fois cassés, les articles tomberont. \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.=Pour accéder à son inventaire, faites un clic droit dessus. Une fois cassés, les articles tomberont. +27 inventory slots=27 emplacements d'inventaire \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr index 2b85d7161..e1fa1b603 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel= Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr index 2b85d7161..e1fa1b603 100644 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel= Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt index 2b85d7161..e1fa1b603 100644 --- a/mods/ITEMS/mcl_barrels/locale/template.txt +++ b/mods/ITEMS/mcl_barrels/locale/template.txt @@ -1,4 +1,5 @@ # textdomain: mcl_barrels Barrel= Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= \ No newline at end of file +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file From 61e54ed617d23c6ac677afd352b774327ffe292c Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 7 Feb 2022 08:47:41 +0100 Subject: [PATCH 07/13] rename `mcl_util.drop_items_container_get` to `drop_items_from_meta_container` --- mods/CORE/mcl_util/init.lua | 2 +- mods/ITEMS/mcl_barrels/init.lua | 2 +- mods/ITEMS/mcl_chests/init.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index a9e8e7319..12645bbfa 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -357,7 +357,7 @@ function mcl_util.get_first_occupied_inventory_slot(inventory, listname) return mcl_util.get_eligible_transfer_item_slot(inventory, listname) end -function mcl_util.drop_items_container_get(listname) +function mcl_util.drop_items_from_meta_container(listname) return function(pos, oldnode, oldmetadata) local meta = minetest.get_meta(pos) local meta2 = meta:to_table() diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index d30b4e0e0..6304108ab 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -8,7 +8,7 @@ local C = minetest.colorize local open_barrels = {} -local drop_content = mcl_util.drop_items_container_get("main") +local drop_content = mcl_util.drop_items_from_meta_container("main") local function on_blast(pos) local node = minetest.get_node(pos) diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index aba91fe87..35712dfd1 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -291,7 +291,7 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile end end - local drop_items_chest = mcl_util.drop_items_container_get("main") + local drop_items_chest = mcl_util.drop_items_from_meta_container("main") local function on_chest_blast(pos) local node = minetest.get_node(pos) From c64d0e4558612fd19e539dfd2b9555060809045e Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 7 Feb 2022 09:33:00 +0100 Subject: [PATCH 08/13] simplify random dropping position code --- mods/CORE/mcl_util/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 12645bbfa..03f6106f2 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -368,7 +368,7 @@ function mcl_util.drop_items_from_meta_container(listname) for i = 1, inv:get_size(listname) do local stack = inv:get_stack(listname, i) if not stack:is_empty() then - local p = vector.add(pos, vector.new(math.random(0, 10)/10 - 0.5, 0, math.random(0, 10)/10 - 0.5)) + local p = vector.add(pos, vector.new(math.random() - 0.5, 0, math.random(0, 10)/10 - 0.5)) minetest.add_item(p, stack) end end From 397c243e89be1931cd067ff52c902569f6bbbafa Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 7 Feb 2022 15:56:48 +0100 Subject: [PATCH 09/13] cleanup barrel TODO list --- mods/ITEMS/mcl_barrels/init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index 6304108ab..4734087bd 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -2,8 +2,6 @@ local S = minetest.get_translator("mcl_barrels") local F = minetest.formspec_escape local C = minetest.colorize ---TODO: add french translation ---TODO: complete ingame help and tooltips --TODO: fix barrel rotation placement local open_barrels = {} From 9112915dddea946130356dfc0cc9acb2e17ae513 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 7 Feb 2022 20:40:20 +0100 Subject: [PATCH 10/13] fix barrel top texture rotation --- mods/ITEMS/mcl_barrels/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_barrels/init.lua index 4734087bd..964f23fde 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -79,7 +79,7 @@ minetest.register_node("mcl_barrels:barrel_closed", { _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), - tiles = {"mcl_barrels_barrel_top.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, + tiles = {"mcl_barrels_barrel_top.png^[transformR270", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", --on_place = mcl_util.rotate_axis, From a272322cb5ec77d6e856e2034f407ea1c1d73438 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 22 Feb 2022 17:55:52 +0100 Subject: [PATCH 11/13] move barrels to mcl_chests --- .../mcl_barrels/locale/mcl_barrels.de.tr | 5 --- .../mcl_barrels/locale/mcl_barrels.es.tr | 5 --- .../mcl_barrels/locale/mcl_barrels.fr.tr | 5 --- .../mcl_barrels/locale/mcl_barrels.pl.tr | 5 --- .../mcl_barrels/locale/mcl_barrels.ru.tr | 5 --- mods/ITEMS/mcl_barrels/locale/template.txt | 5 --- mods/ITEMS/mcl_barrels/mod.conf | 3 -- .../init.lua => mcl_chests/barrel.lua} | 30 ++++++++---------- mods/ITEMS/mcl_chests/init.lua | 2 ++ mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr | 2 ++ mods/ITEMS/mcl_chests/locale/template.txt | 2 ++ .../textures/mcl_chests_barrel_bottom.png} | Bin .../textures/mcl_chests_barrel_side.png} | Bin .../textures/mcl_chests_barrel_top.png} | Bin .../textures/mcl_chests_barrel_top_open.png} | Bin 15 files changed, 20 insertions(+), 49 deletions(-) delete mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr delete mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr delete mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr delete mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr delete mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr delete mode 100644 mods/ITEMS/mcl_barrels/locale/template.txt delete mode 100644 mods/ITEMS/mcl_barrels/mod.conf rename mods/ITEMS/{mcl_barrels/init.lua => mcl_chests/barrel.lua} (81%) rename mods/ITEMS/{mcl_barrels/textures/mcl_barrels_barrel_bottom.png => mcl_chests/textures/mcl_chests_barrel_bottom.png} (100%) rename mods/ITEMS/{mcl_barrels/textures/mcl_barrels_barrel_side.png => mcl_chests/textures/mcl_chests_barrel_side.png} (100%) rename mods/ITEMS/{mcl_barrels/textures/mcl_barrels_barrel_top.png => mcl_chests/textures/mcl_chests_barrel_top.png} (100%) rename mods/ITEMS/{mcl_barrels/textures/mcl_barrels_barrel_top_open.png => mcl_chests/textures/mcl_chests_barrel_top_open.png} (100%) diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr deleted file mode 100644 index e1fa1b603..000000000 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel= -Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= -27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr deleted file mode 100644 index e1fa1b603..000000000 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel= -Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= -27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr deleted file mode 100644 index 0e93d1ee5..000000000 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel=Tonneau -Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. -To access its inventory, rightclick it. When broken, the items will drop out.=Pour accéder à son inventaire, faites un clic droit dessus. Une fois cassés, les articles tomberont. -27 inventory slots=27 emplacements d'inventaire \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr deleted file mode 100644 index e1fa1b603..000000000 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel= -Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= -27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr deleted file mode 100644 index e1fa1b603..000000000 --- a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel= -Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= -27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt deleted file mode 100644 index e1fa1b603..000000000 --- a/mods/ITEMS/mcl_barrels/locale/template.txt +++ /dev/null @@ -1,5 +0,0 @@ -# textdomain: mcl_barrels -Barrel= -Barrels are containers which provide 27 inventory slots.= -To access its inventory, rightclick it. When broken, the items will drop out.= -27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/mod.conf b/mods/ITEMS/mcl_barrels/mod.conf deleted file mode 100644 index 2b0088b79..000000000 --- a/mods/ITEMS/mcl_barrels/mod.conf +++ /dev/null @@ -1,3 +0,0 @@ -name = mcl_barrels -depends = mcl_util, mcl_formspec, mcl_sounds -author = AFCMS \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/init.lua b/mods/ITEMS/mcl_chests/barrel.lua similarity index 81% rename from mods/ITEMS/mcl_barrels/init.lua rename to mods/ITEMS/mcl_chests/barrel.lua index 964f23fde..bc6216578 100644 --- a/mods/ITEMS/mcl_barrels/init.lua +++ b/mods/ITEMS/mcl_chests/barrel.lua @@ -1,9 +1,7 @@ -local S = minetest.get_translator("mcl_barrels") +local S = minetest.get_translator("mcl_chests") local F = minetest.formspec_escape local C = minetest.colorize ---TODO: fix barrel rotation placement - local open_barrels = {} local drop_content = mcl_util.drop_items_from_meta_container("main") @@ -24,7 +22,7 @@ local function barrel_open(pos, node, clicker) local playername = clicker:get_player_name() minetest.show_formspec(playername, - "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z, + "mcl_chests:barrel_"..pos.x.."_"..pos.y.."_"..pos.z, table.concat({ "size[9,8.75]", "label[0,0;"..F(C("#313131", name)).."]", @@ -40,13 +38,13 @@ local function barrel_open(pos, node, clicker) }) ) - minetest.swap_node(pos, { name = "mcl_barrels:barrel_open", param2 = node.param2 }) + minetest.swap_node(pos, { name = "mcl_chests:barrel_open", param2 = node.param2 }) open_barrels[playername] = pos end local function close_forms(pos) local players = minetest.get_connected_players() - local formname = "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z + local formname = "mcl_chests:barrel_"..pos.x.."_"..pos.y.."_"..pos.z for p = 1, #players do if vector.distance(players[p]:get_pos(), pos) <= 30 then minetest.close_formspec(players[p]:get_player_name(), formname) @@ -57,8 +55,8 @@ end local function update_after_close(pos) local node = minetest.get_node_or_nil(pos) if not node then return end - if node.name == "mcl_barrels:barrel_open" then - minetest.swap_node(pos, {name = "mcl_barrels:barrel_closed", param2 = node.param2}) + if node.name == "mcl_chests:barrel_open" then + minetest.swap_node(pos, {name = "mcl_chests:barrel_closed", param2 = node.param2}) end end @@ -74,12 +72,12 @@ local function close_barrel(player) open_barrels[name] = nil end -minetest.register_node("mcl_barrels:barrel_closed", { +minetest.register_node("mcl_chests:barrel_closed", { description = S("Barrel"), _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), - tiles = {"mcl_barrels_barrel_top.png^[transformR270", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, + tiles = {"mcl_chests_barrel_top.png^[transformR270", "mcl_chests_barrel_bottom.png", "mcl_chests_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", --on_place = mcl_util.rotate_axis, @@ -106,16 +104,16 @@ minetest.register_node("mcl_barrels:barrel_closed", { _mcl_hardness = 2.5, }) -minetest.register_node("mcl_barrels:barrel_open", { +minetest.register_node("mcl_chests:barrel_open", { description = S("Barrel Open"), _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), _doc_items_create_entry = false, - tiles = {"mcl_barrels_barrel_top_open.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, + tiles = {"mcl_chests_barrel_top_open.png", "mcl_chests_barrel_bottom.png", "mcl_chests_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", - drop = "mcl_barrels:barrel_closed", + drop = "mcl_chests:barrel_closed", stack_max = 64, sounds = mcl_sounds.node_sound_wood_defaults(), groups = {handy = 1, axey = 1, container = 2, material_wood = 1, flammable = -1, deco_block = 1, not_in_creative_inventory = 1}, @@ -128,7 +126,7 @@ minetest.register_node("mcl_barrels:barrel_open", { }) minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname:find("mcl_barrels:") == 1 and fields.quit then + if formname:find("mcl_chests:barrel") == 1 and fields.quit then close_barrel(player) end end) @@ -139,10 +137,10 @@ end) --Minecraft Java Edition craft minetest.register_craft({ - output = "mcl_barrels:barrel_closed", + output = "mcl_chests:barrel_closed", recipe = { {"group:wood", "group:wood_slab", "group:wood"}, {"group:wood", "", "group:wood"}, {"group:wood", "group:wood_slab", "group:wood"}, - } + }, }) \ No newline at end of file diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 35712dfd1..b4cadcef1 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -1419,3 +1419,5 @@ minetest.register_lbm({ minetest.get_meta(pos):set_string("formspec", "") end, }) + +dofile(minetest.get_modpath("mcl_chests").."/barrel.lua") \ No newline at end of file diff --git a/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr b/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr index b84dac022..0956c8705 100644 --- a/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr +++ b/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr @@ -34,3 +34,5 @@ Can be combined to a large chest=Peut être combiné à un grand coffre 27 interdimensional inventory slots=27 emplacements d'inventaire interdimensionnels Put items inside, retrieve them from any ender chest=Mettez des objets à l'intérieur, récupérez-les dans n'importe quel coffre Emits a redstone signal when opened=Émet un signal redstone à l'ouverture +Barrel=Tonneau +Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. diff --git a/mods/ITEMS/mcl_chests/locale/template.txt b/mods/ITEMS/mcl_chests/locale/template.txt index d680c24c9..fffeaaac7 100644 --- a/mods/ITEMS/mcl_chests/locale/template.txt +++ b/mods/ITEMS/mcl_chests/locale/template.txt @@ -34,3 +34,5 @@ Can be combined to a large chest= 27 interdimensional inventory slots= Put items inside, retrieve them from any ender chest= Emits a redstone signal when opened= +Barrel= +Barrels are containers which provide 27 inventory slots.= diff --git a/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_bottom.png similarity index 100% rename from mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png rename to mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_bottom.png diff --git a/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_side.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_side.png similarity index 100% rename from mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_side.png rename to mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_side.png diff --git a/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top.png similarity index 100% rename from mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top.png rename to mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top.png diff --git a/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top_open.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top_open.png similarity index 100% rename from mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top_open.png rename to mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top_open.png From 61f4c5b885db1562cf393f1c08312ba51ef726bf Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 22 Feb 2022 18:03:27 +0100 Subject: [PATCH 12/13] apply @kay27 fix to `mcl_util.drop_items_from_meta_container` --- mods/CORE/mcl_util/init.lua | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/mods/CORE/mcl_util/init.lua b/mods/CORE/mcl_util/init.lua index 03f6106f2..0d1cb45dc 100644 --- a/mods/CORE/mcl_util/init.lua +++ b/mods/CORE/mcl_util/init.lua @@ -357,22 +357,29 @@ function mcl_util.get_first_occupied_inventory_slot(inventory, listname) return mcl_util.get_eligible_transfer_item_slot(inventory, listname) end +local function drop_item_stack(pos, stack) + if not stack or stack:is_empty() then return end + local drop_offset = vector.new(math.random() - 0.5, 0, math.random() - 0.5) + minetest.add_item(vector.add(pos, drop_offset), stack) +end + function mcl_util.drop_items_from_meta_container(listname) return function(pos, oldnode, oldmetadata) - local meta = minetest.get_meta(pos) - local meta2 = meta:to_table() - if oldmetadata then - meta:from_table(oldmetadata) - end - local inv = meta:get_inventory() - for i = 1, inv:get_size(listname) do - local stack = inv:get_stack(listname, i) - if not stack:is_empty() then - local p = vector.add(pos, vector.new(math.random() - 0.5, 0, math.random(0, 10)/10 - 0.5)) - minetest.add_item(p, stack) + if oldmetadata and oldmetadata.inventory then + -- process in after_dig_node callback + local main = oldmetadata.inventory.main + if not main then return end + for _, stack in pairs(main) do + drop_item_stack(pos, stack) end + else + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + for i = 1, inv:get_size("main") do + drop_item_stack(pos, inv:get_stack("main", i)) + end + meta:from_table() end - meta:from_table(meta2) end end From 360a1604ba959d3af2b641077116dd47821a12e0 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Tue, 22 Feb 2022 20:20:21 +0100 Subject: [PATCH 13/13] Revert "move barrels to mcl_chests" This reverts commit a272322cb5ec77d6e856e2034f407ea1c1d73438. --- .../barrel.lua => mcl_barrels/init.lua} | 30 ++++++++++-------- .../mcl_barrels/locale/mcl_barrels.de.tr | 5 +++ .../mcl_barrels/locale/mcl_barrels.es.tr | 5 +++ .../mcl_barrels/locale/mcl_barrels.fr.tr | 5 +++ .../mcl_barrels/locale/mcl_barrels.pl.tr | 5 +++ .../mcl_barrels/locale/mcl_barrels.ru.tr | 5 +++ mods/ITEMS/mcl_barrels/locale/template.txt | 5 +++ mods/ITEMS/mcl_barrels/mod.conf | 3 ++ .../textures/mcl_barrels_barrel_bottom.png} | Bin .../textures/mcl_barrels_barrel_side.png} | Bin .../textures/mcl_barrels_barrel_top.png} | Bin .../textures/mcl_barrels_barrel_top_open.png} | Bin mods/ITEMS/mcl_chests/init.lua | 2 -- mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr | 2 -- mods/ITEMS/mcl_chests/locale/template.txt | 2 -- 15 files changed, 49 insertions(+), 20 deletions(-) rename mods/ITEMS/{mcl_chests/barrel.lua => mcl_barrels/init.lua} (81%) create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr create mode 100644 mods/ITEMS/mcl_barrels/locale/template.txt create mode 100644 mods/ITEMS/mcl_barrels/mod.conf rename mods/ITEMS/{mcl_chests/textures/mcl_chests_barrel_bottom.png => mcl_barrels/textures/mcl_barrels_barrel_bottom.png} (100%) rename mods/ITEMS/{mcl_chests/textures/mcl_chests_barrel_side.png => mcl_barrels/textures/mcl_barrels_barrel_side.png} (100%) rename mods/ITEMS/{mcl_chests/textures/mcl_chests_barrel_top.png => mcl_barrels/textures/mcl_barrels_barrel_top.png} (100%) rename mods/ITEMS/{mcl_chests/textures/mcl_chests_barrel_top_open.png => mcl_barrels/textures/mcl_barrels_barrel_top_open.png} (100%) diff --git a/mods/ITEMS/mcl_chests/barrel.lua b/mods/ITEMS/mcl_barrels/init.lua similarity index 81% rename from mods/ITEMS/mcl_chests/barrel.lua rename to mods/ITEMS/mcl_barrels/init.lua index bc6216578..964f23fde 100644 --- a/mods/ITEMS/mcl_chests/barrel.lua +++ b/mods/ITEMS/mcl_barrels/init.lua @@ -1,7 +1,9 @@ -local S = minetest.get_translator("mcl_chests") +local S = minetest.get_translator("mcl_barrels") local F = minetest.formspec_escape local C = minetest.colorize +--TODO: fix barrel rotation placement + local open_barrels = {} local drop_content = mcl_util.drop_items_from_meta_container("main") @@ -22,7 +24,7 @@ local function barrel_open(pos, node, clicker) local playername = clicker:get_player_name() minetest.show_formspec(playername, - "mcl_chests:barrel_"..pos.x.."_"..pos.y.."_"..pos.z, + "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z, table.concat({ "size[9,8.75]", "label[0,0;"..F(C("#313131", name)).."]", @@ -38,13 +40,13 @@ local function barrel_open(pos, node, clicker) }) ) - minetest.swap_node(pos, { name = "mcl_chests:barrel_open", param2 = node.param2 }) + minetest.swap_node(pos, { name = "mcl_barrels:barrel_open", param2 = node.param2 }) open_barrels[playername] = pos end local function close_forms(pos) local players = minetest.get_connected_players() - local formname = "mcl_chests:barrel_"..pos.x.."_"..pos.y.."_"..pos.z + local formname = "mcl_barrels:barrel_"..pos.x.."_"..pos.y.."_"..pos.z for p = 1, #players do if vector.distance(players[p]:get_pos(), pos) <= 30 then minetest.close_formspec(players[p]:get_player_name(), formname) @@ -55,8 +57,8 @@ end local function update_after_close(pos) local node = minetest.get_node_or_nil(pos) if not node then return end - if node.name == "mcl_chests:barrel_open" then - minetest.swap_node(pos, {name = "mcl_chests:barrel_closed", param2 = node.param2}) + if node.name == "mcl_barrels:barrel_open" then + minetest.swap_node(pos, {name = "mcl_barrels:barrel_closed", param2 = node.param2}) end end @@ -72,12 +74,12 @@ local function close_barrel(player) open_barrels[name] = nil end -minetest.register_node("mcl_chests:barrel_closed", { +minetest.register_node("mcl_barrels:barrel_closed", { description = S("Barrel"), _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), - tiles = {"mcl_chests_barrel_top.png^[transformR270", "mcl_chests_barrel_bottom.png", "mcl_chests_barrel_side.png"}, + tiles = {"mcl_barrels_barrel_top.png^[transformR270", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", --on_place = mcl_util.rotate_axis, @@ -104,16 +106,16 @@ minetest.register_node("mcl_chests:barrel_closed", { _mcl_hardness = 2.5, }) -minetest.register_node("mcl_chests:barrel_open", { +minetest.register_node("mcl_barrels:barrel_open", { description = S("Barrel Open"), _tt_help = S("27 inventory slots"), _doc_items_longdesc = S("Barrels are containers which provide 27 inventory slots."), _doc_items_usagehelp = S("To access its inventory, rightclick it. When broken, the items will drop out."), _doc_items_create_entry = false, - tiles = {"mcl_chests_barrel_top_open.png", "mcl_chests_barrel_bottom.png", "mcl_chests_barrel_side.png"}, + tiles = {"mcl_barrels_barrel_top_open.png", "mcl_barrels_barrel_bottom.png", "mcl_barrels_barrel_side.png"}, paramtype = "light", paramtype2 = "facedir", - drop = "mcl_chests:barrel_closed", + drop = "mcl_barrels:barrel_closed", stack_max = 64, sounds = mcl_sounds.node_sound_wood_defaults(), groups = {handy = 1, axey = 1, container = 2, material_wood = 1, flammable = -1, deco_block = 1, not_in_creative_inventory = 1}, @@ -126,7 +128,7 @@ minetest.register_node("mcl_chests:barrel_open", { }) minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname:find("mcl_chests:barrel") == 1 and fields.quit then + if formname:find("mcl_barrels:") == 1 and fields.quit then close_barrel(player) end end) @@ -137,10 +139,10 @@ end) --Minecraft Java Edition craft minetest.register_craft({ - output = "mcl_chests:barrel_closed", + output = "mcl_barrels:barrel_closed", recipe = { {"group:wood", "group:wood_slab", "group:wood"}, {"group:wood", "", "group:wood"}, {"group:wood", "group:wood_slab", "group:wood"}, - }, + } }) \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr new file mode 100644 index 000000000..e1fa1b603 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.de.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr new file mode 100644 index 000000000..e1fa1b603 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.es.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr new file mode 100644 index 000000000..0e93d1ee5 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.fr.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel=Tonneau +Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. +To access its inventory, rightclick it. When broken, the items will drop out.=Pour accéder à son inventaire, faites un clic droit dessus. Une fois cassés, les articles tomberont. +27 inventory slots=27 emplacements d'inventaire \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr new file mode 100644 index 000000000..e1fa1b603 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.pl.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr new file mode 100644 index 000000000..e1fa1b603 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ru.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/locale/template.txt b/mods/ITEMS/mcl_barrels/locale/template.txt new file mode 100644 index 000000000..e1fa1b603 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/template.txt @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel= +Barrels are containers which provide 27 inventory slots.= +To access its inventory, rightclick it. When broken, the items will drop out.= +27 inventory slots= \ No newline at end of file diff --git a/mods/ITEMS/mcl_barrels/mod.conf b/mods/ITEMS/mcl_barrels/mod.conf new file mode 100644 index 000000000..2b0088b79 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/mod.conf @@ -0,0 +1,3 @@ +name = mcl_barrels +depends = mcl_util, mcl_formspec, mcl_sounds +author = AFCMS \ No newline at end of file diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_bottom.png b/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png similarity index 100% rename from mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_bottom.png rename to mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_bottom.png diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_side.png b/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_side.png similarity index 100% rename from mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_side.png rename to mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_side.png diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top.png b/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top.png similarity index 100% rename from mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top.png rename to mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top.png diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top_open.png b/mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top_open.png similarity index 100% rename from mods/ITEMS/mcl_chests/textures/mcl_chests_barrel_top_open.png rename to mods/ITEMS/mcl_barrels/textures/mcl_barrels_barrel_top_open.png diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index b4cadcef1..35712dfd1 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -1419,5 +1419,3 @@ minetest.register_lbm({ minetest.get_meta(pos):set_string("formspec", "") end, }) - -dofile(minetest.get_modpath("mcl_chests").."/barrel.lua") \ No newline at end of file diff --git a/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr b/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr index 0956c8705..b84dac022 100644 --- a/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr +++ b/mods/ITEMS/mcl_chests/locale/mcl_chests.fr.tr @@ -34,5 +34,3 @@ Can be combined to a large chest=Peut être combiné à un grand coffre 27 interdimensional inventory slots=27 emplacements d'inventaire interdimensionnels Put items inside, retrieve them from any ender chest=Mettez des objets à l'intérieur, récupérez-les dans n'importe quel coffre Emits a redstone signal when opened=Émet un signal redstone à l'ouverture -Barrel=Tonneau -Barrels are containers which provide 27 inventory slots.=Les tonneaux sont des conteneurs qui offrent 27 emplacements d'inventaire. diff --git a/mods/ITEMS/mcl_chests/locale/template.txt b/mods/ITEMS/mcl_chests/locale/template.txt index fffeaaac7..d680c24c9 100644 --- a/mods/ITEMS/mcl_chests/locale/template.txt +++ b/mods/ITEMS/mcl_chests/locale/template.txt @@ -34,5 +34,3 @@ Can be combined to a large chest= 27 interdimensional inventory slots= Put items inside, retrieve them from any ender chest= Emits a redstone signal when opened= -Barrel= -Barrels are containers which provide 27 inventory slots.=