2021-03-13 20:39:42 -06:00
|
|
|
minetest.register_node('x_bows:target', {
|
2022-10-20 08:13:35 -05:00
|
|
|
description = 'Target',
|
2022-10-16 15:02:04 -05:00
|
|
|
tiles = {'x_bows_target.png'},
|
|
|
|
is_ground_content = false,
|
2022-10-20 08:13:35 -05:00
|
|
|
groups = {snappy=3, flammable=4, fall_damage_add_percent = -30},
|
2022-10-16 15:02:04 -05:00
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
mesecons = {receptor = {state = 'off'}},
|
2022-10-20 08:13:35 -05:00
|
|
|
---@param pos Vector
|
|
|
|
---@param elapsed number
|
|
|
|
---@return boolean
|
2022-10-16 15:02:04 -05:00
|
|
|
on_timer = function (pos, elapsed)
|
2022-10-20 08:13:35 -05:00
|
|
|
if XBows.mesecons then
|
|
|
|
mesecon.receptor_off(pos)
|
|
|
|
end
|
|
|
|
|
2022-10-16 15:02:04 -05:00
|
|
|
return false
|
2022-10-20 08:13:35 -05:00
|
|
|
end
|
2021-03-13 20:39:42 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2022-10-16 15:02:04 -05:00
|
|
|
type = 'fuel',
|
|
|
|
recipe = 'x_bows:target',
|
2022-10-20 08:13:35 -05:00
|
|
|
burntime = 3
|
2021-03-13 20:39:42 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2022-10-16 15:02:04 -05:00
|
|
|
output = 'x_bows:target',
|
|
|
|
recipe = {
|
|
|
|
{'', 'default:mese_crystal', ''},
|
|
|
|
{'default:mese_crystal', 'farming:straw', 'default:mese_crystal'},
|
|
|
|
{'', 'default:mese_crystal', ''},
|
|
|
|
}
|
2021-03-13 20:39:42 -06:00
|
|
|
})
|