Open TanyaPegasus opened 6 months ago
This issue also applies to clothing items on hangers eg: https://twotech.twohoursonelife.com/12364-Christmas-Dress-on-Hanger
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. https://github.com/twohoursonelife/twotech/blob/73d2caff53870e62a3c57ad6681c3d390a215f3b/process/src/SpriteProcessor.js#L38-L44
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.
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.
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.
Roller mechanism should not display as a double image as shown below.
https://twotech.twohoursonelife.com/2263-Roller-Mechanism
Note: this issue is not present on Onetech: https://onetech.info/2263-Roller-Mechanism