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:
parent
39709712e6
commit
8de20e2bd5
@ -139,7 +139,7 @@ end
|
||||
local function on_player_used_capsule(event)
|
||||
if event.item.name == "raw-fish" then
|
||||
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)
|
||||
player.play_sound{path="utility/armor_insert", volume_modifier=0.9}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user