TL;DR
Edits to :Code: Select all
on_entity_damaged, on_entity_died, on_player_died, on_pre_player_died.
What ?
For these events, it would be good to be able to access the weapon and ammo that was used to damage / kill the entity / player, like howCode: Select all
on_entity_damaged.cause
This is the current event structure for this specific event, what I am suggesting is:
Example return of a spidertron nukes a car:
Code: Select all
event = {
entity = car,
damage_type = "explosion",
all of the yada yada damage values
cause = spidertron,
force = enemy,
weapon = Spidertron-rocket-launcher-1,
ammo = atomic-bomb
}
Why ?
This would allow mod creators like myself to tailor specific effects to happen depending on what an entity is attacked with.This would also mean PvP mod creators could create death messages like:
<Player> killed <Player> with <Weapon> loaded with <Ammo>