1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-24 03:47:58 +02:00

eating below max health fix

This commit is contained in:
MewMew 2019-10-22 08:37:06 +02:00
parent 39709712e6
commit 8de20e2bd5

View File

@ -139,7 +139,7 @@ end
local function on_player_used_capsule(event) local function on_player_used_capsule(event)
if event.item.name == "raw-fish" then if event.item.name == "raw-fish" then
local player = game.players[event.player_index] local player = game.players[event.player_index]
if player.character.health < 250 then return end if player.character.health < player.character.prototype.max_health + player.character_health_bonus + player.force.character_health_bonus then return end
hunger_update(player, player_hunger_fish_food_value) hunger_update(player, player_hunger_fish_food_value)
player.play_sound{path="utility/armor_insert", volume_modifier=0.9} player.play_sound{path="utility/armor_insert", volume_modifier=0.9}
end end