Minor cleaning
This commit is contained in:
parent
a1af79a870
commit
8fc01b7ece
|
@ -203,16 +203,14 @@ local function init_data(player, info)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
i3.data[name] = i3.data[name] or {}
|
i3.data[name] = i3.data[name] or {}
|
||||||
local data = i3.data[name]
|
local data = i3.data[name]
|
||||||
local default = {}
|
|
||||||
|
|
||||||
for k, v in pairs(i3.default_data) do
|
for k, v in pairs(i3.default_data) do
|
||||||
default[k] = data[k]
|
local val = data[k]
|
||||||
|
if val == nil then
|
||||||
if data[k] == nil then
|
val = v
|
||||||
default[k] = v
|
|
||||||
end
|
end
|
||||||
|
|
||||||
data[k] = default[k]
|
data[k] = val
|
||||||
end
|
end
|
||||||
|
|
||||||
data.player_name = name
|
data.player_name = name
|
||||||
|
|
Ŝarĝante…
Reference in New Issue