mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
fixed plane name tag
This commit is contained in:
parent
ba3e6b5f68
commit
d3b677b8a5
2 changed files with 8 additions and 8 deletions
|
@ -89,7 +89,7 @@ function airutils.on_activate(self, staticdata, dtime_s)
|
||||||
|
|
||||||
if self._flap then airutils.flap_on(self) end
|
if self._flap then airutils.flap_on(self) end
|
||||||
|
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
function airutils.on_step(self,dtime,colinfo)
|
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
|
damage = damage + (toolcaps.damage_groups[group] or 0) * tmp
|
||||||
self.hp_max = self.hp_max - damage
|
self.hp_max = self.hp_max - damage
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -568,7 +568,7 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage)
|
||||||
if self.hp_max <= 0 then
|
if self.hp_max <= 0 then
|
||||||
airutils.destroy(self, name)
|
airutils.destroy(self, name)
|
||||||
end
|
end
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
|
|
||||||
-- lets permit destroying on the air
|
-- lets permit destroying on the air
|
||||||
local is_flying = not self.colinfo.touching_ground
|
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)
|
inv:remove_item("main", stack)
|
||||||
self.hp_max = self.hp_max + 10
|
self.hp_max = self.hp_max + 10
|
||||||
if self.hp_max > self._max_plane_hp then self.hp_max = self._max_plane_hp end
|
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
|
else
|
||||||
minetest.chat_send_player(puncher:get_player_name(), "You need steel ingots in your inventory to perform this repair.")
|
minetest.chat_send_player(puncher:get_player_name(), "You need steel ingots in your inventory to perform this repair.")
|
||||||
end
|
end
|
||||||
|
@ -652,7 +652,7 @@ function airutils.on_punch(self, puncher, ttime, toolcaps, dir, damage)
|
||||||
fade = 0.0,
|
fade = 0.0,
|
||||||
pitch = 1.0,
|
pitch = 1.0,
|
||||||
})
|
})
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -71,7 +71,7 @@ end
|
||||||
|
|
||||||
function airutils.dettachPlayer(self, player)
|
function airutils.dettachPlayer(self, player)
|
||||||
local name = self.driver_name
|
local name = self.driver_name
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
|
|
||||||
airutils.remove_hud(player)
|
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
|
self.hp_max = self.hp_max - self._damage_by_wind_speed
|
||||||
if self.driver_name then
|
if self.driver_name then
|
||||||
local player_name = self.driver_name
|
local player_name = self.driver_name
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
end
|
end
|
||||||
if self.hp_max < 0 then --if acumulated damage is greater than 50, adieu
|
if self.hp_max < 0 then --if acumulated damage is greater than 50, adieu
|
||||||
airutils.destroy(self)
|
airutils.destroy(self)
|
||||||
|
@ -391,7 +391,7 @@ function airutils.testImpact(self, velocity, position)
|
||||||
pitch = 1.0,
|
pitch = 1.0,
|
||||||
}, true)
|
}, true)
|
||||||
|
|
||||||
airutils.setText(self, self.infotext)
|
airutils.setText(self, self._vehicle_name)
|
||||||
|
|
||||||
if self.driver_name then
|
if self.driver_name then
|
||||||
local player_name = self.driver_name
|
local player_name = self.driver_name
|
||||||
|
|
Loading…
Add table
Reference in a new issue