fix painting with dyes

This commit is contained in:
Alexsandro Percy 2023-12-27 21:17:57 -03:00
parent c8be6bebf2
commit 6c07b50b8a
2 changed files with 6 additions and 6 deletions

View File

@ -282,12 +282,12 @@ function auto_beetle.set_paint(self, puncher, itmstck)
local color, indx, _
if split[1] then _,indx = split[1]:find('dye') end
if indx then
for clr,_ in pairs(automobiles_lib.colors) do
--[[for clr,_ in pairs(automobiles_lib.colors) do
local _,x = split[2]:find(clr)
if x then color = clr end
end
end]]--
--lets paint!!!!
--local color = item_name:sub(indx+1)
local color = (item_name:sub(indx+1)):gsub(":", "")
local colstr = automobiles_lib.colors[color]
--minetest.chat_send_all(color ..' '.. dump(colstr))
if colstr then

View File

@ -538,12 +538,12 @@ function automobiles_lib.set_paint(self, puncher, itmstck)
local color, indx, _
if split[1] then _,indx = split[1]:find('dye') end
if indx then
for clr,_ in pairs(automobiles_lib.colors) do
--[[for clr,_ in pairs(automobiles_lib.colors) do
local _,x = split[2]:find(clr)
if x then color = clr end
end
end]]--
--lets paint!!!!
--local color = item_name:sub(indx+1)
local color = (item_name:sub(indx+1)):gsub(":", "")
local colstr = automobiles_lib.colors[color]
--minetest.chat_send_all(color ..' '.. dump(colstr))
if colstr then