diff --git a/feature_bigscreen_entity.lua b/feature_bigscreen_entity.lua index f46fd9c..2ca1f71 100644 --- a/feature_bigscreen_entity.lua +++ b/feature_bigscreen_entity.lua @@ -22,6 +22,7 @@ local bigscreen_entity_definition = { textures = {"yl_cinema_block_bigscreen.png^yl_cinema_icon_movie_inv.png"}, _yl_cinema_stored_movie = "", on_blast = function() + return false, false, {} end } @@ -131,6 +132,15 @@ local function on_destruct_node(pos) end end +local function on_blast_node(pos, intensity) + local ent_obj = find_entity(pos) + if ent_obj then + ent_obj:remove() + else + yl_cinema.warn("Bigscreen entity not found at " .. minetest.pos_to_string(pos, 0)) + end +end + local function allow_metadata_inventory_put_node(pos, listname, index, stack, player) local groupname = "movie" local itemname = stack:get_name() @@ -204,6 +214,7 @@ local bigscreen_block_definition = { can_dig = can_dig_node, on_construct = on_construct_node, on_destruct = on_destruct_node, + on_blast = on_blast_node, on_receive_fields = on_receive_fields_node, allow_metadata_inventory_put = allow_metadata_inventory_put_node, allow_metadata_inventory_take = allow_metadata_inventory_take_node,