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

Push fix for jail handler and bug fixes for Mtn

This commit is contained in:
Gerkiz
2024-11-19 13:54:09 +01:00
parent d2fdba2988
commit 80a99e4f17
6 changed files with 49 additions and 5 deletions

View File

@@ -566,7 +566,8 @@ function Public.update_health(player)
if rpg_extra.enable_health_and_mana_bars then
if rpg_t.show_bars then
local max_life = math.floor(player.character.max_health + player.character_health_bonus + player.force.character_health_bonus)
local proto_char = prototypes.entity.character.get_max_health('normal')
local max_life = math.floor(proto_char + player.character_health_bonus + player.force.character_health_bonus)
if not rpg_t.health_bar or not rpg_t.health_bar.valid then
rpg_t.health_bar = create_healthbar(player, 0.5)
end