Skip to content

Commit

Permalink
Fix some randomization options not firing due to short circuit in the…
Browse files Browse the repository at this point in the history
… randomiztion loop. Fix AI randomizer always choosing Charge AI.
  • Loading branch information
Mgamerz committed Aug 30, 2019
1 parent ba34027 commit 277782a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
25 changes: 10 additions & 15 deletions MassEffectRandomizer/Classes/Randomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ private void PerformRandomization(object sender, DoWorkEventArgs e)

if (mainWindow.RANDSETTING_CHARACTER_ICONICFACE && export.ClassName == "BioMorphFace" && export.ObjectName.StartsWith("Player_"))
{
Log.Information("Randomizing iconic female shepard face by "+ mainWindow.RANDSETTING_CHARACTER_ICONICFACE_AMOUNT);
Log.Information("Randomizing iconic female shepard face by " + mainWindow.RANDSETTING_CHARACTER_ICONICFACE_AMOUNT);
RandomizeBioMorphFace(export, random, mainWindow.RANDSETTING_CHARACTER_ICONICFACE_AMOUNT);
}
}
Expand Down Expand Up @@ -652,15 +652,15 @@ private void PerformRandomization(object sender, DoWorkEventArgs e)
}
}
}
else if (mainWindow.RANDSETTING_MISC_STARCOLORS)
else if ((exp.ClassName == "BioSunFlareComponent" || exp.ClassName == "BioSunFlareStreakComponent" || exp.ClassName == "BioSunActor") && mainWindow.RANDSETTING_MISC_STARCOLORS)
{
if (!loggedFilename)
{
Log.Information("Randomizing map file: " + files[i]);
loggedFilename = true;
}
if (exp.ClassName == "BioSunFlareComponent" || exp.ClassName == "BioSunFlareStreakComponent")
{
if (!loggedFilename)
{
Log.Information("Randomizing map file: " + files[i]);
loggedFilename = true;
}
var tint = exp.GetProperty<StructProperty>("FlareTint");
if (tint != null)
{
Expand All @@ -670,11 +670,6 @@ private void PerformRandomization(object sender, DoWorkEventArgs e)
}
else if (exp.ClassName == "BioSunActor")
{
if (!loggedFilename)
{
Log.Information("Randomizing map file: " + files[i]);
loggedFilename = true;
}
var tint = exp.GetProperty<StructProperty>("SunTint");
if (tint != null)
{
Expand Down Expand Up @@ -2719,9 +2714,9 @@ private void MakeTextPossiblyScottish(List<TalkFile> Tlks, Random random, bool u
scottishVowelOrdering = new List<char>(new char[] { 'a', 'e', 'i', 'o', 'u' });
scottishVowelOrdering.Shuffle(random);
upperScottishVowelOrdering = new List<char>();
foreach(var c in scottishVowelOrdering)
foreach (var c in scottishVowelOrdering)
{
upperScottishVowelOrdering.Add(char.ToUpper(c,CultureInfo.InvariantCulture));
upperScottishVowelOrdering.Add(char.ToUpper(c, CultureInfo.InvariantCulture));
}
}

Expand Down Expand Up @@ -4615,7 +4610,7 @@ private void RandomizeMusic(IExportEntry export, Random random, string randomizi

private void RandomizeAINames(ME1Package pacakge, Random random)
{
bool forcedCharge = random.Next(1) == 0;
bool forcedCharge = random.Next(8) == 0;
for (int i = 0; i < pacakge.NameCount; i++)
{
NameReference n = pacakge.getNameEntry(i);
Expand Down
4 changes: 2 additions & 2 deletions MassEffectRandomizer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[assembly: AssemblyCulture("")]

// Version informationr(
[assembly: AssemblyVersion("1.0.0.999")]
[assembly: AssemblyFileVersion("1.0.0.999")]
[assembly: AssemblyVersion("1.0.1.1002")]
[assembly: AssemblyFileVersion("1.0.1.1002")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

0 comments on commit 277782a

Please sign in to comment.