Skip to content

Commit

Permalink
Merge pull request #214 from twohoursonelife/fix-shaded-objects
Browse files Browse the repository at this point in the history
Fix falsey value bug causing certain tinted objects to display colour…
  • Loading branch information
ryanb authored Jun 25, 2024
2 parents 8ad4fda + bbef439 commit 2c1129e
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://onetech.info/3338-Glass-Bottle): it should not be flat and white
* [Smoldering Tinder](https://onetech.info/78-Smoldering-Tinder): orange centre, no white
* [Burnt Launch Pad](https://onetech.info/4997-Burnt-Launch-Pad): burns should be black, not appearing as the original shrimp
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 2c1129e

Please sign in to comment.