Da-Teach/Questor

[DirectEve bug] Wrong ArmorPercentage value while in station

Closed this issue · 1 comments

Today I've decided to make a quick xak and let Questor repair damaged armor of a shield-tanking ship by fitting a repair module and using it in space. And failed miserably: it goes into dead loop because there is no way to get the correct value of armor percentage while docked. It just returns the last value it has in station before.

How to reproduce:

  1. Get your armor damaged to, say, 90%, log off and back on, enter station. DirectEve.ActiveShip.ArmorPercentage shows the correct value: 90 with fractions. Fit some repairer, leave, let defense module repair full, enter back: it would still show 90%.
  2. Log in while in station with 100% armor, leave and get armor damaged. After you enter station again, DirectEve.ActiveShip.ArmorPercentage would still show 100%, even though its time to repair.

Sidenote: not that I've tested it, but something tells me that hull percentage property might suffer from the same bug.

ISXEVE had the same issue. The ship object is invalid in stations. You shouldn't trust anything from DirectEve.ActiveShip while docked.