From d3b677b8a57504664c87b25082cbb249584cef1b Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sat, 8 Jul 2023 11:05:44 -0300 Subject: [PATCH] fixed plane name tag --- lib_planes/entities.lua | 10 +++++----- lib_planes/utilities.lua | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib_planes/entities.lua b/lib_planes/entities.lua index 2ab25d0..19c9a76 100644 --- a/lib_planes/entities.lua +++ b/lib_planes/entities.lua @@ -89,7 +89,7 @@ function airutils.on_activate(self, staticdata, dtime_s) if self._flap then airutils.flap_on(self) end - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) end function airutils.on_step(self,dtime,colinfo) @@ -559,7 +559,7 @@ local function damage_vehicle(self, toolcaps, ttime, damage) damage = damage + (toolcaps.damage_groups[group] or 0) * tmp self.hp_max = self.hp_max - damage - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) end end @@ -568,7 +568,7 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage) if self.hp_max <= 0 then airutils.destroy(self, name) end - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) -- lets permit destroying on the air local is_flying = not self.colinfo.touching_ground @@ -629,7 +629,7 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage) inv:remove_item("main", stack) self.hp_max = self.hp_max + 10 if self.hp_max > self._max_plane_hp then self.hp_max = self._max_plane_hp end - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) else minetest.chat_send_player(puncher:get_player_name(), "You need steel ingots in your inventory to perform this repair.") end @@ -652,7 +652,7 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage) fade = 0.0, pitch = 1.0, }) - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) end end end diff --git a/lib_planes/utilities.lua b/lib_planes/utilities.lua index 40ba4cd..5f9ff96 100644 --- a/lib_planes/utilities.lua +++ b/lib_planes/utilities.lua @@ -71,7 +71,7 @@ end function airutils.dettachPlayer(self, player) local name = self.driver_name - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) airutils.remove_hud(player) @@ -359,7 +359,7 @@ function airutils.testImpact(self, velocity, position) self.hp_max = self.hp_max - self._damage_by_wind_speed if self.driver_name then local player_name = self.driver_name - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) end if self.hp_max < 0 then --if acumulated damage is greater than 50, adieu airutils.destroy(self) @@ -391,7 +391,7 @@ function airutils.testImpact(self, velocity, position) pitch = 1.0, }, true) - airutils.setText(self, self.infotext) + airutils.setText(self, self._vehicle_name) if self.driver_name then local player_name = self.driver_name