Ashtray sprite seems to be glitchy in terms of how it is coded #2617
Labels
Priority: 3-Medium
Needs to be resolved at some point
Upstream Issue
Would probably be solved with an Upstream PR, doesn't mean you can't fix it here.
Description
The ashtray item can be used to store cigarettes. However, it's implementation does not seem to be correct in terms of how it changes between sprites. First and foremost, the first burnt cigarette is not shown when inserted, and consecutive cigarettes are shown with one subtracted (probably an off by one error somewhere in the code).
Furthermore, when the ashtray is emptied of all cigarettes it will show that one cigarette is still in it, despite the fact that it is empty.
Reproduction
Fill an ashtray with a number of cigarettes less than five and the sprite will show one less
In order to get the second glitch one simply needs to add a single cigarette into the ashtray and empty it, at which point the ashtray will show a single cigarette.
Screenshots
Empty ashtray that had cigarettes inside it
Ashtray with one cigarette inside
Ashtray with three cigarettes inside
Further evidence that there were three cigarettes inside the ashtray(As well as the empty ashtray bug)
The text was updated successfully, but these errors were encountered: