Skip to content

Commit

Permalink
Fixed bug with Criminal.
Browse files Browse the repository at this point in the history
  • Loading branch information
donZappo committed Sep 4, 2018
1 parent 58d9f38 commit 3d2f7ab
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Pilot_Quirks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,16 @@ public static void Postfix(SimGameState __instance)
}

}
bool honest = false;
foreach (Pilot pilot in __instance.PilotRoster)
{
if (pilot.pilotDef.PilotTags.Contains("pilot_criminal"))
if (pilot.pilotDef.PilotTags.Contains("pilot_honest"))
honest = true;
}

foreach (Pilot pilot in __instance.PilotRoster)
{
if (pilot.pilotDef.PilotTags.Contains("pilot_criminal") && !honest)
{
var rng = new System.Random();
int Roll = rng.Next(1, 101);
Expand Down Expand Up @@ -368,15 +375,9 @@ public static void Prefix(Shop __instance, int max)
SimGameState Sim = Traverse.Create(__instance).Field("Sim").GetValue<SimGameState>();
if (Sim.CurSystem.Tags.Contains("planet_other_blackmarket"))
{
bool honest = false;
foreach (Pilot pilot in Sim.PilotRoster)
{
if (pilot.pilotDef.PilotTags.Contains("pilot_honest"))
honest = true;
}
foreach (Pilot pilot in Sim.PilotRoster)
{
if (pilot.pilotDef.PilotTags.Contains("pilot_criminal") && !honest)
if (pilot.pilotDef.PilotTags.Contains("pilot_criminal"))
max = max + 2;
}
}
Expand Down

0 comments on commit 3d2f7ab

Please sign in to comment.