1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

Updated solarmana_add

- Updated solarmana_add/README.txt
 - Fixed indentation for groups handler
This commit is contained in:
LeMagnesium 2015-05-15 14:13:52 +02:00
parent d211627e05
commit 4c40b51b9b
2 changed files with 12 additions and 8 deletions

View File

@ -4,7 +4,7 @@ Solar Mana Mod [solarmana]
A mana regeneration controller: only regenerate mana in sunlight A mana regeneration controller: only regenerate mana in sunlight
or on special nodes. or on special nodes.
Version: 0.1.0 Version: 0.3.0
Licence: LGPL 2.1 or later Licence: LGPL 2.1 or later
Report bugs or request help on the forum topic. Report bugs or request help on the forum topic.
@ -25,6 +25,10 @@ Dependencies
------------ ------------
* mana: https://forum.minetest.net/viewtopic.php?f=11&t=11154 * mana: https://forum.minetest.net/viewtopic.php?f=11&t=11154
Contributors
------------
Mg (LeMagnesium) - node group handling
Installation Installation
------------ ------------

View File

@ -91,13 +91,13 @@ minetest.register_globalstep(function(dtime)
end end
for key, value in pairs(mana_from_node) do for key, value in pairs(mana_from_node) do
if key:split(":")[1] == "group" then if key:split(":")[1] == "group" then
local groupname = key:split(":")[2] local groupname = key:split(":")[2]
if minetest.get_node_group(node.name, groupname) > 0 then 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) 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 end
end end
mana.setregen(name, regen_to) mana.setregen(name, regen_to)
--print("Regen to "..regen_to.." : "..light_day.."/"..light_now.."/"..light_night) --print("Regen to "..regen_to.." : "..light_day.."/"..light_now.."/"..light_night)