A flag or boolean on EntityWithHealthPrototype and its children that specifies that it is not possible of taking damage. Or, just flips LuaEntity.destructible automatically when it's created. On that note, is it possible to add a flag for each of the options on extended entity settings on the prototype to be flipped automatically?
The goal for this is creating entities that are dependents of EntityWithHealth like assemblers or chests, so they are possible of taking damage by nature, require a collision box and collision mask for entity placement/other interactions, but should otherwise not be able to take damage. This is currently possible by looping over all existing damage types and adding full resistance to them, but this annoying to do and very prone to issues when damage prototypes are later removed or added.
Prototype flag for damage immunity
- protocol_1903
- Filter Inserter

- Posts: 444
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Prototype flag for damage immunity
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
https://mods.factorio.com/user/protocol_1903
Re: Prototype flag for damage immunity
trigger_target_mask?
- protocol_1903
- Filter Inserter

- Posts: 444
- Joined: Fri Sep 09, 2022 4:33 pm
- Contact:
Re: Prototype flag for damage immunity
No, they can still take proxy damage (fire, explosions)
Py and PyBlock developer, wielder of LUA in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
https://mods.factorio.com/user/protocol_1903