mirror of
https://github.com/mt-mods/unifieddyes.git
synced 2024-11-26 09:23:47 +01:00
on_construct for nodes that were 89-color or static,
but now use an LBM to convert to the 256-color palette
This commit is contained in:
parent
978e88bda5
commit
15b6016f0f
10
init.lua
10
init.lua
@ -473,6 +473,16 @@ function unifieddyes.getpaletteidx(color, palette_type)
|
||||
end
|
||||
end
|
||||
|
||||
-- if your node was once 89-color and uses an LBM to convert to the 256-color palette,
|
||||
-- call this in that node def's on_construct:
|
||||
|
||||
function unifieddyes.on_construct(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("palette", "ext")
|
||||
end
|
||||
|
||||
-- call this in your node's after_dig_node to get the last-used dye back.
|
||||
|
||||
function unifieddyes.after_dig_node(pos, oldnode, oldmetadata, digger)
|
||||
local prevdye
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user