Minor cleaning

This commit is contained in:
Jean-Patrick Guerrero 2022-09-25 18:56:01 +02:00
parent a1af79a870
commit 8fc01b7ece

View File

@ -203,16 +203,14 @@ local function init_data(player, info)
local name = player:get_player_name()
i3.data[name] = i3.data[name] or {}
local data = i3.data[name]
local default = {}
for k, v in pairs(i3.default_data) do
default[k] = data[k]
if data[k] == nil then
default[k] = v
local val = data[k]
if val == nil then
val = v
end
data[k] = default[k]
data[k] = val
end
data.player_name = name