mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-23 16:30:19 +01:00
add new trap spike major reverse
add new trap spike major reverse (for special event)
This commit is contained in:
parent
da7819c043
commit
178be95a62
BIN
mods/bobblocks/textures/bobblocks_majorspike_reverse.png
Normal file
BIN
mods/bobblocks/textures/bobblocks_majorspike_reverse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -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,
|
||||
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user