Skip to content

Commit

Permalink
alt image path
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Jul 14, 2024
1 parent 4db6df5 commit 7ee8e0d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/core/src/objects/beasts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ export class BeastManager {
[BeastType.Brute]: ArmorType.Metal,
};

constructor() {}
// pass in alternateImagePath to use a different image path
private alternateImagePath: string = "";

constructor(alternateImagePath?: string) {
this.alternateImagePath = alternateImagePath || "";
}

getBeastName(beast: Beasts): string {
return Beasts[beast];
Expand Down Expand Up @@ -49,6 +54,9 @@ export class BeastManager {
}

getBeastImage(beast: Beasts): string {
if (this.alternateImagePath) {
return this.alternateImagePath + BEAST_IMAGES[beast];
}
return S3_BUCKET + BEAST_IMAGES[beast];
}

Expand Down

0 comments on commit 7ee8e0d

Please sign in to comment.