Permalink
Browse files

- fixed arrangement represent (default, bonus, alternate) bug

  • Loading branch information...
cozy1 committed Jan 30, 2019
1 parent 27dec27 commit dfeda5a604de0d3fe7bacaf4699f78ebe8d0b74b
@@ -202,6 +202,8 @@ private set
rbArrangementBonus.Checked = value.BonusArr;
rbArrangementAlternate.Checked = !value.BonusArr && !value.Represent ? true : false;

var debugMe = "StopHere";

chkMetronome.Checked = value.Metronome == Metronome.Generate;
RouteMask = value.RouteMask;

@@ -1079,7 +1081,6 @@ private void btnOk_Click(object sender, EventArgs e)
if (!CheckBassTuning())
return;

// TODO: this should probably be a Save instead of Load
LoadArrangementData(XmlPath);
ConfigGlobals.DefaultProjectFolder = Path.GetDirectoryName(XmlPath);
DialogResult = DialogResult.OK;
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
@@ -655,19 +656,19 @@ public void UpdateSongXml(Arrangement arr, DLCPackageData info)
song2014.AverageTempo = info.SongInfo.AverageTempo;
song2014.Tuning = arr.TuningStrings;
song2014.Capo = (byte)arr.CapoFret;
// all other ArrangementProperties in the xml are set by EOF and not changed by Toolkit (currently)
// all other ArrangementProperties in the xml are set by EOF and not changed by Toolkit (currently)
song2014.ArrangementProperties = arr.ArrangementPropeties != null ? arr.ArrangementPropeties : new SongArrangementProperties2014();
song2014.ArrangementProperties.Represent = arr.Represent ? 1 : 0;
song2014.ArrangementProperties.BonusArr = arr.BonusArr ? 1 : 0;
song2014.ArrangementProperties.BonusArr = arr.BonusArr ? 1 : 0;
song2014.ArrangementProperties.PathLead = Convert.ToInt32(arr.RouteMask == RouteMask.Lead);
song2014.ArrangementProperties.PathRhythm = Convert.ToInt32(arr.RouteMask == RouteMask.Rhythm);
song2014.ArrangementProperties.PathBass = Convert.ToInt32(arr.RouteMask == RouteMask.Bass);
song2014.ArrangementProperties.RouteMask = (int)arr.RouteMask;
song2014.ArrangementProperties.StandardTuning = arr.Tuning == "E Standard" ? 1 : 0;
song2014.ArrangementProperties.BassPick = arr.ArrangementType == ArrangementType.Bass ? (int)arr.PluckedType : 0;

// Commented out - EOF properly sets the bonus/represent elements
// TODO: monitor this new code for bugs
// TODO: monitor this change
// Commented out - EOF now properly sets the bonus/represent elements
// represent is set to "1" by default, if there is a bonus then set represent to "0"
//songXml.ArrangementProperties.Represent = arr.BonusArr ? 0 : 1;
// for alternate arrangement then both represent and bonus are set to "0"
@@ -91,7 +91,7 @@ private void CheckForUpdate(object sender, DoWorkEventArgs e)
// CHECK FOR NEW AVAILABLE REVISION AND ENABLE UPDATE
try
{
onlineVersion = ToolkitVersionOnline.GetOnlineVersionInfo();
onlineVersion = ToolkitVersionOnline.GetVersionInfo();
}
catch (WebException) { /* Do nothing on 404 */ }
catch (Exception)
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27063a46")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyConfiguration("")]
@@ -1,5 +1,6 @@
Rocksmith Toolkit Release Notes

- fixed arrangement represent bug
- improved verification of external apps
- added app.config file (may avoid some errors)
- fixed Auto Updater to work with new file directory structure and improved function
@@ -543,26 +543,9 @@ private static void GenerateRS2014SongPsarc(Stream output, DLCPackageData info,
// MANIFEST
var manifest = new Manifest2014<Attributes2014>();
var attribute = new Attributes2014(arrangementFileName, arr, info, platform);

if (false) // for debugging represent conflicts
{
//infoArrangement.ArrangementPropeties.BonusArr = arr.BonusArr ? 1 : 0;
//attribute.ArrangementProperties.BonusArr != infoArrangement.ArrangementPropeties.BonusArr;

// get XML represent elements and compare to JSON represent elements
var infoArrangement = info.Arrangements.Where(x => x.ArrangementName == arr.ArrangementName).FirstOrDefault();
if (infoArrangement.ArrangementPropeties.Represent != (arr.Represent ? 1 : 0))
Debug.WriteLine("PRE Conflicted XML/JSON Represent elements in: " + arr.ToString());
if (infoArrangement.ArrangementPropeties.BonusArr != (arr.BonusArr ? 1 : 0))
Debug.WriteLine("PRE Conflicted XML/JSON BonusArr elements in: " + arr.ToString());

if (infoArrangement.ArrangementPropeties.Represent != (arr.Represent ? 1 : 0))
Debug.WriteLine("POST Conflicted XML/JSON Represent elements in: " + arr.ToString());
if (infoArrangement.ArrangementPropeties.BonusArr != (arr.BonusArr ? 1 : 0))
Debug.WriteLine("POST Conflicted XML/JSON BonusArr elements in: " + arr.ToString());
}

// Commented out - EOF properly sets the bonus/represent elements

// TODO: monitor this change
// Commented out - EOF now properly sets the bonus/represent elements
//if (arrangement.ArrangementType == ArrangementType.Bass || arrangement.ArrangementType == ArrangementType.Guitar)
//{
// // TODO: monitor this new code for bugs
@@ -112,7 +112,9 @@ public Attributes2014(string arrangementFileName, Arrangement arrangement, DLCPa
// Automatically set as two finger style if pick is not used
ArrangementProperties.TwoFingerPicking = ArrangementProperties.PathBass == 1 && ArrangementProperties.BassPick == 0 ? 1 : 0;

// BONUS ARRANGEMENT
// TODO: monitor this change
// EOF now properly sets the bonus/represent elements
ArrangementProperties.Represent = Convert.ToInt32(arrangement.Represent);
ArrangementProperties.BonusArr = Convert.ToInt32(arrangement.BonusArr);

// Metronome
@@ -27,5 +27,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27063a46")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyConfiguration("")]
@@ -44,7 +44,7 @@ public DateTime Date
/// </summary>
/// <param name="gitSubversion">Get specified version info and force rollback</param>
/// <returns></returns>
public static ToolkitVersionOnline GetOnlineVersionInfo(string gitSubversion = "") // fe47c38
public static ToolkitVersionOnline GetVersionInfo(string gitSubversion = "") // fe47c38
{
// TODO: impliment TLS check (see way below)
// No TLS 1.2 in WinXp, or before IE8 browser if OS is newer than WinXP
@@ -29,5 +29,5 @@
//
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("27063a46")]
[assembly: AssemblyInformationalVersion("27dec27b")]
[assembly: AssemblyConfiguration("")]
@@ -1,3 +1,3 @@
2.9.2.0
27063a46
27dec27b

0 comments on commit dfeda5a

Please sign in to comment.