Page 1 of 1

Prototype flag for damage immunity

Posted: Tue Jan 20, 2026 1:20 am
by protocol_1903
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.

Re: Prototype flag for damage immunity

Posted: Tue Jan 20, 2026 11:15 am
by curiosity
trigger_target_mask?

Re: Prototype flag for damage immunity

Posted: Tue Jan 20, 2026 7:38 pm
by protocol_1903
curiosity wrote: Tue Jan 20, 2026 11:15 am trigger_target_mask?
No, they can still take proxy damage (fire, explosions)