Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non Dynamic Hello Messages #601

Open
cmpgmeye opened this issue Aug 14, 2024 · 1 comment
Open

Non Dynamic Hello Messages #601

cmpgmeye opened this issue Aug 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@cmpgmeye
Copy link

I was just looking at the horse code and saw the unique Hello messages in get Hello() which changes their message based on the name, I tested a few and none of them seem to work, unless I am mistaken the hello message is when you hover on them? Currently they only say "Neigh!". Sorry if I'm wrong but can't see where else the hello/response message would be shown?

@cmpgmeye cmpgmeye added the bug Something isn't working label Aug 14, 2024
@GlassToeStudio
Copy link

Hello message is called during roll-call. In which you will get different responses depending on random distribution and/or and horse name (for the horse).

The swipe method is called when you hover over your pet/hover over the panel.

The swipe method calls showSpeechBubble which is what displays the text when you hover. the Swipe method is part of IPetType interface and its generic implementation is in basepetstypes. Each pet can override this implementation with their own, which the horse class does. It passes 'Neigh' into the showSpeechBubble method.

Base:

    swipe() {
        if (this.currentStateEnum === States.swipe) {
            return;
        }
        this.holdState = this.currentState;
        this.holdStateEnum = this.currentStateEnum;
        this.currentStateEnum = States.swipe;
        this.currentState = resolveState(this.currentStateEnum, this);
        this.showSpeechBubble('👋');
    }

Horse

    swipe() {
        if (this.currentStateEnum === States.swipe) {
            return;
        }
        this.holdState = this.currentState;
        this.holdStateEnum = this.currentStateEnum;
        this.currentStateEnum = States.swipe;
        this.currentState = resolveState(this.currentStateEnum, this);
        this.showSpeechBubble('Neigh!');
    }

It would be easy enough to make the edits for randomness in the swipe/showSpeechBubble implementation in Horse, or any other pet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants