I found ProductionHealthEffect (https://lua-api.factorio.com/latest/typ ... ffect.html) today.
It seems to only be used in captive biter spawners, so I can kind of make out how this works... But could you add a docstring to know without ctrl-F the whole data.raw? It's also not clear how the input value correlates to this comment: not_producing = -1 / 60, -- 5 hp per second in space-age/prototypes/entities.lua line 1463. I would intuitively expect this to be HP/tick, being worth -1 HP/sec, which matches the wiki saying "Starving spawners will stop producing biter eggs and lose health at a rate of 1 per second" (https://wiki.factorio.com/Captive_biter_spawner). So either the comment is wrong, or the wiki is wrong and some explanation is needed.
Proposal:
ProductionHealthEffect.producing > "Amount of HP the crafting machine gains per tick while producing. Can be negative."
ProductionHealthEffect.not_producing > "Amount of HP the crafting machine gains per tick while idle. Can be negative."
CraftingMachinePrototype.production_health_effect > "When defined, the crafting machine will constantly gain/lose HP constantly depending on whether or not it is actively producing something."
Thanks.
ProductionHealthEffect needs a short explanation
-
Loup&Snoop
- Long Handed Inserter

- Posts: 65
- Joined: Wed Dec 04, 2024 4:33 am
- Contact:
Re: ProductionHealthEffect needs a short explanation
Need a better explanation than that. What counts as "producing"/"not producing"? From what I've seen people say, there are unobvious exceptions and it's not an exhaustive set.
