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

Roller Mechanism incorrectly displays a second roller representing its containment position #45

Open
TanyaPegasus opened this issue May 12, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@TanyaPegasus
Copy link
Member

Roller mechanism should not display as a double image as shown below.

https://twotech.twohoursonelife.com/2263-Roller-Mechanism
image

Note: this issue is not present on Onetech:
https://onetech.info/2263-Roller-Mechanism
image

@TanyaPegasus TanyaPegasus added the bug Something isn't working label May 12, 2024
@connorhsm connorhsm self-assigned this May 14, 2024
@TanyaPegasus
Copy link
Member Author

TanyaPegasus commented Aug 8, 2024

This issue also applies to clothing items on hangers eg:
https://twotech.twohoursonelife.com/12364-Christmas-Dress-on-Hanger
image

The game uses animation information to determine whether some sprites (such as the top part of the roller mechanism) should be able to be seen in game, with "fade max" set to 0. Animations can't be seen when an item is contained, so I think that's why the sprites become visible again once contained.

Clothing sprites can be marked as invisWorn to prevent them showing on the character sprite while they are wearing the clothing item. The reason clothing items with multiple sprites do not exhibit the same issue as the roller or clothing on hangers, is that the processor does a check on whether the item is clothing, and if so, filters sprites accordingly, taking invisWorn into account.

// Remove clothing sprites that aren't worn
if (object.isClothing()) {
sprites = sprites.filter(sprite => sprite.invisWorn != 1)
}
return sprites;
}

Possible fix:
The game has another tag similar to invisWorn, called invisCont, which indicates the game should not display the sprite when the object is contained. Twotech could filter out sprites marked as invisCont, and display the contained version of the objects, however if done indiscriminately, this could negatively effect other objects. Objects would first need to be filtered.

@connorhsm
Copy link
Member

The game already handles this scenario, and twotech should be assumed to be an unrelated program. Twotech should implement the same mechanism that the game does to hide the sprites.

@TanyaPegasus
Copy link
Member Author

The game isn't exactly hiding the sprites. It's using a work around (in a possibly unintended way).

Essentially the object is animated, but all that animation does is continually completely fade out the sprite. Animations are stored separately, and as far as I can see, not part of the data twotech processes. A much larger change would need to be implemented to give it access to that data, as well as a way to process that into showing the first frame for example.

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