Changeset - d036e3a47323
[Not reviewed]
Merge default
0 5 0
Tess Snider (Malkyne) - 3 years ago 2021-07-24 10:27:30
this@malkyne.org
Merge
5 files changed with 51 insertions and 13 deletions:
0 comments (0 inline, 0 general)
.hgtags
Show inline comments
...
 
@@ -4,1 +4,2 @@ d7b40cfbe0f3d20f25a52944cf8c0f1ecdc81471
 
6919080271d55f3f138660bb37dccd116249d13e R_T10_1.3
 
e7cc8ddcbf589086578134ec292ad8b7c739237c R_T10_1.4
DesertPaintCodex.csproj
Show inline comments
...
 
@@ -8,2 +8,3 @@
 
    <Platforms>AnyCPU;x64</Platforms>
 
    <Version>1.4.0</Version>
 
  </PropertyGroup>
Models/PlayerProfile.cs
Show inline comments
...
 
@@ -131,3 +131,3 @@ namespace DesertPaintCodex.Models
 
            using StreamWriter writer = new(dpFile, false);
 
            string?            line;
 
            string? line;
 
            while ((line = reader.ReadLine()) != null)
...
 
@@ -138,4 +138,4 @@ namespace DesertPaintCodex.Models
 
                {
 
                    string reagent1  = tokens[0].Trim();
 
                    string reagent2  = tokens[1].Trim();
 
                    string reagent1Name  = tokens[0].Trim();
 
                    string reagent2Name  = tokens[1].Trim();
 
                    string colorCode = tokens[2].Trim();
...
 
@@ -143,2 +143,11 @@ namespace DesertPaintCodex.Models
 
                    string change2   = tokens[4].Trim();
 

	
 
                    Reagent reagent1 = ReagentService.GetReagent(reagent1Name);
 
                    Reagent reagent2 = ReagentService.GetReagent(reagent2Name);
 

	
 
                    if (reagent1 == null || reagent2 == null) continue;
 

	
 
                    bool hasChange1 = int.TryParse(change1, out _);
 
                    bool hasChange2 = int.TryParse(change2, out _);
 

	
 
                    // Write reaction.
...
 
@@ -147,16 +156,40 @@ namespace DesertPaintCodex.Models
 
                        case "W":
 
                            WriteReaction(writer, reagent1, reagent2, change1, change1, change1);
 
                            WriteReaction(writer, reagent2, reagent1, change2, change2, change2);
 
                            if (hasChange1)
 
                            {
 
                                WriteReaction(writer, reagent1Name, reagent2Name, change1, change1, change1);
 
                            }
 
                            if (hasChange2)
 
                            {
 
                                WriteReaction(writer, reagent2Name, reagent1Name, change2, change2, change2);
 
                            }
 
                            break;
 
                        case "R":
 
                            WriteReaction(writer, reagent1, reagent2, change1, "0", "0");
 
                            WriteReaction(writer, reagent2, reagent1, change2, "0", "0");
 
                            if (hasChange1)
 
                            {
 
                                WriteReaction(writer, reagent1Name, reagent2Name, change1, "0", "0");
 
                            }
 
                            if (hasChange2)
 
                            {
 
                                WriteReaction(writer, reagent2Name, reagent1Name, change2, "0", "0");
 
                            }
 
                            break;
 
                        case "G":
 
                            WriteReaction(writer, reagent1, reagent2, "0", change1, "0");
 
                            WriteReaction(writer, reagent2, reagent1, "0", change2, "0");
 
                            if (hasChange1)
 
                            {
 
                                WriteReaction(writer, reagent1Name, reagent2Name, "0", change1, "0");
 
                            }
 
                            if (hasChange2)
 
                            {
 
                                WriteReaction(writer, reagent2Name, reagent1Name, "0", change2, "0");
 
                            }
 
                            break;
 
                        case "B":
 
                            WriteReaction(writer, reagent1, reagent2, "0", "0", change1);
 
                            WriteReaction(writer, reagent2, reagent1, "0", "0", change2);
 
                            if (hasChange1)
 
                            {
 
                                WriteReaction(writer, reagent1Name, reagent2Name, "0", "0", change1);
 
                            }
 
                            if (hasChange2)
 
                            {
 
                                WriteReaction(writer, reagent2Name, reagent1Name, "0", "0", change2);
 
                            }
 
                            break;
Properties/PublishProfiles/Win64 Self-Contained.pubxml
Show inline comments
...
 
@@ -8,3 +8,3 @@ https://go.microsoft.com/fwlink/?LinkID=
 
    <Platform>x64</Platform>
 
    <PublishDir>publish\win-x64</PublishDir>
 
    <PublishDir>publish\win-x64\DesertPaintCodex</PublishDir>
 
    <PublishProtocol>FileSystem</PublishProtocol>
ViewModels/ExperimentLogViewModel.cs
Show inline comments
...
 
@@ -137,3 +137,6 @@ namespace DesertPaintCodex.ViewModels
 

	
 
            if (((oldPos > 0) || (test.CompareTo(list[oldPos - 1]) > 0))
 
            // If the item is first in the list or the previous item is valued < the test
 
            // And either the item is last in the list or the next item in the list is valued > than the item
 
            // Don't move it
 
            if (((oldPos == 0) || (test.CompareTo(list[oldPos - 1]) > 0))
 
                && ((oldPos == list.Count - 1) || (test.CompareTo(list[oldPos + 1]) < 0))) return oldPos; // No need to move.
0 comments (0 inline, 0 general)