diff options
Diffstat (limited to 'derelict.js')
-rw-r--r-- | derelict.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/derelict.js b/derelict.js index 2471104..abe960c 100644 --- a/derelict.js +++ b/derelict.js @@ -54,7 +54,10 @@ class Wreck { this.killmail = killmail this.domElement.className = 'wreck' - this.domElement.dataset.label = `${this.killmail.killmail_id}` + const shipTypeId = this.killmail.victim.ship_type_id + fetch(`https://esi.evetech.net/latest/universe/types/${shipTypeId}/?datasource=tranquility`) // TODO: Cache it. + .then(response => response.json()) + .then(typeId => this.domElement.dataset.label = typeId.name) this.domElement.appendChild(iconElement) this.point.position.copy(position) this.point.add(object2d) |