Skip to content

Commit

Permalink
Fix falsey value bug causing certain tinted objects to display colour…
Browse files Browse the repository at this point in the history
…less. Fixes #42.
  • Loading branch information
connorhsm committed May 11, 2024
1 parent 57ada94 commit 3a41614
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ This is a list of items and transitions to check to ensure everything is correct
* [Hand Cart](https://onetech.info/484-Hand-Cart/recipe): 1 log, wooden disks
* [Running Crude Car](https://onetech.info/2396-Running-Crude-Car/recipe): 5 yew branches
* [Cistern](https://onetech.info/672-Cistern/recipe): 10 stones


### Tinted sprites

* [Glass Bottle](https://twotech.twohoursonelife.com/3338-Glass-Bottle): it should not be white
* [Floor Blueprint](https://twotech.twohoursonelife.com/14064-Floor-Blueprint): should appear blue
* [Green Linen Top](https://twotech.twohoursonelife.com/14730-Green-Linen-Top): should appear green
2 changes: 1 addition & 1 deletion process/src/SpriteProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class SpriteProcessor {
drawSpriteDirectly(sprite, context) {
this.drawSpriteImage(sprite, context);

if (sprite.color.find(c => c < 1.0)) {
if (sprite.color.find(c => c < 1.0) !== undefined) {
this.overlayColor(sprite, context)
}
}
Expand Down

0 comments on commit 3a41614

Please sign in to comment.