Skip to content

Commit

Permalink
stop difficulty filter when using company difficulty
Browse files Browse the repository at this point in the history
  • Loading branch information
wmtorode committed Nov 12, 2020
1 parent 65f4430 commit 7baa222
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
1 change: 1 addition & 0 deletions DropCostsEnhanced.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<Compile Include="Patches\Contract.cs" />
<Compile Include="Patches\LanceHeaderWidget.cs" />
<Compile Include="Patches\SGDifficultyIndicatorWidget.cs" />
<Compile Include="Patches\SGNavigationScreen.cs" />
<Compile Include="Patches\SimGameState.cs" />
<Compile Include="Patches\Starmap.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
25 changes: 25 additions & 0 deletions Patches/SGNavigationScreen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using BattleTech;
using BattleTech.UI;
using Harmony;
using DropCostsEnhanced;
using DropCostsEnhanced.Data;
using UnityEngine;


namespace DropCostsEnhanced.Patches
{
[HarmonyPatch(typeof(SGNavigationScreen), "OnDifficultySelectionChanged")]
public static class SGNavigationScreen_OnDifficultySelectionChanged
{
public static bool Prepare()
{
return DCECore.settings.diffMode == EDifficultyType.Company;
}

static void Prefix(SGNavigationScreen __instance, ref int index)
{
index = -1;
}

}
}
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ This was inspired by the original drop cost mod: `DropCostPerMech` and `GlobalDi
"roundToNearist" : 10000,
"debug" : false,
"trace" : false,
"heatSunkStat" : "CACOverrallHeatSinked"
"heatSunkStat" : "CACOverrallHeatSinked",
"diffMode" : "NotActive",
"valuePerHalfSkull" : 16500000,
"defaultMechsToCount" : 8,
"maxDifficulty" : 25
}
```

Expand All @@ -51,6 +55,20 @@ This was inspired by the original drop cost mod: `DropCostPerMech` and `GlobalDi

`heatSunkStat` : the name of the stat used by CAC to track heat sunk

`diffMode` : Controls what mode contract/system difficulty operates on. Options:

- NotActive: The default mode, Global difficulty patches are not applied at all
- System: Difficulty is based on systemdef defined. This is functionaly the same as NotActive, but Global difficulty patches are applied
- Company: Difficulty is based on the value of your best fieldable units. Note: When this mode is active, the Difficulty Filter in the starmap will not work (biome filter still works)
- Reputation: Difficulty is based on your standing with factions.

*The below settings are only active when `diffMode` is set to something other than `NotActive`*

`valuePerHalfSkull` : The value of mech value that decides the lance rating indicator & company difficulty rating when active

`defaultMechsToCount` : The default number of mechs to count for company difficulty when `bigger drops` is not present

`maxDifficulty` : The max contract difficulty that can be generated when not in system mode.

## Drop Costs

Expand Down

0 comments on commit 7baa222

Please sign in to comment.