From b1fcbbf68fec91eed76ab7292cacd4a5c97a1e58 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 26 Jan 2018 23:13:44 +0100 Subject: [PATCH] New texture for trapped chest --- mods/ITEMS/mcl_chests/init.lua | 38 +++++++++++++----- .../mcl_chests_black_shulker_box_top.png | Bin 302 -> 160 bytes .../mcl_chests_chest_trapped_back.png | Bin 0 -> 218 bytes .../mcl_chests_chest_trapped_bottom.png | Bin 0 -> 168 bytes .../mcl_chests_chest_trapped_front.png | Bin 0 -> 239 bytes .../mcl_chests_chest_trapped_front_big.png | Bin 0 -> 239 bytes .../mcl_chests_chest_trapped_left.png | Bin 0 -> 196 bytes .../mcl_chests_chest_trapped_right.png | Bin 0 -> 209 bytes .../mcl_chests_chest_trapped_side_big.png | Bin 0 -> 210 bytes .../textures/mcl_chests_chest_trapped_top.png | Bin 0 -> 194 bytes .../mcl_chests_chest_trapped_top_big.png | Bin 0 -> 200 bytes 11 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_back.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_bottom.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_front.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_front_big.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_left.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_right.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_side_big.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_top.png create mode 100644 mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_top_big.png diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index d312a5702..5d8ce2be3 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -5,7 +5,7 @@ if minetest.get_modpath("screwdriver") then end -- This is a helper function to register both chests and trapped chests. Trapped chests will make use of the additional parameters -local register_chest = function(basename, desc, longdesc, usagehelp, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop) +local register_chest = function(basename, desc, longdesc, usagehelp, tiles_table, hidden, mesecons, on_rightclick_addendum, on_rightclick_addendum_left, on_rightclick_addendum_right, drop) if not drop then drop = "mcl_chests:"..basename @@ -18,9 +18,7 @@ minetest.register_node("mcl_chests:"..basename, { _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, _doc_items_hidden = hidden, - tiles = {"default_chest_top.png", "mcl_chests_chest_bottom.png", - "mcl_chests_chest_right.png", "mcl_chests_chest_left.png", - "mcl_chests_chest_back.png", "default_chest_front.png"}, + tiles = tiles_table.small, paramtype2 = "facedir", stack_max = 64, drop = drop, @@ -126,8 +124,7 @@ minetest.register_node("mcl_chests:"..basename, { }) minetest.register_node("mcl_chests:"..basename.."_left", { - tiles = {"default_chest_top_big.png", "default_chest_top_big.png", "mcl_chests_chest_right.png", - "mcl_chests_chest_left.png", "default_chest_side_big.png^[transformFX", "default_chest_front_big.png"}, + tiles = tiles_table.left, paramtype2 = "facedir", groups = {handy=1,axey=1, container=5,not_in_creative_inventory=1, material_wood=1}, drop = drop, @@ -241,8 +238,7 @@ minetest.register_node("mcl_chests:"..basename.."_left", { }) minetest.register_node("mcl_chests:"..basename.."_right", { - tiles = {"default_chest_top_big.png^[transformFX", "default_chest_top_big.png^[transformFX", "mcl_chests_chest_right.png", - "mcl_chests_chest_left.png", "default_chest_side_big.png", "default_chest_front_big.png^[transformFX"}, + tiles = tiles_table.right, paramtype2 = "facedir", groups = {handy=1,axey=1, container=6,not_in_creative_inventory=1, material_wood=1}, drop = drop, @@ -367,15 +363,39 @@ register_chest("chest", "Chest", "Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.", "To acccess the inventory of a chest or large chest, rightclick it. When broken, the items of the chest will drop out.", + { + small = {"default_chest_top.png", "mcl_chests_chest_bottom.png", + "mcl_chests_chest_right.png", "mcl_chests_chest_left.png", + "mcl_chests_chest_back.png", "default_chest_front.png"}, + left = {"default_chest_top_big.png", "default_chest_top_big.png", + "mcl_chests_chest_right.png", "mcl_chests_chest_left.png", + "default_chest_side_big.png^[transformFX", "default_chest_front_big.png"}, + right = {"default_chest_top_big.png^[transformFX", "default_chest_top_big.png^[transformFX", + "mcl_chests_chest_right.png", "mcl_chests_chest_left.png", + "default_chest_side_big.png", "default_chest_front_big.png^[transformFX"}, + }, false ) local trapped_chest_mesecons_rules = mesecon.rules.pplate +local traptiles = { + small = {"mcl_chests_chest_trapped_top.png", "mcl_chests_chest_trapped_bottom.png", + "mcl_chests_chest_trapped_right.png", "mcl_chests_chest_trapped_left.png", + "mcl_chests_chest_trapped_back.png", "mcl_chests_chest_trapped_front.png"}, + left = {"mcl_chests_chest_trapped_top_big.png", "mcl_chests_chest_trapped_top_big.png", + "mcl_chests_chest_trapped_right.png", "mcl_chests_chest_trapped_left.png", + "mcl_chests_chest_trapped_side_big.png^[transformFX", "mcl_chests_chest_trapped_front_big.png"}, + right = {"mcl_chests_chest_trapped_top_big.png^[transformFX", "mcl_chests_chest_trapped_top_big.png^[transformFX", + "mcl_chests_chest_trapped_right.png", "mcl_chests_chest_trapped_left.png", + "mcl_chests_chest_trapped_side_big.png", "mcl_chests_chest_trapped_front_big.png^[transformFX"}, +} + register_chest("trapped_chest", "Trapped Chest", "A trapped chest is a container which provides 27 inventory slots. It looks identical to a regular chest, but when it is opened, it sends a redstone signal to its adjacent blocks. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.", "To acccess the inventory of a trapped chest or a large trapped chest, rightclick it. When broken, the items will drop out.", + traptiles, nil, {receptor = { state = mesecon.state.off, @@ -414,7 +434,7 @@ register_chest("trapped_chest", ) register_chest("trapped_chest_on", - nil, nil, nil, true, + nil, nil, nil, traptiles, true, {receptor = { state = mesecon.state.on, rules = trapped_chest_mesecons_rules, diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_black_shulker_box_top.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_black_shulker_box_top.png index df85969453142e61fa710ab308dbe4a8e356cba3..a8564e42e7f78ca08161c7a570242c1950c35dce 100644 GIT binary patch delta 144 zcmZ3-w19DfL_HHT0|P_ST=7ppiYLG)#MQvi)W*(POc?kuH3Aau>kdpc@yrh=(h6aPOw20&_xAU`sMsqTFy85}Sb4q9e0ANZo!2kdN delta 287 zcmZ3$xQ=OpL_G%^0|SHn=l_X7im^Dz-HBn{IhmJ04okYDuOkD)#(wTUiL5|AXMsm# zF$05`DhM-r2B~}i3QCl?MwA5Sr3@vO2JllXE1r}@2{^E4);Y|D?hd2?fjDJ@lWs=ORG}O$P^7k(ijJU*7^_xS~;iZDsh1t4sTqpWpu;`dr zYO~pL&ux%+%kYXr?7!SWb!Fv(Wn2*}9QgY`6ns}dy1woxzev*=ses%`_9Z4sFic36Q978G?lM_P93=0i~5)wj-^|L*>5)yh0 zva=0YKQ;Hp`ou6xxVSnyJ2Nvs{Bnkqhlgj5vE;NF7V6cKyA5=*KWm&m<-vIAS!%50 zS)RPN4u6jwt^?3nJ;lRSBna%Xj4YVzb|o}T6SD#mA;M76FNBLml0#XtLeyPAOZ OGkCiCxvXavnrv1J)omqZa=30`Hl74muaR#cf&L$HJf)eMPwE}7{_jGX#sbGxl z4QFCj;BcNOxc%$D<+&T`OKr>qHM8E;Iq0KHcHG*)2Zm5juje zZFl{D81>p$;ALLd8J_+?Uo*C}JiC&*hw0m{z2Ff(zJo1c$47%b=5rr@Z%P!qVK$>Z koue;O$(bv#=f)B7Q*tbeBHnFy0(1g{r>mdKI;Vst0GrlQzyJUM literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_front_big.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_front_big.png new file mode 100644 index 0000000000000000000000000000000000000000..b65bfc2319006a0d0f7a8e484d1ba9b58c1bccee GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^{2hbEm6-h|&`Knc>KaWGi^XAqYsufO5%`+mT1fD1uo|8#nXk=lVo-pAXHz&`! zW9OEhTPiLoVK%#3v|W7vT!xf4Q8H3*l=nw`^S3j3^P6bP0l+XkKDTYG% literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_right.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_right.png new file mode 100644 index 0000000000000000000000000000000000000000..4536ada868f20bab059136cbc2554c8e12246833 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^d_c_4!VDzUtRA}qDY*cj5LZ7tgGe{?!Z4Sbc%RNJ zzljAw%F4<*Iy$ztwvv*Pi&wjH09EFBx;TbZFxq;DGBP;|)ShOI;5X2||NQ=Q)(IRD zj79+r-ra|P*f0i9S~A&#ZTE{+d{tkZ#buThO)^QWt~vT}fBy5cX`A;qPSiSbJ6$Yt zs(pFPmQa3M+rQ@=*Uxz!##)m4Yu&kprf^>9rY;A2NB_%)cPL2mE&hd0{45?sDP6#n8G72!_OGxlE)GjP2W;49f z*t3LzO<6rzH9dJLLtDp8g$uVD64pdX0m0TRMxWgv6j9w2EyUdHxy#FI(Tc$%Gj?oHX%v;#HrAFj(3ECi*c7Fd$ry0&2hd&yPgg&ebxsLQ033im A3S$>|Lo)Zg#UP$~}1yq*g>Eakt!6vEw&#NZR}fB!eo=SzVh!iPlsqbxua*# q$R_(=ziX+K{qOJAf+^8|{xFFA6W4n!DfAs^8-u5-pUXO@geCxaHAZFt literal 0 HcmV?d00001 diff --git a/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_top_big.png b/mods/ITEMS/mcl_chests/textures/mcl_chests_chest_trapped_top_big.png new file mode 100644 index 0000000000000000000000000000000000000000..de56e2cabff2009d5a2f76bcbbf9e1cff39d5525 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^{6Ngd!VDytmPFqHQqloFA+E~G$~rnawzjsBZsvty zE)xraIDneZoGc?#%rJ^NDxtU%y@PfH7&eT=tZu`mI1a89ZJ6T-G@yGywo7okfZO literal 0 HcmV?d00001