Jump to content

[MOD] Add sector coordinates and cause of death to insurance emails


Blaises

Recommended Posts

Sometimes you don't remember where you died or were AFK at the time.  This adds the sector and cause of death to the insurance email. 

 

Edit the Avorion/data/scripts/entity/insurance.lua file and change the section near line 359 from: 

    local mail = Mail()
    mail.header = mailHeader
    mail.text = mailText
    mail.sender = mailSender
    mail.money = refundedValue

to:

    local lx, ly = Sector():getCoordinates()
    local deathInfo = "Sector:  (${sx},${sy})\nCause:  ${cause}\n\n\n" % {sx = lx, sy = ly, cause = Faction(damagers[1]).name or "collision"}
    local mail = Mail()
    mail.header = mailHeader
    mail.text = deathInfo .. mailText
    mail.sender = mailSender
    mail.money = refundedValue

 

 

Only the first contributor to your death will be shown, so if you were being attacked by two different factions the email will only display one. 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...