forked from mtcontrib/factions
Bugfixes
This commit is contained in:
parent
c6872edd53
commit
299f575e14
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user