Skip to content

Commit

Permalink
Fix hull health check
Browse files Browse the repository at this point in the history
  • Loading branch information
nicou committed Jun 28, 2024
1 parent 00bb064 commit 3f0d7ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/integrations/emptyepsilon/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class EmptyEpsilonClient {

public setHullHealthPercent(hullHealthPercent: number) {
const hullMaxHealth = get(this.previousState, 'general.shipHullMax');
if (!hullMaxHealth) throw new Error('No hull max health available');
if (hullMaxHealth === undefined) throw new Error('No hull max health available');
const healthPointValue = Math.floor(hullHealthPercent * hullMaxHealth);
const url = `${this.setUrl}?setHull("${healthPointValue}")`;
return axios.get(url).then(res => {
Expand Down

0 comments on commit 3f0d7ee

Please sign in to comment.