[2.0.12] LuaEntity.max_health to include evolution scaling factor

This subforum contains all the issues which we already resolved.
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[2.0.12] LuaEntity.max_health to include evolution scaling factor

Post by Mylon »

Problem: When evolution has increased a spawner's max health, there's no reliable way to get it's real max health. LuaEntity.max_health is equal to LuaEntity.prototype.max_health (assuming normal quality)

Observed behavior:

Code: Select all

/c game.player.surface.pollute({0,0}, 1000000000) --This sets evolution to 1
/c game.print(game.player.selected.max_health)
> 350
Expected behavior:
3500

Solution: Update LuaEntity.max_health to include the evolution scaling factor, if appropriate.

Alternate solution: Expose LuaForce Evolution Health Scaling.
Oarc
Fast Inserter
Fast Inserter
Posts: 122
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Re: [2.0.12] LuaEntity.max_health to include evolution scaling factor

Post by Oarc »

+1 for the alternate solution as well.

I need a way to adjust the the health scaling too (to make spawners without the scaling, or with different scaling).
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3272
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.12] LuaEntity.max_health to include evolution scaling factor

Post by boskid »

I am considering this to be a bug report, which is now fixed for 2.0.15.
Post Reply

Return to “Resolved Problems and Bugs”