Changeset - dd8780bb11c5
[Not reviewed]
default
0 1 0
Jason Maltzen - 3 years ago 2021-09-08 13:03:28
jason@hiddenachievement.com
Correct an error when computing the clipped value on white shifts. It was incorrectly detecting a white shift on single-color clips, resulting in a bad reaction computation. Also don't display the wrong 'observed' color after clearing a reaction.
1 file changed with 9 insertions and 8 deletions:
0 comments (0 inline, 0 general)
Models/ReactionTest.cs
Show inline comments
...
 
@@ -214,3 +214,3 @@ namespace DesertPaintCodex.Models
 
                        bool extrapolated = false;
 
                        
 

 
                        // SPECIAL CASE:
...
 
@@ -221,5 +221,5 @@ namespace DesertPaintCodex.Models
 
                            PaintColor baseColor = _recipe.BaseColor;
 
                            if ((reaction.Red < baseColor.Red) &&
 
                                (reaction.Green < baseColor.Green) &&
 
                                (reaction.Blue < baseColor.Blue))
 
                            if ((reaction.Red < 0) &&
 
                                (reaction.Green < 0) &&
 
                                (reaction.Blue < 0))
 
                            {
...
 
@@ -230,5 +230,5 @@ namespace DesertPaintCodex.Models
 
                            }
 
                            else if ((reaction.Red > baseColor.Red) &&
 
                                (reaction.Green > baseColor.Green) &&
 
                                (reaction.Blue > baseColor.Blue))
 
                            else if ((reaction.Red > 0) &&
 
                                (reaction.Green > 0) &&
 
                                (reaction.Blue > 0))
 
                            {
...
 
@@ -302,3 +302,4 @@ namespace DesertPaintCodex.Models
 
            State = TestState.Untested;
 
            
 
            ObservedColor = null; // Clear it out
 

	
 
            UpdateRecipe();
0 comments (0 inline, 0 general)