From 178be95a6267e3336bc5fbbe9e3e5d0514adda53 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Fri, 20 Mar 2015 23:58:58 +0100 Subject: [PATCH] add new trap spike major reverse add new trap spike major reverse (for special event) --- .../textures/bobblocks_majorspike_reverse.png | Bin 0 -> 1214 bytes mods/bobblocks/trap.lua | 36 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 mods/bobblocks/textures/bobblocks_majorspike_reverse.png diff --git a/mods/bobblocks/textures/bobblocks_majorspike_reverse.png b/mods/bobblocks/textures/bobblocks_majorspike_reverse.png new file mode 100644 index 0000000000000000000000000000000000000000..0f9b50b2bc91ca3e03dd8fee8b688f37e45d45f2 GIT binary patch literal 1214 zcmV;v1VQ_WP)X+i%-s7>9pOoHR+3G^vw1N!#>5&l43w0wlC7eIwHg>ES$Tf24}&_f!xNt&e1!L6M-vCY+-I-g5ivG4N9 z&tIPJec#Wf(6nY}uc+a009=a0FTcj97kp%RNS&EJ5Al%4_wzqf0PyBpZ>WO2Tz`&%{sBUOveMX2Zena~tZ}$<2}v#m+S)ibQ31y1 z$JLpOC|CA%oTjZvZY7b)avGE6Ivg$!oGv#ZV5MpBl`<%*(HW=90X7uG*5-dyV0`2i z#D0$>k$9v(ky1mYw2x?Czs7R89Od@I%c@ap`!9OT%t+=mrP?!jUd?_??8n#P}#;u{dfqUSqFMPC}{I;BL2{E*#|eZ&J-Pt`fbsEj=<<09fgk6807U`*0Hd+(^>xUqs+%LC1%e==UY8+?qK-42 z3|KY@o86}4$?X*QvOWs{k|e?9YKPm?kSmpn$fi^1?CjJSQGt9R2fM>Tob-z?KgZ(Y zJy4KzyjqiCcakl*G<_M_OcuP@Xn|3Ci3+$q?TGe;ps4!6x^s6P8_!elwCk^&a3n#d zh;5MCO@p?zp-?!`*o*d_yfws=!C;WMDgfYRdhp)t47lAr9shGFPF=t8E+L@U+{8;K zoyj1{aoEc?_84>rV}F5ve1 z!30Ct+dt6pl_x8hx^RK`BLKK{YmQ)re4eOeq&tFWltqAP3??D4wz5LWD8g>nU#;$F zKdQBwp#Wbg5lpqvL?w&G5-~^Q^Z;-;T=4mPI(Dqsu)6llSb#4QZ4o6aZhrhe=I;Ka z{Z?00(DpVcC%zAc0;%mB?#$iRZ5oNNxPEooP{3#zeM`Of`2mmtaO`@drS`BQt-?YGKc~O+GvEKO78VVRKpVx!KL!ouB zMSgK{73tkA?SO_YFj}-C!Dh3y4z|cQ-x$*Z4u23lf6zMEBHw&tObb{o3exGcX#ul& z(=)(r{f%mY{ObMRyy*(`M0)Y`uYXJnn9Z9O5X3t8@{wr)vw8CZM@M*j%J^gSGV(3g zrFX8WnY{z`W#>&-V6Rj`V(GrwxaquUfoF;P)Nl99e+$g!O$z`(vBb9yoiTqV0e1(} cI&{YTzvOk`U^WCPN&o-=07*qoM6N<$f&yYn{Qv*} literal 0 HcmV?d00001 diff --git a/mods/bobblocks/trap.lua b/mods/bobblocks/trap.lua index 55534982..4a45327d 100755 --- a/mods/bobblocks/trap.lua +++ b/mods/bobblocks/trap.lua @@ -123,6 +123,18 @@ minetest.register_node("bobblocks:trap_spike_major_set", { }) +minetest.register_node("bobblocks:spike_major_reverse", { + description = "Trap Spike Major Reverse", + drawtype = "plantlike", + visual_scale = 1, + tile_images = {"bobblocks_majorspike_reverse.png"}, + inventory_image = ("bobblocks_majorspike_reverse.png"), + paramtype = "light", + walkable = false, + sunlight_propagates = true, + groups = {cracky=2,melty=2}, +}) + -- Crafting minetest.register_craft({ @@ -150,6 +162,14 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'bobblocks:spike_major_reverse', + recipe = { + {'', 'default:steel_ingot', ''}, + {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'}, + } +}) + -- ABM minetest.register_abm( {nodenames = {"bobblocks:trap_spike"}, @@ -179,3 +199,19 @@ minetest.register_abm( end, }) + +minetest.register_abm( + {nodenames = {"bobblocks:spike_major_reverse"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + pos.y = pos.y-1.2 + local objs = minetest.get_objects_inside_radius(pos, 1) + for k, obj in pairs(objs) do + obj:set_hp(obj:get_hp()-100) + minetest.sound_play("bobblocks_trap_fall", + {pos = pos, gain = 1.0, max_hear_distance = 3,}) + end + end, + +})