You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-11-25 22:32:18 +02:00
RPG - check if player data exists
This commit is contained in:
@@ -1190,7 +1190,9 @@ function Public.rpg_reset_player(player, one_time_reset)
|
||||
)
|
||||
end
|
||||
|
||||
if rpg_extra.grant_xp_level and not rpg_t.granted_xp_level then
|
||||
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]
|
||||
Public.gain_xp(player, to_grant, true)
|
||||
|
||||
Reference in New Issue
Block a user