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!ia0vp^0wB!73?$#)eFPFP2=EDU1=2n;G8RHYYCJp@30{E? zrePj7PKG)K=`qQnZay|9k$&!Rk>PbEg#|fjlRKL$`g`93^)QwM`2{mLJiCzwzopr06CvHR{#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!ia0vp^0wB!73?$#)eFPFP2=EDU1=4-0szs8LX<}j(30{E? zrePj7PKG)K=`qQnZay|9k$&!Rk>PbEg#|fjlRKLgO+PsR^)QwM`2{mLJiCzwzopr0AAlXP5=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 zcmcc0xSVln&gsYvh&bTEzev`G(giS%=i ziwv(TDJ;lIo7~x~Z6>VbP0l+XkK$CfSY delta 197 zcmV;$06PDt0o4JJ7=H)`0000V^Z#K00004VQb$4nuFf3k0001wNkldpW~}hK9P?+IHy+ zQK~kEsyr11XDQJZY(k&4x6~H^^m|=>!R0EsJ)TNID++`6Nj@EG^f!3jbAJ2JtPS8U zRsh6lh8Pb4m^;pwXqO}mOp7?pm`rB?91nXcH2Wjm;7ov700000NkvXXu0mjfQi)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 zcmcc2xSVlhZi<>9SAN*Y&&lA7z|B-Bl zn6D4m(QDz1qKYPA2S*s&K?(uZ>b6Mw<&;$V3=Q#2J literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_front_locked_on.png new file mode 100644 index 0000000000000000000000000000000000000000..59ca93822ea8e302873b261d2cd93e7dca6d63ba GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|Y$ZW{!9W@a@|Lkr1X4AgE{-7; zjL8yy2_j!st`hU~nzVp%g_W;Q4-2m-XIvxSvL7KWl{XkBPG0EeSj8j2XnLgTmP-3B z#)n6D4m(QD%n9CI`1SFE%^^xyRGh&t;ucLK6V6ojP0q 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!ia0vp^0wB!73?$#)eFPHF4e$wZ%}z{=iwuwSb59O+^RY20 zNROG^*<4prxODmi3n8KQh8iCknSz|OFb^9iLmgS6Jy(DlXL`CghEy;nCkUh@1SJF* zC35(BhkI-JYbPay>%W+@E^bRlW38q8({C-STzPW1H)WlZdF+*v5WnTsl~qP-TX~|& zd*3>(Z&5SKINCOgC7v_(#DcIL94orHSM2!U^L$&;Iu*8Ui=5|P-g0BI#1TH(^LMs+ z*-mtvvvNhzEWUu<49S&G&Dd7DuzfvboSAt%mCsN^lZ#7BlS`A4LF=*JmEFsYHv%2W N;OXk;vd$@?2>@x}VPyaS literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_locked_on.png new file mode 100644 index 0000000000000000000000000000000000000000..0bcb3ae5a6cd90d450c450e6b226d8233859e2b3 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF4e$wZ%}z{=iwuwSbFV8YoZQ*G zbozueF|qcBnm$$4f}FH451ZsrHzz}#g7g?48H%4+d?@(^u^w39q`pHR?C8mh5vQ8Cgox)I>uBxRP>5~a`B7>)^ KpUXO@geCwHJ7C-Z 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 zcmV;;05bpf0rLTn7zqRe0002(-QrS_E*gJ05)y}id`ui1aBOC#L|05AXZ0rmlq7#0Wv0000eEe}%w0004VQb$4nuFf3kks%s?hk$%=Y-TtT5=3l6|A2txfZ?e2f!J-Vh*N+@VVWJW~QEp9ETOR8=I2v9ud zxYw8%-hJK{(1eED%TbKdikjJ(X#p}Q#rJb=lL@Rwc;MMqsB`L1iQlwy_c^afA6=r> z3M?72BDJ-RhwP3oX?FZ6Lg-i~Ndiy+JQy2b%7R*h^2+IRJLLn>rvrVc4s05AXZ0rmlq7#0Wv0000eEe}%w0004VQb$4nuFf3kks%s?hk$%=Y-VN_7LFw) z`6Jv&0001nNkl3l6|A2txfZ?e2f!J-Vh*N+@VVWJW~QEp9ETOR8=I2v9ud zxYw8%-hJK{(1eED%TbKdikjJ(X#p}Q#rJb=lL@Rwc;MMqsB`L1iQlwy_c^afA6=r> z3M?72BDJ-RhwP3oX?FZ6Lg-i~Ndiy+JQy2b%7R*h^2+IRJLLn>rvrVc4sPbEg#|fjlRKNu&hPsQ)WcX3PbEg#|fjlRKO9OAkf>^)QwM`2{mLJiCzwGRV`# zF{FYqd4ZrnQbLmfOCpadhw|J;$wLN79jOU-&T1U^FmK|2X70&*CMX=<-Ok1k(8cDp T(A9K3P%ne0tDnm{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`l^lzMn&gsYvh&bTEzev`G(giS%=i ziwv(TDJ;lIo7~x~Z6>V*!PC{xWt~$( F695ClF~tA? delta 224 zcmV<603ZLY0q_Bk7=H)`0000V^Z#K00004VQb$4nuFf3k00020NklVi+1;J9hFx=sj;?_H4;CW!cM}Vqxc3q_g*@@`pk+FH8zWu82yA)fJ=76;fuJGrJ4JGEl2l1=6JP z9H$6{U}Bo6&`S~xpdkZ7ArN`4OetNOmb)hNGpzYYiKHo|4^#lmZu>8m0#26);&xZ& zyTt9rE#%NN20tx7uV=pRpF17ES*`%^qZn)02Vh~_rJ!99(CZlZQOtNc1K@br^8$!$ VgO$^$0fPVl002ovPDHLkV1oQ_T-X2r