diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-18 13:21:38 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-02-18 13:21:38 -0500 |
commit | 2aae75d105c39af6fa2b5a84672726ee5c19fec1 (patch) | |
tree | 0b7773f105a4809bf97e51b1a7f61ef42981a943 /unifieddyes/init.lua | |
parent | df5879ef7204340b1b4a5d97e3dd211f36d76293 (diff) | |
download | dreambuilder_modpack-2aae75d105c39af6fa2b5a84672726ee5c19fec1.tar dreambuilder_modpack-2aae75d105c39af6fa2b5a84672726ee5c19fec1.tar.gz dreambuilder_modpack-2aae75d105c39af6fa2b5a84672726ee5c19fec1.tar.bz2 dreambuilder_modpack-2aae75d105c39af6fa2b5a84672726ee5c19fec1.tar.xz dreambuilder_modpack-2aae75d105c39af6fa2b5a84672726ee5c19fec1.zip |
updated castle, homedecor, lrfurn, and unified dyes
Diffstat (limited to 'unifieddyes/init.lua')
-rw-r--r-- | unifieddyes/init.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/unifieddyes/init.lua b/unifieddyes/init.lua index bc8234f..6b5ed13 100644 --- a/unifieddyes/init.lua +++ b/unifieddyes/init.lua @@ -112,7 +112,7 @@ function unifieddyes.fix_rotation(pos, placer, itemstack, pointed_thing) end -- use this when you have a "wallmounted" node that should never be oriented --- to floor or ceiling +-- to floor or ceiling... function unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) local node = minetest.get_node(pos) @@ -122,6 +122,21 @@ function unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) minetest.swap_node(pos, { name = node.name, param2 = fdir }) end +-- ... and use this one to force that kind of node off of floor/ceiling +-- orientation after the screwdriver rotates it. + +function unifieddyes.fix_after_screwdriver_nsew(pos, node, user, mode, new_param2) + local new_fdir = new_param2 % 8 + local color = new_param2 - new_fdir + print(new_fdir) + + if new_fdir < 2 then + new_fdir = 2 + minetest.swap_node(pos, { name = node.name, param2 = new_fdir + color }) + return true + end +end + function unifieddyes.select_node(pointed_thing) local pos = pointed_thing.under local node = minetest.get_node_or_nil(pos) |