mirror of
https://github.com/mt-mods/plantlife_modpack.git
synced 2025-07-18 07:40:39 +02:00
[trunks] Tidy code and disable auto roof corners ABM
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
-- Code by Mossmanikin & Neuromancer
|
||||
-- support for i18n
|
||||
local S = minetest.get_translator("trunks")
|
||||
|
||||
local random = math.random
|
||||
-----------------------------------------------------------------------------------------------
|
||||
-- TWiGS
|
||||
-----------------------------------------------------------------------------------------------
|
||||
@ -44,7 +46,7 @@ for i in pairs(NoDe) do
|
||||
local pt = pointed_thing
|
||||
local direction = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
if minetest.get_node(pt.above).name=="air" then
|
||||
minetest.swap_node(pt.above, {name="trunks:twig_"..math.random(1,4), param2=direction})
|
||||
minetest.swap_node(pt.above, {name="trunks:twig_"..random(1,4), param2=direction})
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
|
Reference in New Issue
Block a user