Skip to content

Commit

Permalink
Fix critical issue ( missing check in StartingPawnUtility.NewGenerate…
Browse files Browse the repository at this point in the history
…dStartingPawn )
  • Loading branch information
aRandomKiwi committed Feb 29, 2020
1 parent 2366686 commit 54be80c
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 18 deletions.
Binary file modified 1.1/Assemblies/AndroidTiers.dll
Binary file not shown.
Binary file modified Source/Androids For RW1.1/.vs/Androids/v15/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
50 changes: 34 additions & 16 deletions Source/Androids For RW1.1/Harmony/StartingPawnUtility_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,41 @@ public static void Listener(ref Pawn __result)
Random rnd = new Random();
PawnGenerationRequest request;
string pkd = "";
switch (rnd.Next(1, 5))
if (!Utils.TXSERIE_LOADED)
{
case 1:
pkd = "AndroidT2ColonistGeneral";
break;
case 2:
pkd = "AndroidT1ColonistGeneral";
break;
case 3:
pkd = "ATPP_Android2ITXKind";
break;
case 4:
pkd = "ATPP_Android2TXKind";
break;
default:
pkd = Faction.OfPlayer.def.basicMemberKind.defName;
break;
switch (rnd.Next(1, 3))
{
case 1:
pkd = "AndroidT2ColonistGeneral";
break;
case 2:
pkd = "AndroidT1ColonistGeneral";
break;
default:
pkd = Faction.OfPlayer.def.basicMemberKind.defName;
break;
}
}
else
{
switch (rnd.Next(1, 5))
{
case 1:
pkd = "AndroidT2ColonistGeneral";
break;
case 2:
pkd = "AndroidT1ColonistGeneral";
break;
case 3:
pkd = "ATPP_Android2ITXKind";
break;
case 4:
pkd = "ATPP_Android2TXKind";
break;
default:
pkd = Faction.OfPlayer.def.basicMemberKind.defName;
break;
}
}
request = new PawnGenerationRequest(DefDatabase<PawnKindDef>.GetNamed(pkd, false), Faction.OfPlayer, PawnGenerationContext.PlayerStarter, -1, true, false, false, false, true, TutorSystem.TutorialMode, 20f, false, true, true, false, false, false, false);
__result = null;
Expand Down
4 changes: 2 additions & 2 deletions Source/Androids For RW1.1/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.0.1.0")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue | DebuggableAttribute.DebuggingModes.DisableOptimizations)]
Expand All @@ -17,4 +17,4 @@
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4ed7b8ad-47e8-4436-a9bf-e664b17196d7")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.1.0")]
Binary file modified Source/Androids For RW1.1/obj/Debug/AndroidTiers.dll
Binary file not shown.

0 comments on commit 54be80c

Please sign in to comment.