Skip to content

Commit

Permalink
fix skirmish and maybe catch pilot timeout better. fatigue will proba…
Browse files Browse the repository at this point in the history
…bly still fuck things up bc it sucks
  • Loading branch information
ajkroeg committed Jul 15, 2022
1 parent 019601e commit 445d81a
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Patches/DescriptionPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public static class TaskTimelineWidget_OnTaskDetailsClicked_Patch
{
static void Postfix(TaskTimelineWidget __instance, TaskManagementElement element)
{
if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)) return; //needed so Timeline mods AdvanceToTask works.
if (element == null) return;
if (element.Entry.Type != WorkOrderType.MedLabHeal) return;
if (!(element.Entry is WorkOrderEntry_MedBayHeal medbayHealEntry) ||
Expand Down
2 changes: 1 addition & 1 deletion Patches/InjuryPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public static void Postfix(Pilot __instance, ref bool __result)
{
__result = true;
}
if (__instance.pilotDef.PilotTags.Contains(DEBILITATEDTAG) || __instance.Injuries >= __instance.Health)
if (__instance.pilotDef.PilotTags.Contains(DEBILITATEDTAG) || __instance.Injuries >= __instance.Health || __instance.pilotDef.TimeoutRemaining > 0)
{
__result = false;
}
Expand Down
1 change: 1 addition & 0 deletions Patches/SaveAndStatePatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ public static class Contract_CompleteContract_Patch
public static void Prefix(Contract __instance, MissionResult result, bool isGoodFaithEffort)
{
var sim = UnityGameInstance.BattleTechGame.Simulation;
if (sim == null) return;
var playerPilots = new List<Pilot>();
playerPilots.AddRange(sim.PilotRoster);
playerPilots.Add(sim.Commander);
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.4.5")]
[assembly: AssemblyFileVersion("1.0.4.5")]
[assembly: AssemblyVersion("1.0.4.6")]
[assembly: AssemblyFileVersion("1.0.4.6")]
Binary file modified bin/Debug/TisButAScratch.dll
Binary file not shown.
Binary file modified bin/Debug/TisButAScratch.pdb
Binary file not shown.
Binary file modified obj/Debug/TisButAScratch.dll
Binary file not shown.
Binary file modified obj/Debug/TisButAScratch.pdb
Binary file not shown.

0 comments on commit 445d81a

Please sign in to comment.