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

RPG - fix level issue

This commit is contained in:
Gerkiz
2022-08-14 21:56:11 +02:00
parent e3875bee28
commit 02f0cda608
6 changed files with 135 additions and 50 deletions

View File

@@ -1057,12 +1057,16 @@ function Public.rpg_reset_player(player, one_time_reset)
mana_max = 0,
last_spawned = 0,
dropdown_select_index = 1,
dropdown_select_index1 = 1,
dropdown_select_index2 = 1,
dropdown_select_index3 = 1,
dropdown_select_name = Public.all_spells[1].name[1],
dropdown_select_index_1 = 1,
dropdown_select_name_1 = Public.all_spells[1].name[1],
dropdown_select_index_2 = 1,
dropdown_select_name_2 = Public.all_spells[1].name[1],
dropdown_select_index_3 = 1,
dropdown_select_name_3 = Public.all_spells[1].name[1],
allocate_index = 1,
explosive_bullets = false,
enable_entity_spawn = false,
enable_entity_spawn = true,
health_bar = rpg_t.health_bar,
mana_bar = rpg_t.mana_bar,
points_left = 0,
@@ -1087,25 +1091,30 @@ function Public.rpg_reset_player(player, one_time_reset)
rpg_t.xp = round(old_xp)
rpg_t.level = old_level
else
player.insert({name = 'raw-fish', count = 500})
Public.set_new_player_tbl(
player.index,
{
level = 1,
level = 30,
xp = 0,
strength = 10,
magicka = 10,
magicka = 900,
dexterity = 10,
vitality = 10,
mana = 0,
mana_max = 0,
mana = 5000,
mana_max = 5000,
last_spawned = 0,
dropdown_select_index = 1,
dropdown_select_index1 = 1,
dropdown_select_index2 = 1,
dropdown_select_index3 = 1,
dropdown_select_name = Public.all_spells[1].name[1],
dropdown_select_index_1 = 1,
dropdown_select_name_1 = Public.all_spells[1].name[1],
dropdown_select_index_2 = 1,
dropdown_select_name_2 = Public.all_spells[1].name[1],
dropdown_select_index_3 = 1,
dropdown_select_name_3 = Public.all_spells[1].name[1],
allocate_index = 1,
explosive_bullets = false,
enable_entity_spawn = false,
enable_entity_spawn = true,
points_left = 0,
last_floaty_text = visuals_delay,
xp_since_last_floaty_text = 0,