summaryrefslogtreecommitdiff
path: root/ilights/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-17 23:14:21 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-02-17 23:14:21 -0500
commitdf5879ef7204340b1b4a5d97e3dd211f36d76293 (patch)
treea190e865741a1f6047b499a5947d91b500b1f0ae /ilights/init.lua
parentbc71eb952f8a699180bb7f4c22449a07bb29c91e (diff)
downloaddreambuilder_modpack-df5879ef7204340b1b4a5d97e3dd211f36d76293.tar
dreambuilder_modpack-df5879ef7204340b1b4a5d97e3dd211f36d76293.tar.gz
dreambuilder_modpack-df5879ef7204340b1b4a5d97e3dd211f36d76293.tar.bz2
dreambuilder_modpack-df5879ef7204340b1b4a5d97e3dd211f36d76293.tar.xz
dreambuilder_modpack-df5879ef7204340b1b4a5d97e3dd211f36d76293.zip
update castle, homedecor, ilights, and unified dyes
Diffstat (limited to 'ilights/init.lua')
-rw-r--r--ilights/init.lua21
1 files changed, 1 insertions, 20 deletions
diff --git a/ilights/init.lua b/ilights/init.lua
index bc58629..6f6fdd4 100644
--- a/ilights/init.lua
+++ b/ilights/init.lua
@@ -20,25 +20,6 @@ end
ilights.modpath = minetest.get_modpath("ilights")
--- Helper function to work around an engine bug
-
-function ilights.fix_rotation(pos, placer, itemstack, pointed_thing)
- local node = minetest.get_node(pos)
- local yaw = placer:get_look_yaw()
- local dir = minetest.yaw_to_dir(yaw-1.5)
- local pitch = placer:get_look_vertical()
-
- local fdir = minetest.dir_to_wallmounted(dir)
-
- if pitch < -(math.pi/4) then
- fdir = 0
- elseif pitch > math.pi/4 then
- fdir = 1
- end
- minetest.swap_node(pos, { name = node.name, param2 = fdir })
-end
-
-
-- The important stuff!
local lamp_cbox = {
@@ -67,7 +48,7 @@ minetest.register_node("ilights:light", {
light_source = 14,
selection_box = lamp_cbox,
node_box = lamp_cbox,
- after_place_node = ilights.fix_rotation,
+ after_place_node = unifieddyes.fix_rotation,
after_dig_node = unifieddyes.after_dig_node
})