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 bf08849a3..ee72b7d08 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 zcmV;I0BHZ!0jB|w7=Hu<0002(-QrRJ001XYOjJbx002xJ95@mZCJYRCU`kOyHC;(O zXHrC2PDfr@SAKMHaBOCiiGwRP8zBGy00DGTPE!Ct=GbNc001sYL_t(|0b`&AU{nAS zOdy5;l)(fOVStG+e*npM09CwadpW~}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 zcmV;I0BHZy0jB|w7=Hu<0002(-QrRJ001XYOjJbx00539C2|=VW)>EBU`kOyHC;(O zXHrC2PDfr@SAKMHaBOCiiG!2#ny&x=00DGTPE!Ct=GbNc001sYL_t(|0b`&AU{nAS zOdy5;l)(fOVStG+e*npM09CwanD9wH`SOL~%iq5YWE;TdZpiRjOP+iK7#J8BcsSX~H{kuJUkqQq z|HNwmW2B!uJdjwq1uzu+{`!FdT^?DCg@J*AK~+tQfq{X6;XJ|9XADBZ{0s~X3=GP$ xvM2`Kef*e#kAs`x!P939;&PC1dHLue0|2N(B;2plOGy9#002ovPDHLkV1mg!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 zcmV+m0rdWfP)Qvk%76W ze0sTwdLe`Qs@;3;uDk2VpnmJ_zT4~W7BZ+976Em!0~H(23~MoFcVb{MniQ6z&g{e> zGHJ3~OS!TmgD{hkS&Al5y8xrHSqp=>BZIQxOc$5Ql9L#e6a@v96or%kb!R0iC0R^q P00000NkvXXu0mjf5j$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 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>rvrVc4s}1_E{-7;jL8cG1(Fh)3|JC*R5_IAHcB2cNa{#UxN}zHz=wGg|1)z>-ZMer@a}dt ahJY?MuZ6Cr>lqjr7(8A5T-G@yGywqG)ilKb literal 0 HcmV?d00001 diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_locked_on.png b/mods/ITEMS/REDSTONE/mesecons_delayer/textures/mesecons_delayer_sides_locked_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e2102f205bd99f72e9e434ef0943a73215f18c35 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdmW!d_r6q7#R9gRf{Ag)5OFo z61)N(Ov5~El0)5MJ#7loW730MBK_RsBE#!S3JY@5CU-XHmmZ8@U|?V@3GxeOaCmkj z4P=m~i(^OyWAXw)fuw{c1C~S{RSxC3jgp59k~&fo?wr*)@L}G>|IFNz_e@YYyt|!^ ZA)t%RYoV*@dIkmt22WQ%mvv4FO#l{-H2MGl 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 zcmV;O0Al~}0j&X$7=Hu<0002(-QrRJ001XYOjJbx002xJ95@mZCJYRCU`kOyHC;(O zXHrC2PDfr@SAKMHaBOCiiGwRP8zBGy00DGTPE!Ct=GbNc001;eL_t(|0b^o-0_rh@ zzyQb)1Op&L2@HS?Mlb*}^ud6EsY66XMOZ|+gNaE&$=Jn^*%kl*i~9w%f8K+>00000 LNkvXXu0mjf1H&=J delta 224 zcmV<603ZLY0q_Bk7=H)`0000V^Z#K00004VQb$4nuFf3k00020NklVi+1;J9hFx=sj;?_H4;CW!EBU`kOyHC;(O zXHrC2PDfr@SAKMHaBOCiiG!2#ny&x=00DGTPE!Ct=GbNc001;eL_t(|0b^o-0_rh@ zzyQb)1Op&L2@HS?Mlb*}^ud6EsY66XMOZ|+gNaE&$=Jn^*%kl*i~9w%f8K+>00000 LNkvXXu0mjfLV7gf delta 219 zcmV<103`pd0qX&f7=H)`0000V^Z#K00004VQb$4nuFf3k0001`NklcM}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