EDCD / EDDI

Companion application for Elite Dangerous
Other
453 stars 82 forks source link

Some Carrier events not triggering #2427

Closed Darkcyde13 closed 2 years ago

Darkcyde13 commented 2 years ago

What's Wrong (please be as specific as possible)

Expected

The carrier event scripts to run when I change something in the carrier management screen.

Observed

Some events do not trigger and the scripts do not run.

Steps to reproduce

  1. Go to your carrier and change docking permissions, or deposit some credits.
  2. Observe the event does not trigger.

Configuration

My Investigation

Investigation Notes

I've been trying to get the 'carrier.name' to populate, and was wondering what events would cause it to be. I first tried changing the docking permissions, and realised that the event was not triggering to report the changes.

So I tried the following:

None of them triggered the respective events. I did add "done." to those scripts with no default before I tried, just to make sure.

I noted that the Journal events were written as soon as I made the changes in the interface, so I would have assumed the events should have triggered at that moment too.

I also checked to make sure the events were enabled this time! ;)

I've not tried everything, as I don't want to initiate a decommission or a jump at the moment (although I know I can cancel them).

EDDI Logs

N/A

Player journals

Journal Entries:

{ "timestamp":"2022-11-28T21:06:32Z", "event":"CarrierDockingPermission", "CarrierID":3705241088, "DockingAccess":"friends", "AllowNotorious":true }
{ "timestamp":"2022-11-28T21:17:03Z", "event":"CarrierDockingPermission", "CarrierID":3705241088, "DockingAccess":"all", "AllowNotorious":true }
{ "timestamp":"2022-11-28T21:17:18Z", "event":"CarrierBankTransfer", "CarrierID":3705241088, "Deposit":10, "PlayerBalance":5878047817, "CarrierBalance":1002439171 }
{ "timestamp":"2022-11-28T21:19:49Z", "event":"CarrierFinance", "CarrierID":3705241088, "CarrierBalance":1002439171, "ReserveBalance":10100000, "AvailableBalance":992339171, "ReservePercent":1, "TaxRate_rearm":7, "TaxRate_refuel":5, "TaxRate_repair":5 }
{ "timestamp":"2022-11-28T21:20:32Z", "event":"CarrierFinance", "CarrierID":3705241088, "CarrierBalance":1002439171, "ReserveBalance":10100000, "AvailableBalance":992339171, "ReservePercent":1, "TaxRate_rearm":5, "TaxRate_refuel":5, "TaxRate_repair":5 }
{ "timestamp":"2022-11-28T21:28:57Z", "event":"CarrierNameChange", "CarrierID":3705241088, "Name":"Flying Cash Cow", "Callsign":"XZX-84Z" }
{ "timestamp":"2022-11-28T21:31:40Z", "event":"CarrierNameChange", "CarrierID":3705241088, "Name":"MCRN Sustentus Ferebat", "Callsign":"XZX-84Z" }
Tkael commented 2 years ago

They are not triggering because we currently create a new carrier object from the Frontier API. We can add some code to do so from the CarrierStats event too which should correct this (I had planned to do this but apparently forgot - easy enough to add to the next release).