From 66bbc45a45d898be862fb4af49b2cfd7e5d63241 Mon Sep 17 00:00:00 2001 From: AliasAlreadyTaken Date: Thu, 24 Aug 2023 11:00:59 +0200 Subject: [PATCH] your-land/bugtracker#5187 Missing entity properties no longer lead to crash. --- config.lua | 5 +---- feature_bigscreen_entity.lua | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/config.lua b/config.lua index db84456..389ac02 100644 --- a/config.lua +++ b/config.lua @@ -19,8 +19,5 @@ yl_cinema.settings.enable_craft_bigscreen_recipe = minetest.settings:get("yl_cin yl_cinema.settings.enable_craft_flatscreen_recipe = minetest.settings:get("yl_cinema.enable_craft_flatscreen_recipe") or "wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:black,,wool:black" ---yl_cinema.settings.enable_craft_moviereel_recipe = minetest.settings:get("yl_cinema.enable_craft_moviereel_recipe") or ---"default:steel_ingot,cottages:wagon_wheel,default:steel_ingot,default:mese_crystal_fragment,basic_materials:empty_spool,default:paper,default:steel_ingot,cottages:wagon_wheel,default:steel_ingot" - yl_cinema.settings.enable_craft_moviereel_recipe = minetest.settings:get("yl_cinema.enable_craft_moviereel_recipe") or -"wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:grey,wool:black,,wool:green" \ No newline at end of file +"default:steel_ingot,cottages:wagon_wheel,default:steel_ingot,default:mese_crystal_fragment,basic_materials:empty_spool,default:paper,default:steel_ingot,cottages:wagon_wheel,default:steel_ingot" \ No newline at end of file diff --git a/feature_bigscreen_entity.lua b/feature_bigscreen_entity.lua index dd27265..8339254 100644 --- a/feature_bigscreen_entity.lua +++ b/feature_bigscreen_entity.lua @@ -99,6 +99,10 @@ local function showpage(ent_obj, movie_id, pagenum) end local ent_properties = ent_obj:get_properties() + if not ent_properties then + warn("Cinema Screen Properties not found, movie_id=" .. dump(movie_id)) + return "" + end if ent_properties._playing == true then warn("Tried to play movie on running projector, movie_id=" .. dump(movie_id)) return ""