diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-14 01:59:32 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-03-14 02:05:52 -0400 |
commit | 15b6016f0f040e7f7e910c4b769717fd8becb24c (patch) | |
tree | 4e936c19f2f5cad23b6cc24f763db366927a4687 /init.lua | |
parent | 978e88bda5b6d1f02187f700630b1a80a46fed07 (diff) | |
download | unifieddyes-15b6016f0f040e7f7e910c4b769717fd8becb24c.tar unifieddyes-15b6016f0f040e7f7e910c4b769717fd8becb24c.tar.gz unifieddyes-15b6016f0f040e7f7e910c4b769717fd8becb24c.tar.bz2 unifieddyes-15b6016f0f040e7f7e910c4b769717fd8becb24c.tar.xz unifieddyes-15b6016f0f040e7f7e910c4b769717fd8becb24c.zip |
on_construct for nodes that were 89-color or static,
but now use an LBM to convert to the 256-color palette
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |