mirror of
https://github.com/mt-mods/playerfactions.git
synced 2025-05-06 19:30:22 +02:00
wrap fixup code in do-block
variable save_needed is not used for anything else
This commit is contained in:
parent
e21bd17ace
commit
a87e59afee
10
init.lua
10
init.lua
@ -546,8 +546,9 @@ minetest.register_chatcommand("factions", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Fix factions
|
-- Fix factions
|
||||||
local save_needed = false
|
do
|
||||||
for _, fact in pairs(facts) do
|
local save_needed = false
|
||||||
|
for _, fact in pairs(facts) do
|
||||||
if not fact.members then
|
if not fact.members then
|
||||||
fact.members = {}
|
fact.members = {}
|
||||||
end
|
end
|
||||||
@ -556,9 +557,10 @@ for _, fact in pairs(facts) do
|
|||||||
fact.password = nil
|
fact.password = nil
|
||||||
save_needed = true
|
save_needed = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if save_needed then
|
if save_needed then
|
||||||
save_factions()
|
save_factions()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
print("[playerfactions] loaded")
|
print("[playerfactions] loaded")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user