14.22 Revive() a ghost with 0 health gives repair pack alert

This subforum contains all the issues which we already resolved.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

14.22 Revive() a ghost with 0 health gives repair pack alert

Post by Nexela »

Change the max_health value for the constant-combinator in prototype files to 0

Equip personal roboport or stand in construction zone and Create a ghost of the entity
/c local player, pos = game.player, game.player.position player.surface.create_entity{name="entity-ghost", position = pos, force = player.force, inner_name="constant-combinator"}
select and revive the ghost with /c game.player.selected.revive()

Notice repair pack alert.

Workaround:
Setting the health to 1 after reviving causes the alert to go away. /c game.player.selected.health = 1
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: 14.22 Revive() a ghost with 0 health gives repair pack alert

Post by DaveMcW »

Should max_health=0 even be allowed for an "entity with health"?
Rseding91
Factorio Staff
Factorio Staff
Posts: 16000
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: 14.22 Revive() a ghost with 0 health gives repair pack alert

Post by Rseding91 »

DaveMcW wrote:Should max_health=0 even be allowed for an "entity with health"?
No. It would cause division by zero in several places we manipulate health. I'll fix it for 0.15.
If you want to get ahold of me I'm almost always on Discord.
BenSeidel
Filter Inserter
Filter Inserter
Posts: 591
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: 14.22 Revive() a ghost with 0 health gives repair pack alert

Post by BenSeidel »

How do you kill that with no life?
Post Reply

Return to “Resolved Problems and Bugs”