Called when a segmented unit is damaged. This is not called when a segmented unit's health is set directly by another mod.
segmented_unit: LuaSegmentedUnitdamage_type: LuaDamagePrototypeoriginal_damage_amount: float — The damage amount before resistances.final_damage_amount: float — The damage amount after resistances.final_health: float — The health of the unit after the damage was applied.cause?: LuaEntity — The entity that originally triggered the events that led to this damage, if available (e.g. the character, turret, etc. that pulled the trigger).source?: LuaEntity — The entity that is directly dealing the damage, if available (e.g. the projectile, flame, sticker, grenade, laser beam, etc.).force?: LuaForce — The force that did the attacking.name: defines.events — Identifier of the eventtick: uint32 — Tick the event was generated.