1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-11-25 22:32:18 +02:00

RPG - fix dupe of levels

This commit is contained in:
Gerkiz
2023-11-05 21:12:38 +01:00
parent 89fa093c9e
commit 6cb966c879
2 changed files with 23 additions and 23 deletions

View File

@@ -1232,7 +1232,8 @@ function Public.rpg_reset_player(player, one_time_reset)
rpg_t.xp = round(old_xp)
rpg_t.level = old_level
else
Public.set_new_player_tbl(
rpg_t =
Public.set_new_player_tbl(
player.index,
{
level = 1,
@@ -1275,8 +1276,6 @@ function Public.rpg_reset_player(player, one_time_reset)
}
)
rpg_t = Public.get_value_from_player(player.index)
if rpg_t and rpg_extra.grant_xp_level and not rpg_t.granted_xp_level then
rpg_t.granted_xp_level = true
local to_grant = Public.experience_levels[rpg_t.level + rpg_extra.grant_xp_level]