Skip to content

Commit

Permalink
Merge pull request #298 from tonybaloney/fix_ball_rethrow
Browse files Browse the repository at this point in the history
Fixes rethrow bug where pets won't chase the second ball and original chase isn't cancelled.
  • Loading branch information
tonybaloney authored Nov 1, 2022
2 parents 0022d7d + 09c65ef commit 8ef37d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions media/main-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ class BasePetType {
return !(0, states_1.isStateAboveGround)(this.currentStateEnum);
}
get canChase() {
return (!(0, states_1.isStateAboveGround)(this.currentStateEnum) &&
this.currentStateEnum !== "chase" /* States.chase */ &&
this.isMoving);
return !(0, states_1.isStateAboveGround)(this.currentStateEnum) && this.isMoving;
}
showSpeechBubble(message, duration = 3000) {
this.speech.innerHTML = message;
Expand Down
6 changes: 1 addition & 5 deletions src/panel/basepettype.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,7 @@ export abstract class BasePetType implements IPetType {
}

get canChase() {
return (
!isStateAboveGround(this.currentStateEnum) &&
this.currentStateEnum !== States.chase &&
this.isMoving
);
return !isStateAboveGround(this.currentStateEnum) && this.isMoving;
}

showSpeechBubble(message: string, duration: number = 3000) {
Expand Down

0 comments on commit 8ef37d2

Please sign in to comment.