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

Flower pots unexpectedly showing as an infinite tool #52

Open
connorhsm opened this issue Aug 3, 2024 · 3 comments
Open

Flower pots unexpectedly showing as an infinite tool #52

connorhsm opened this issue Aug 3, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@connorhsm
Copy link
Member

image
Suspected due to these transitions
image

Possibly happening elsewhere for past items.

isTool() {
for (var transition of this.transitionsAway) {
if (transition.actor == this && transition.target && transition.tool) return true;
}
return false;
}

@connorhsm connorhsm added the bug Something isn't working label Aug 3, 2024
@connorhsm
Copy link
Member Author

connorhsm commented Aug 3, 2024

Yes, likely a long-standing issue

image
image

image
image

@connorhsm connorhsm added the help wanted Extra attention is needed label Aug 3, 2024
@connorhsm
Copy link
Member Author

connorhsm commented Aug 4, 2024

Related

this.tool = this.actorID >= 0 && this.actorID == this.newActorID;

@TanyaPegasus
Copy link
Member

Whether an item is a tool is defined by the processor, rather than the game, so there isn't a simple check we can do to filter these items.
The simplest way to resolve this would be to remove the category, however I think there is a use case for this. It may be utilised more often if it was working as intended, especially for new players.

The processor is checking that the actor ID is >= 0, and then that the actor ID is the same as the new actor ID. If we added an additional check for whether the object has a percentage use chance. This would catch all tools like shovels etc, but not flowerpots.
Similar code can be seen here, being used to calculate uses:

value(object) {
if (object.data.numUses > 1) {
if (object.data.useChance && object.data.useChance != 1)

Objects this would affect that we may not want it to effect:
Rolling pin
Watering can
Bucket
Stomper
Bone needle
Needle and ball of thread
Knitting needles
Fire bow drill
Flint tipped bow drill
Firebrand
Short shaft
Straight shaft
Sharp stone
stone
Blueprinrt
Pencil

Some items that are already being filtered out by the current code, which should possibly be included:
Stakes
Fishing pole
Wooden tongs
Spinning wheel

While not ideal, one solution would be to implement the check I suggested above, as well as a whitelist of objects that we have selected, that should be included.

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

No branches or pull requests

2 participants