Make torches and music players drop on flood

This commit is contained in:
Wuzzy 2019-09-22 15:41:50 +02:00
parent aa28aa785f
commit af26012c69
2 changed files with 12 additions and 0 deletions

View File

@ -20,6 +20,9 @@ local function register_torch(subname, description, tiles, overlay_tiles, overla
sunlight_propagates = true,
walkable = false,
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "default:torch_dead")
end,
node_placement_prediction = "",
node_box = {
type = "wallmounted",
@ -96,6 +99,9 @@ local function register_torch(subname, description, tiles, overlay_tiles, overla
sunlight_propagates = true,
walkable = false,
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "default:torch_dead")
end,
node_box = {
type = "wallmounted",
wall_top = {-2/16, 0, -2/16, 2/16, 0.5, 2/16},

View File

@ -114,6 +114,9 @@ if minetest.settings:get_bool("music_enable") then
is_ground_content = false,
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "music:player")
end,
paramtype = "light",
drawtype = "nodebox",
@ -177,6 +180,9 @@ else
is_ground_content = false,
floodable = true,
on_flood = function(pos, oldnode, newnode)
minetest.add_item(pos, "music:player")
end,
paramtype = "light",
drawtype = "nodebox",