[+] Make ForceAsServer and ForceFreePlay individual components

This commit is contained in:
Clansty
2024-08-22 20:17:26 +08:00
parent ffe3843747
commit d58fe84439
7 changed files with 47 additions and 26 deletions

View File

@@ -0,0 +1,23 @@
using AMDaemon;
using HarmonyLib;
namespace AquaMai.Fix;
public class ForceAsServer
{
[HarmonyPrefix]
[HarmonyPatch(typeof(LanInstall), "IsServer", MethodType.Getter)]
private static bool PreIsServer(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(Network), "IsLanAvailable", MethodType.Getter)]
private static bool PreIsLanAvailable(ref bool __result)
{
__result = false;
return false;
}
}