From 44c95084abdc5496c53cb2752fc3125da6519bb9 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 14 Dec 2019 22:13:54 +0100 Subject: [PATCH] Simplify lilypad rotation --- mods/ITEMS/mcl_flowers/depends.txt | 1 + mods/ITEMS/mcl_flowers/init.lua | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_flowers/depends.txt b/mods/ITEMS/mcl_flowers/depends.txt index e52e9ac073..a7a7b9cd15 100644 --- a/mods/ITEMS/mcl_flowers/depends.txt +++ b/mods/ITEMS/mcl_flowers/depends.txt @@ -1,4 +1,5 @@ mcl_core mcl_util mcl_sounds +screwdriver? doc? diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 3d934c4c39..fb1ae105ef 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -1,5 +1,7 @@ local S = minetest.get_translator("mcl_flowers") +local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil + -- Minetest 0.4 mod: default -- See README.txt for licensing and other information. local init = os.clock() @@ -361,6 +363,10 @@ minetest.register_abm({ end, }) +local on_rotate +if mod_screwdriver then + on_rotate = screwdriver.rotate_simple +end -- Lily Pad minetest.register_node("mcl_flowers:waterlily", { @@ -427,7 +433,8 @@ minetest.register_node("mcl_flowers:waterlily", { end return itemstack - end + end, + on_rotate = on_rotate, }) -- Legacy support