Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkroeg committed Sep 16, 2023
1 parent bbcb9c6 commit 4fc2b02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions TrainingMissions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,14 @@ public static void Postfix(LanceConfiguratorPanel __instance)
// ModState.IsTrainingMission = true;
foreach (var slot in lanceLoadoutSlots)
{
ModState.deployedMechs.Add(slot.SelectedMech.MechDef);
ModInit.modLog.LogMessage($"Adding {slot.SelectedMech.MechDef.Name} to deployedMechs for restore");
foreach (var kvp in new Dictionary<int, MechDef>(__instance.Sim.ActiveMechs))
{
if (slot.SelectedMech.MechDef.GUID == kvp.Value.GUID)
{
ModState.deployedMechs.Add(slot.SelectedMech.MechDef);
ModInit.modLog.LogMessage($"Adding {slot.SelectedMech.MechDef.Name} to deployedMechs for restore");
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions TrainingMissions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<PropertyGroup>
<!-- avoids IgnoresAccessChecksToAttribute warnings -->
<PublicizerRuntimeStrategies>Unsafe</PublicizerRuntimeStrategies>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
<AssemblyVersion>1.1.0.1</AssemblyVersion>
<FileVersion>1.1.0.1</FileVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Publicizer" Version="2.2.1" />
Expand Down

0 comments on commit 4fc2b02

Please sign in to comment.