forked from mtcontrib/factions
Fix: use iterate function
This commit is contained in:
parent
3567fb9e5e
commit
b504eb6794
@ -330,7 +330,7 @@ factions.register_command("list", {
|
|||||||
infaction = false,
|
infaction = false,
|
||||||
global_privileges = def_global_privileges,
|
global_privileges = def_global_privileges,
|
||||||
on_success = function(player, faction, pos, parcelpos, args)
|
on_success = function(player, faction, pos, parcelpos, args)
|
||||||
local list = factions.get_faction_list()
|
local list = factions.factions.iterate()
|
||||||
local tosend = "Existing factions:"
|
local tosend = "Existing factions:"
|
||||||
|
|
||||||
for i,v in ipairs(list) do
|
for i,v in ipairs(list) do
|
||||||
@ -1525,7 +1525,7 @@ factions.register_command("obliterate", {
|
|||||||
infaction = false,
|
infaction = false,
|
||||||
global_privileges = {"faction_admin"},
|
global_privileges = {"faction_admin"},
|
||||||
on_success = function(player, faction, pos, parcelpos, args)
|
on_success = function(player, faction, pos, parcelpos, args)
|
||||||
for i, facname in pairs(factions.get_faction_list()) do
|
for i, facname in factions.factions.iterate() do
|
||||||
factions.disband(facname, "obliterated")
|
factions.disband(facname, "obliterated")
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function factions.start_diplomacy(name, faction)
|
function factions.start_diplomacy(name, faction)
|
||||||
for l, i in pairs(factions.get_faction_list()) do
|
for l, i in factions.factions.iterate() do
|
||||||
local fac = factions.factions.get(i)
|
local fac = factions.factions.get(i)
|
||||||
if i ~= name and not (faction.neutral[i] or faction.allies[i] or faction.enemies[i]) then
|
if i ~= name and not (faction.neutral[i] or faction.allies[i] or faction.enemies[i]) then
|
||||||
if factions_config.faction_diplomacy == true then
|
if factions_config.faction_diplomacy == true then
|
||||||
|
Loading…
Reference in New Issue
Block a user