Skip to content

Commit

Permalink
fix up for 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
CWXDEV committed Dec 9, 2024
1 parent 691279a commit 08673a5
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 17 deletions.
Binary file modified src/Build/BepInEx/plugins/CWX/CWX_MegaMod.dll
Binary file not shown.
25 changes: 25 additions & 0 deletions src/CWX-MegaMod.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.002.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CWX-MegaMod/CWX-MegaMod", "CWX-MegaMod/CWX-MegaMod.csproj", "{F9BEF069-773A-4D4A-AC46-9927CA422997}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F9BEF069-773A-4D4A-AC46-9927CA422997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F9BEF069-773A-4D4A-AC46-9927CA422997}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F9BEF069-773A-4D4A-AC46-9927CA422997}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F9BEF069-773A-4D4A-AC46-9927CA422997}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AB182EE8-0D4A-4466-A133-7940AEFC8687}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions src/CWX-MegaMod/BushWhacker/BushWhackerScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public class BushWhackerScript : MonoBehaviour

private void Awake()
{
GetObjects();
_ = GetObjects();
}

public void StartTask()
{
ChangeObjects();
_ = ChangeObjects();
}

private async Task GetObjects()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ private void Awake()
{
_gameWorld = Singleton<GameWorld>.Instance;

GetGameObjects();
_ = GetGameObjects();
}

public void StartTask()
{
ChangeObjects();
_ = ChangeObjects();
}

private async Task ChangeObjects()
Expand Down
4 changes: 2 additions & 2 deletions src/CWX-MegaMod/GrassCutter/GrassCutterScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ public class GrassCutterScript : MonoBehaviour

private void Awake()
{
GetObjects();
_ = GetObjects();
}

public void StartTask()
{
ChangeObjects();
_ = ChangeObjects();
}

private async Task GetObjects()
Expand Down
4 changes: 2 additions & 2 deletions src/CWX-MegaMod/InventoryViewer/InventoryViewerPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class InventoryViewerPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(InventoryControllerClass), nameof(InventoryControllerClass.IsAllowedToSeeSlot));
return AccessTools.Method(typeof(InventoryController), nameof(InventoryController.IsAllowedToSeeSlot));
}

[PatchPrefix]
public static bool PatchPrefix(InventoryControllerClass __instance, Slot slot, EquipmentSlot slotName, ref bool __result)
public static bool PatchPrefix(InventoryController __instance, Slot slot, EquipmentSlot slotName, ref bool __result)
{
if (MegaMod.InventoryViewer.Value)
{
Expand Down
4 changes: 2 additions & 2 deletions src/CWX-MegaMod/MasterKey/MasterKeyScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ public class MasterKeyScript : MonoBehaviour

private void Awake()
{
GetObjects();
_ = GetObjects();
}

public void StartTask()
{
ChangeObjects();
_ = ChangeObjects();
}

private async Task GetObjects()
Expand Down
2 changes: 1 addition & 1 deletion src/CWX-MegaMod/PainkillerDesat/PainkillerDesatPatch1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PainkillerDesatScript1 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(EffectsController.Class582), nameof(EffectsController.Class582.method_2));
return AccessTools.Method(typeof(EffectsController.Class644), nameof(EffectsController.Class644.method_2));
}

[PatchPrefix] // removes the sharpen/desat effect from some painkillers
Expand Down
2 changes: 1 addition & 1 deletion src/CWX-MegaMod/PainkillerDesat/PainkillerDesatPatch2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PainkillerDesatScript2 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(EffectsController.Class582), nameof(EffectsController.Class582.method_1));
return AccessTools.Method(typeof(EffectsController.Class644), nameof(EffectsController.Class644.method_1));
}

[PatchPrefix] // removes the sharpen/desat effect from some painkillers
Expand Down
2 changes: 1 addition & 1 deletion src/CWX-MegaMod/PainkillerDesat/PainkillerDesatPatch3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PainkillerDesatScript3 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(EffectsController.Class587), nameof(EffectsController.Class587.Toggle));
return AccessTools.Method(typeof(EffectsController.Class649), nameof(EffectsController.Class649.Toggle));
}

[PatchPrefix] // removes the wiggle effect from some painkillers
Expand Down
2 changes: 1 addition & 1 deletion src/CWX-MegaMod/PainkillerDesat/PainkillerDesatPatch4.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PainkillerDesatScript4 : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(EffectsController.Class578), nameof(EffectsController.Class578.Toggle));
return AccessTools.Method(typeof(EffectsController.Class640), nameof(EffectsController.Class640.Toggle));
}

[PatchPrefix] // removes the double vision effect from some painkillers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ public static bool PatchPrefix(ref TradingPlayerItemView __instance)
{
if (MegaMod.TradingPlayerView.Value == true)
{
string text = Singleton<ItemFactory>.Instance.BriefItemName(__instance.Item, __instance.Item.Name.Localized(null));
string text = Singleton<ItemFactoryClass>.Instance.BriefItemName(__instance.Item, __instance.Item.Name.Localized(null));

var itemView = (ItemView)__instance;

var context = (ItemUiContext)AccessTools.Field(itemView.GetType(), "ItemUiContext").GetValue(itemView);
context.Tooltip.Show(text, null, 0f, null, true);
context.Tooltip.Show(text, null, 0f, null); // context.Tooltip.Show(text, null, 0f, null, true);

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CWX-MegaMod/WeathePatcher/WeatherPatcherScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ private void Awake()

if (weatherController != null)
{
debugFogFloat = weatherController.WeatherDebug.Fog;
debugFogFloat = weatherController.WeatherDebug.Fog; // TODO: look for a way to disable this error as Jetbrains still have not fixed it
}

if (camera.Camera != null)
Expand Down

0 comments on commit 08673a5

Please sign in to comment.