fix one time prefix

This commit is contained in:
Alexsandro Percy 2024-02-14 10:28:02 -03:00
parent 4be1bae494
commit 978d5858cf

View file

@ -239,7 +239,8 @@ function ap_airship.table_copy(table_here)
return tablecopy return tablecopy
end end
local function paint(self) local function paint(self, write_prefix)
write_prefix = write_prefix or false
local l_textures = ap_airship.textures_copy() local l_textures = ap_airship.textures_copy()
for _, texture in ipairs(l_textures) do for _, texture in ipairs(l_textures) do
local indx = texture:find('wool_blue.png') local indx = texture:find('wool_blue.png')
@ -254,7 +255,7 @@ local function paint(self)
if indx then if indx then
l_textures[_] = self.logo l_textures[_] = self.logo
end end
if airutils._use_signs_api then if airutils._use_signs_api and write_prefix == true then
indx = texture:find('airutils_name_canvas.png') indx = texture:find('airutils_name_canvas.png')
if indx then if indx then
l_textures[_] = "airutils_name_canvas.png^"..airutils.convert_text_to_texture(self._ship_name, self._name_color or 0, self._name_hor_aligment or 0.8) l_textures[_] = "airutils_name_canvas.png^"..airutils.convert_text_to_texture(self._ship_name, self._name_color or 0, self._name_hor_aligment or 0.8)
@ -277,7 +278,7 @@ end
function ap_airship.paint(self, colstr) function ap_airship.paint(self, colstr)
if colstr then if colstr then
self.color = colstr self.color = colstr
paint(self) paint(self, true)
end end
end end
function ap_airship.paint2(self, colstr) function ap_airship.paint2(self, colstr)