From 1f8c1a635c0219e4f20db0539d2a005c650560aa Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Fri, 13 Oct 2023 10:15:17 -0300 Subject: [PATCH] hiding plane while landed --- lib_planes/entities.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 5afc491..20065e2 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -177,6 +177,19 @@ function airutils.logic(self) local co_pilot = nil if self.co_pilot and self._have_copilot then co_pilot = minetest.get_player_by_name(self.co_pilot) end + local plane_properties = self.object:get_properties() + if self.isonground then + if plane_properties.show_on_minimap == true then + plane_properties.show_on_minimap = false + self.object:set_properties(plane_properties) + end + else + if plane_properties.show_on_minimap == false then + plane_properties.show_on_minimap = true + self.object:set_properties(plane_properties) + end + end + if player then local ctrl = player:get_player_control() ---------------------