mirror of
https://github.com/APercy/automobiles_pck
synced 2025-09-05 03:26:24 +02:00
fix painting with dyes
This commit is contained in:
parent
c8be6bebf2
commit
6c07b50b8a
@ -282,12 +282,12 @@ function auto_beetle.set_paint(self, puncher, itmstck)
|
|||||||
local color, indx, _
|
local color, indx, _
|
||||||
if split[1] then _,indx = split[1]:find('dye') end
|
if split[1] then _,indx = split[1]:find('dye') end
|
||||||
if indx then
|
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)
|
local _,x = split[2]:find(clr)
|
||||||
if x then color = clr end
|
if x then color = clr end
|
||||||
end
|
end]]--
|
||||||
--lets paint!!!!
|
--lets paint!!!!
|
||||||
--local color = item_name:sub(indx+1)
|
local color = (item_name:sub(indx+1)):gsub(":", "")
|
||||||
local colstr = automobiles_lib.colors[color]
|
local colstr = automobiles_lib.colors[color]
|
||||||
--minetest.chat_send_all(color ..' '.. dump(colstr))
|
--minetest.chat_send_all(color ..' '.. dump(colstr))
|
||||||
if colstr then
|
if colstr then
|
||||||
|
@ -538,12 +538,12 @@ function automobiles_lib.set_paint(self, puncher, itmstck)
|
|||||||
local color, indx, _
|
local color, indx, _
|
||||||
if split[1] then _,indx = split[1]:find('dye') end
|
if split[1] then _,indx = split[1]:find('dye') end
|
||||||
if indx then
|
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)
|
local _,x = split[2]:find(clr)
|
||||||
if x then color = clr end
|
if x then color = clr end
|
||||||
end
|
end]]--
|
||||||
--lets paint!!!!
|
--lets paint!!!!
|
||||||
--local color = item_name:sub(indx+1)
|
local color = (item_name:sub(indx+1)):gsub(":", "")
|
||||||
local colstr = automobiles_lib.colors[color]
|
local colstr = automobiles_lib.colors[color]
|
||||||
--minetest.chat_send_all(color ..' '.. dump(colstr))
|
--minetest.chat_send_all(color ..' '.. dump(colstr))
|
||||||
if colstr then
|
if colstr then
|
||||||
|
Loading…
Reference in New Issue
Block a user