From a3374c19a77fe349200651f9e6993ba398c2c4d9 Mon Sep 17 00:00:00 2001 From: Giov4 Date: Mon, 19 Oct 2020 16:36:26 +0200 Subject: [PATCH] + Code cleaning --- _map_handler/map_manager.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_map_handler/map_manager.lua b/_map_handler/map_manager.lua index 509dae9..7aa5650 100644 --- a/_map_handler/map_manager.lua +++ b/_map_handler/map_manager.lua @@ -67,6 +67,7 @@ function skywars.load_map_mapblocks(arena) end + function skywars.reset_map(arena) local maps = skywars.load_maps() local pos1, pos2 = reorder_positions(arena.pos1, arena.pos2) @@ -76,8 +77,9 @@ function skywars.reset_map(arena) -- deleting drops for i, obj in pairs(minetest.get_objects_inside_radius(map_center, distance_from_center)) do if not obj:is_player() then - local prop = obj:get_properties() - if prop.automatic_rotate > 0 and ItemStack(prop.textures[1]):is_known() then + local props = obj:get_properties() + local entity_texture = props.textures[1] + if props.automatic_rotate > 0 and ItemStack(entity_texture):is_known() then obj:remove() end end