From bc1f3cd651061f6df04e1d6cb0bd153f14f80281 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 27 Jan 2018 04:36:17 +0100 Subject: [PATCH] Add locked repeaters (nodes only) --- mods/ITEMS/REDSTONE/mesecons_delayer/init.lua | 110 ++++++++++++++++++ .../mesecons_delayer_end_locked_off.png | Bin 0 -> 186 bytes .../mesecons_delayer_end_locked_on.png | Bin 0 -> 186 bytes .../textures/mesecons_delayer_ends_off.png | Bin 213 -> 167 bytes .../textures/mesecons_delayer_ends_on.png | Bin 211 -> 167 bytes .../mesecons_delayer_front_locked_off.png | Bin 0 -> 199 bytes .../mesecons_delayer_front_locked_on.png | Bin 0 -> 199 bytes .../textures/mesecons_delayer_locked_off.png | Bin 0 -> 267 bytes .../textures/mesecons_delayer_locked_on.png | Bin 0 -> 265 bytes .../textures/mesecons_delayer_off.png | Bin 246 -> 243 bytes .../textures/mesecons_delayer_on.png | Bin 246 -> 243 bytes .../mesecons_delayer_sides_locked_off.png | Bin 0 -> 178 bytes .../mesecons_delayer_sides_locked_on.png | Bin 0 -> 178 bytes .../textures/mesecons_delayer_sides_off.png | Bin 240 -> 173 bytes .../textures/mesecons_delayer_sides_on.png | Bin 235 -> 173 bytes 15 files changed, 110 insertions(+) create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_off.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_on.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_off.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_on.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_off.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_on.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_locked_off.png create mode 100644 mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_locked_on.png diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua b/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua index bf08849a..ee72b7d0 100644 --- a/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_delayer/init.lua @@ -215,8 +215,116 @@ minetest.register_node("mesecons_delayer:delayer_on_"..tostring(i), { }, on_rotate = on_rotate, }) + end +minetest.register_node("mesecons_delayer:delayer_off_locked", { + description = "Redstone Repeater (Locked)", + inventory_image = icon, + wield_image = icon, + _doc_items_create_entry = false, + drawtype = "nodebox", + -- FIXME: Textures of torch and the lock bar overlap. Nodeboxes are (sadly) not suitable for this. + -- So this needs to be turned into a mesh. + tiles = { + "mesecons_delayer_locked_off.png", + "mcl_stairs_stone_slab_top.png", + "mesecons_delayer_sides_locked_off.png", + "mesecons_delayer_sides_locked_off.png^[transformFX", + "mesecons_delayer_front_locked_off.png", + "mesecons_delayer_end_locked_off.png", + }, + wield_image = "mesecons_delayer_locked_off.png", + walkable = true, + selection_box = { + type = "fixed", + fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, + }, + collision_box = { + type = "fixed", + fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, -- the main slab + { -1/16, -6/16, 6/16, 1/16, -1/16, 4/16}, -- still torch + { -6/16, -6/16, 0/16, 6/16, -4/16, 2/16}, -- lock + } + }, + groups = {dig_immediate = 3, dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1, attached_node=1, not_in_creative_inventory = 1}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = false, + is_ground_content = false, + drop = 'mesecons_delayer:delayer_off_1', + delayer_time = delaytime, + delayer_onstate = "mesecons_delayer:delayer_on_"..tostring(i), + sounds = mcl_sounds.node_sound_stone_defaults(), + mesecons = { + receptor = + { + state = mesecon.state.off, + rules = delayer_get_output_rules + }, + effector = + { + rules = delayer_get_input_rules, + } + }, + on_rotate = on_rotate, +}) + +minetest.register_node("mesecons_delayer:delayer_on_locked", { + description = "Redstone Repeater (Locked, Powered)", + _doc_items_create_entry = false, + drawtype = "nodebox", + tiles = { + "mesecons_delayer_locked_on.png", + "mcl_stairs_stone_slab_top.png", + "mesecons_delayer_sides_locked_on.png", + "mesecons_delayer_sides_locked_on.png^[transformFX", + "mesecons_delayer_front_locked_on.png", + "mesecons_delayer_end_locked_on.png", + }, + walkable = true, + selection_box = { + type = "fixed", + fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, + }, + collision_box = { + type = "fixed", + fixed = { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, + }, + node_box = { + type = "fixed", + fixed = { + { -8/16, -8/16, -8/16, 8/16, -6/16, 8/16 }, -- the main slab + { -1/16, -6/16, 6/16, 1/16, -1/16, 4/16}, -- still torch + { -6/16, -6/16, 0/16, 6/16, -4/16, 2/16}, -- lock + } + }, + groups = {dig_immediate = 3, dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1, attached_node=1, not_in_creative_inventory = 1}, + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = false, + is_ground_content = false, + drop = 'mesecons_delayer:delayer_off_1', + sounds = mcl_sounds.node_sound_stone_defaults(), + mesecons = { + receptor = + { + state = mesecon.state.on, + rules = delayer_get_output_rules + }, + effector = + { + rules = delayer_get_input_rules, + } + }, + on_rotate = on_rotate, +}) + minetest.register_craft({ output = "mesecons_delayer:delayer_off_1", recipe = { @@ -230,8 +338,10 @@ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_off_2") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_off_3") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_off_4") + doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_off_locked") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_on_1") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_on_2") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_on_3") doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_on_4") + doc.add_entry_alias("nodes", "mesecons_delayer:delayer_off_1", "nodes", "mesecons_delayer:delayer_on_locked") end diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_off.png new file mode 100644 index 0000000000000000000000000000000000000000..bee3eeb0720a0b08b697cc966f973c4ca4151d4f GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#MtHWGsY))OdI* z61)N(Ov5~EoD6je(qocC-F$3JBK_RsBE#!S3JY@5CU-Vh^!L7HU|?V@3GxeOaCmkj zje&u|!qdeuq=GRyseviWNJ2D$hf$-MQ)yDzMHNeJ-V+7}DHGBIk`ivMUG^qz&67Q| kJ3Spw-Z(npCIiDfA9kOgOHcAMFfcH9y85}Sb4q9e06CvHR{#J2 literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_end_locked_on.png new file mode 100644 index 0000000000000000000000000000000000000000..3347f1b6201660ed4df4a88d0ce04211d798a1dd GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#R9gRf{Ag)5OFo z61)N(Ov5~EoD6je(qocC-F$3JBK_RsBE#!S3JY@5CU-U~ntpO%U|?V@3GxeOaCmkj zje&u|!qdeuq=GRyseviWNJ2D$hf$-MQ)yDzMHNeJ-V+7}DHGBIk`ivMUG^qz&67Q| kJ3Spw-Z(npCIiDfA9kOgOHcAMFfcH9y85}Sb4q9e0AAlXP5=M^ literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_ends_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_ends_off.png index 1b71813a91793da82bbc702390bffa49a5388931..ed6f4a03089a08768255dc776289e6ea070c2f34 100644 GIT binary patch delta 151 zcmcc0xSVlliFff(``2{mLJiC#`z`&sA>Eakt!I->&H6esS$VZ`# zVah=k;lzecgL;OO(0r%WME+E_jGX#u{iy9f-QGb0E4T4 zP>O`;`h~999L-s!1v$l><@GfQolXL(fo|&^x4&S%_u;@<<9pSXhg;j)cHO*H_L4hr zm08;=8&TGD&5L3=PV={Jzaq}?r8>6u;8U%gw)4CkwYi$Vd)mone=)DPTU_`1{2JZ| zdSMJlGTS8h8E06Zo1QUUg~zAc;_M8cbOsszYAuuB%6A_4G(<8mFfe$!`njxgN@xNA DQi)DJ diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_ends_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_ends_on.png index a5613764c9169c1a71353597771c63cfb7a2a1f3..8569fcd2fcfe43c4e48f4167ffe308c5963bf7c2 100644 GIT binary patch delta 151 zcmcc2xSVl(0r%WME+E^>lFzu{fQaAi=u0;o1WK z(699qmprMj$(r%O)9&Y|)`zF>@8?O8KJYB>#D^&Fc{R)u5)u*>7B^3tKlr;mo+p0a z|0CH9$xG&2+f0bq$!Z|-=ijeJ##p(?p4P_3M#oU!?#9N(#)mcsFQ@Z39s0uq0;e`@ x(qOw=`)5XDfAj2zAel!+6ACJSzEEUlSmC5{XZ>YwPX-1C22WQ%mvv4FO#sO}Rh0k$ diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e8cff329a1f927ef572f3d4e3d7c67cb64704039 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4kiW$h6xih%orFL*h+%@f*HUdZyEbU1_p*2 zPZ!6K3dUp!zXXvVCr(6ga86vnxFV{zy`6gTe~DWM4fu$?+w literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_off.png new file mode 100644 index 0000000000000000000000000000000000000000..909efc1a6de5a98af15c13ce3754d7b0cb50cb39 GIT binary patch literal 267 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdq5|d_r8a6BFYi!z2CNlSAEn zY)lH$Vq-hI zcQ!AbJ|Rs^ti7S8PgS)bCoRmwCOOp2$xx>tJ;ukzWb;FY4Gatn(>+}rLn;`P69iHc zf)WCPk`l@a!wQYc43iSV%s9Nm%(Rjc^wLbT%MA3B5;P08&#`R1JF#)+ikhmOomGm> zzgFF?ez$J->k|v=UccLS`}I39qZJZjjHMfyMWxU2WE-ZHCnXrp5}CH>+?yi`Mwy$U zy?1U>ZZ?=aF|tc7U^m0!jgj2VJCvI@J@gTuesa=ei76titW!l=r!bVJt7@r6`eZUN PFfe$!`njxgN@xNA5j$Yq literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_off.png index 2bb7a170e8f31d855710376f0231f82a8bf3a8cb..ed33c42242cf580b442519487b2df2e8fecf974c 100644 GIT binary patch delta 205 zcmeyy_?dBn1SbnK0|Ud`yN`k<>PgjG2nn?})cDBA6y&5WbBT{Eakt!N_~s zkgv%=gzZ6mSE8t?VcsS8OFK@kURfxd^MNhKK`4BsGe3hmgYeemc}Tl_loP*#(m= zxeWV#SG%;nwYb{MUm?6Pvwz`wv0FShrY=a@R(7j@LgcJdIlBM5a^*!E>)vTIFfcH9 My85}Sb4q9e05@h;XaE2J delta 208 zcmey&_>FObgct`i0|SGGE`Kls0|R4mkh>GZx^prwCn`$Sw>Q)j`fdCVLEHqUol zpCNIt_MX^+8- zUE|V`+@!R1Yj69TKK;zHKblT2BGf#Y0vK#0q!UgxMKymq^|ILdDf7kU%(W}{N-P-| P7#KWV{an^LB{Ts5pYK%@ diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_on.png index 3fd2c4e5cce10291b150e4d645b56d1b47a64902..2456cf0227ba6e4bf634c1d0376eea07e9a8210a 100644 GIT binary patch delta 205 zcmeyy_?dBn1SbnK0|Ud`yN`k<>Pgk7iHWs0)by#U7UZOD=evH5fq`Lyr;B4q1tafi zL%t>h5w-{MU5TQmhIyCVFYP$FdS#(-&Ih&_2chtl&ioAO48n(V-~Ow0=z77Rsrbfr z{gzY?D^vd@_K%UX{*@JW-0y$=$JdMFdHugNRvO2jxrR7xTwm=g`{_{YRF;@CXBSMi zISz#cuK3n7SZoTiLDt36Zl-<>>zJ%9R&wtb3=;z`(%Z M>FVdQ&MBb@03UN!yZ`_I delta 208 zcmey&_>FObgct`i0|SGGE`Kls0|R4mkh>GZx^prwCn`$Sw>Q)j z!N9=K=IP=XB5_%@pPTQ10f*CHgSYSMAKLC(7U-ps;gaI!a#c4^ccu5LJZ6pno98>O z&ycuRdr#~_OWW-A1 b&c+bX#pbop)pR`r0|SGntDnm{r-UW|7LGLf literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_off.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_off.png index bb67ae6920af0bfc2ccb121be19e63686d829021..326dbe63e8fb3af174c927a251756b738dc08cd1 100644 GIT binary patch delta 157 zcmeysxR!B(L_G^L0|Ud`yN`kx7#P$8d_r6q7#MtHWGsY))OdI*61)N(Ok+K5(t}(g z{oLas!|O^43v$vXcQ$LANh>liFff(``2{mLJiC#`z`$VQ>Eakt!I+%X!1T(n}>AzbUbgTe~DWM4f1H&=J delta 224 zcmZ3>_(0r%WME)e<>}%WVsZNI1b^;>1ro>Y zFSq!fm>**{B_OVG@$Bxh?|HIQ!yQ&`+&0Nn$bRPGIm>!a`&<5svpYZk*Oku)?En8! z@QU%_RsPhvU|r^k0znq81}W|uMUF!P4zn~5-jLe3iJ!-cS94wDb8iNtlhs|Vcfx%* z`<_oY{Z{Ynb>Z}DDqXYJ#Qps7>2cMg+WB)q~Z&~my-P8BB i$|O3M;oELq|0S2oOoM739b{l&VDNPHb6Mw<&;$TQ;bdO` diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_on.png index 80dca4d772a6382b701049e07db56055313491c9..bab909eb3788aa85e5b229badbdd6b8ec634eb07 100644 GIT binary patch delta 157 zcmaFOxR!B(L_G^L0|Ud`yN`kx7#P$8d_r6q7#R9gRf{Ag)5OFo61)N(Ok+K5(t}(g z{oLas!|O^43v$vXcQ#M{JZn7z0|R48kY6x^!?PP{3=9k=o-U3d6^zMA4NR{LTMjUs z5MW_eaOUJ`;BhlxF#2+^p>d_Ni>qsd%g*LbPsfutj!w8K#=y}1n{`Y5z2_?mHoL_G%^0|SHn=l_We3=E9LLGDfr>(0r%WME)e>gnPbVsZNIgxy?+0t8(A zRrYxVbawOxIwmDP4_~tR`|?liPA2+3T(0XnygIImE1#cnV1&Yj0iUO7Ed^BTcP1~*Z*?7%QkIp5UOZh_>&gA{ppT^`jo&8Z+ z__N(d-X7C^a>0bnUe|to`o8z`tz{2Hu4DMHSR(rddqU#vr3+#OF1(ib5qPG;iupms cjn7OSIn7fquV8FuU|?YIboFyt=akR{0Q_%U*Z=?k