Techguns

Techguns

9M Downloads

Canceling LivingAttackEvent prevents other mods from responding

yeelp opened this issue ยท 3 comments

commented

TG cancels LivingAttackEvent at high priority when TG based damage is inflicted. This prevents other mods from responding to that event, which seems unideal.

Take the mod I've developed; Distinct Damage Descriptions (DDD). It responds to LivingAttackEvent at lowest priority because it wants to respond last. But it doesn't get the chance, and so these two mods don't play well together. You can see the specific part of DDD where this occurs right here.

DDD needs the context of what TG is doing to the damage in order to respond properly. This is where I wonder why TG is canceling LivingAttackEvent. I'm not super familiar with the mod or the repo so I don't know why TG needs to cancel the event. I'd like to know why TG needs to cancel the event and if there is anything that can be done to get these mods working together.

commented

I understand cancelling is intended, but why does TG need to cancel? Are there other alternatives? It seems like doing so really shuts out mod compatibility completely

commented

The cancellation is intended and needed to bypass the default processing.

commented

Because it needs to bypass the default damage function with it's own one