dye and bike apinter now paint just the details

This commit is contained in:
Alexsandro Percy 2023-04-30 13:48:29 -03:00
parent 90584e7514
commit a74eb70da8
2 changed files with 7 additions and 5 deletions

View File

@ -55,12 +55,12 @@ if minetest.get_modpath("default") then
{"automobiles_lib:wheel","automobiles_trans_am:trans_am_body", "automobiles_lib:wheel"},
}
})
--[[minetest.register_craft({
minetest.register_craft({
output = "automobiles_trans_am:trans_am_body",
recipe = {
{"default:glass" ,"default:mese_crystal","default:steel_ingot"},
{"default:glass","default:mese","default:steel_ingot"},
{"default:steel_ingot","default:steelblock","default:steel_ingot"},
{"default:steelblock","default:steelblock", "default:steelblock"},
}
})]]--
})
end

View File

@ -261,7 +261,8 @@ function set_paint(self, puncher, itmstck)
--painting with bike painter
local meta = itmstck:get_meta()
local colstr = meta:get_string("paint_color")
automobiles_lib.paint(self, colstr)
self._det_color = colstr
paint(self, self._color)
return true
else
--painting with dyes
@ -278,7 +279,8 @@ function set_paint(self, puncher, itmstck)
local colstr = automobiles_lib.colors[color]
--minetest.chat_send_all(color ..' '.. dump(colstr))
if colstr then
paint(self, colstr)
self._det_color = colstr
paint(self, self._color)
itmstck:set_count(itmstck:get_count()-1)
puncher:set_wielded_item(itmstck)
return true