This commit is contained in:
Anthony Recascino 2016-08-04 16:15:44 -04:00
parent c6872edd53
commit 299f575e14

View File

@ -134,6 +134,9 @@ if next(factionsmod.get_faction_list()) ~= nil then
print('test') print('test')
if digger == nil then if digger == nil then
return false return false
end
if next(factionsmod.get_factionsmod(digger)) == nil then
return false
end end
for k2,v2 in pairs(factionsmod.get_factionsmod(digger)) do for k2,v2 in pairs(factionsmod.get_factionsmod(digger)) do
print(v2) print(v2)
@ -923,10 +926,11 @@ function factionsmod.load()
function(dtime) function(dtime)
if next(factionsmod.get_faction_list()) ~= nil then if next(factionsmod.get_faction_list()) ~= nil then
for k,v in pairs(factionsmod.get_faction_list()) do for k,v in pairs(factionsmod.get_faction_list()) do
print(v) if factionsmod.data.factionsmod[v].power + (dtime/120.0) <= factionsmod.data.factionsmod[v].powercap then
factionsmod.data.factionsmod[v].power = factionsmod.data.factionsmod[v].power + (dtime/120.0) factionsmod.data.factionsmod[v].power = factionsmod.data.factionsmod[v].power + (dtime/120.0)
end end
end end
end
end) end)
minetest.register_on_joinplayer( minetest.register_on_joinplayer(
function(player) function(player)