1
0
Fork 0

Simplify lilypad rotation

This commit is contained in:
Wuzzy 2019-12-14 22:13:54 +01:00
parent 101c9b7322
commit 44c95084ab
2 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,5 @@
mcl_core mcl_core
mcl_util mcl_util
mcl_sounds mcl_sounds
screwdriver?
doc? doc?

View File

@ -1,5 +1,7 @@
local S = minetest.get_translator("mcl_flowers") local S = minetest.get_translator("mcl_flowers")
local mod_screwdriver = minetest.get_modpath("screwdriver") ~= nil
-- Minetest 0.4 mod: default -- Minetest 0.4 mod: default
-- See README.txt for licensing and other information. -- See README.txt for licensing and other information.
local init = os.clock() local init = os.clock()
@ -361,6 +363,10 @@ minetest.register_abm({
end, end,
}) })
local on_rotate
if mod_screwdriver then
on_rotate = screwdriver.rotate_simple
end
-- Lily Pad -- Lily Pad
minetest.register_node("mcl_flowers:waterlily", { minetest.register_node("mcl_flowers:waterlily", {
@ -427,7 +433,8 @@ minetest.register_node("mcl_flowers:waterlily", {
end end
return itemstack return itemstack
end end,
on_rotate = on_rotate,
}) })
-- Legacy support -- Legacy support