Skip to content

Correct inUse for incubators #237

@jabbink

Description

@jabbink

Description:
The property inUse is not set correctly in the API, it returns false at all times right now.

Expected behavior:
Return true when an incubator is occupied.

Actual behavior:
Always not in use

Proposed fix:
Remove the inUse field and add this function

    public boolean isInUse() {
        return getKmTarget() > pgo.getPlayerProfile().getStats().getKmWalked();
    }

Maybe add some error handling to make sure the playerProfile and stats are actually set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions