Skip to content

Commit

Permalink
Switch Shield asset names, add Regen Shield
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkView committed Nov 22, 2024
1 parent eec60c0 commit 7fd7637
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 9 deletions.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
Binary file added public/assets/shields/Regen.webp
Binary file not shown.
3 changes: 3 additions & 0 deletions public/assets/shields/RegenGreen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/shields/RegenRed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/combat/playercard/playercard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="info-container">
<div class="shields-currency">
<img class="shield-icon" src="{{assets}}/shields/Shield{{player.initialShield}}{{capitalizeColor(color)}}.svg" />
<img class="shield-icon" src="{{assets}}/shields/{{player.armorName}}{{capitalizeColor(color)}}.svg" />
<div class="currency-container" [class]="side">
<img class="valorant-credits" src="{{assets}}/misc/ValorantCredits{{capitalizeColor(color)}}.svg" />
<div class="currency-title" [class]="color">{{player.money}}</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/scoreboard/playerscore/playerscore.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
<div class="resources-container">
<div class="shield-icon-container">
<img class="shield-icon" [class]="side" src="{{assets}}/shields/Shield{{player.initialShield}}.webp" />
<img class="shield-icon" [class]="side" src="{{assets}}/shields/{{player.armorName}}.webp" />
</div>
<div class="KDA-tracker-wrapper">
<p class="KDA-tracker" [class]="side">
Expand Down
14 changes: 7 additions & 7 deletions src/app/testing/player-controller/player-controller.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class PlayerControllerComponent {
isAttacking = false;
weaponOrder = ["Vandal", "Operator", "Classic", "Spectre"];
moneyOrder = [2900, 4700, 0, 1600];
shieldOrder = [50, 25, 0];
armorOrder = ["Heavy", "Regen", "Light", "None"];

static agentIndex = [0, 0];
static agentOrder = [["Vampire", "Killjoy", "Guide", "Stealth", "Rift"], ["Grenadier", "Deadeye", "Sprinter", "BountyHunter", "Mage"]];
Expand All @@ -48,7 +48,7 @@ export class PlayerControllerComponent {
isAlive: true,
agentInternal: "Wushu",
isObserved: false,
initialShield: this.shieldOrder[0],
armorName: this.armorOrder[0],
money: 2100,
moneySpent: 2900,
highestWeapon: this.weaponOrder[0],
Expand Down Expand Up @@ -81,12 +81,12 @@ export class PlayerControllerComponent {
kill(): void {
this.playerObject.isAlive = false;
this.stopSpectate();
this.playerObject.initialShield = this.shieldOrder[2];
this.playerObject.armorName = this.armorOrder[3];
}

revive(): void {
this.playerObject.isAlive = true;
this.playerObject.initialShield = this.shieldOrder[0];
this.playerObject.armorName = this.armorOrder[0];
}

giveUltPoint(): void {
Expand Down Expand Up @@ -144,10 +144,10 @@ export class PlayerControllerComponent {
}

changeShield(): void {
var i = this.shieldOrder.findIndex(e => e == this.playerObject.initialShield);
var i = this.armorOrder.findIndex(e => e == this.playerObject.armorName);
i++;
i %= this.shieldOrder.length;
this.playerObject.initialShield = this.shieldOrder[i];
i %= this.armorOrder.length;
this.playerObject.armorName = this.armorOrder[i];
}

changeStats(): void {
Expand Down

0 comments on commit 7fd7637

Please sign in to comment.