From 70513faf55bf4069295200b86b22d806679a34b0 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Fri, 15 May 2015 14:13:52 +0200 Subject: [PATCH] Updated solarmana_add - Updated solarmana_add/README.txt - Fixed indentation for groups handler --- mods/solarmana/init.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mods/solarmana/init.lua b/mods/solarmana/init.lua index eef0caf0..caa38c21 100644 --- a/mods/solarmana/init.lua +++ b/mods/solarmana/init.lua @@ -91,13 +91,13 @@ minetest.register_globalstep(function(dtime) end for key, value in pairs(mana_from_node) do - if key:split(":")[1] == "group" then - local groupname = key:split(":")[2] - if minetest.get_node_group(node.name, groupname) > 0 then - regen_to = math.max(regen_to, value) -- We get the greater one (if the node is part of 2 or more groups) - end - end - end + if key:split(":")[1] == "group" then + local groupname = key:split(":")[2] + if minetest.get_node_group(node.name, groupname) > 0 then + regen_to = math.max(regen_to, value) -- We get the greater one (if the node is part of 2 or more groups) + end + end + end mana.setregen(name, regen_to) --print("Regen to "..regen_to.." : "..light_day.."/"..light_now.."/"..light_night)