diff --git a/Patches/PetActionsPatch.cs b/Patches/PetActionsPatch.cs index e8265bae7..93bb50b94 100644 --- a/Patches/PetActionsPatch.cs +++ b/Patches/PetActionsPatch.cs @@ -338,7 +338,7 @@ class ExternalRpcPetPatch if (Pelican.IsEaten(p.PlayerId) || Medic.ProtectList.Contains(p.PlayerId)) continue; dis = UnityEngine.Vector2.Distance(cppos, p.transform.position); cpdistance.Add(p, dis); - Logger.Info($"{p?.Data?.PlayerName}の位置{dis}", "Warlock"); + Logger.Info($"{p?.Data?.PlayerName}'s distance: {dis}", "Warlock"); } if (cpdistance.Any()) { @@ -347,7 +347,7 @@ class ExternalRpcPetPatch if (cp.RpcCheckAndMurder(targetw, true)) { targetw.SetRealKiller(pc); - Logger.Info($"{targetw.GetNameWithRole().RemoveHtmlTags()}was killed", "Warlock"); + Logger.Info($"{targetw.GetNameWithRole().RemoveHtmlTags()} was killed", "Warlock"); cp.Kill(targetw); pc.SetKillCooldown(); pc.Notify(GetString("WarlockControlKill")); diff --git a/Patches/SabotageSystemPatch.cs b/Patches/SabotageSystemPatch.cs index 7bacf8d87..eb90e7aaf 100644 --- a/Patches/SabotageSystemPatch.cs +++ b/Patches/SabotageSystemPatch.cs @@ -1,5 +1,4 @@ using HarmonyLib; -using System.Threading; namespace TOHE; @@ -77,6 +76,8 @@ public static class ElectricTaskInitializePatch } } } + + Logger.Info("Lights sabotage called", "ElectricTask"); } } [HarmonyPatch(typeof(ElectricTask), nameof(ElectricTask.Complete))] @@ -97,6 +98,8 @@ public static class ElectricTaskCompletePatch } } } + + Logger.Info("Lights sabotage fixed", "ElectricTask"); } } // https://github.com/tukasa0001/TownOfHost/blob/357f7b5523e4bdd0bb58cda1e0ff6cceaa84813d/Patches/SabotageSystemPatch.cs diff --git a/Patches/ShipStatusPatch.cs b/Patches/ShipStatusPatch.cs index f3c5ac2b5..ef94066a8 100644 --- a/Patches/ShipStatusPatch.cs +++ b/Patches/ShipStatusPatch.cs @@ -32,9 +32,13 @@ class ShipFixedUpdatePatch [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.UpdateSystem), typeof(SystemTypes), typeof(PlayerControl), typeof(MessageReader))] public static class MessageReaderUpdateSystemPatch { + public static void Prefix(ShipStatus __instance, [HarmonyArgument(0)] SystemTypes systemType, [HarmonyArgument(1)] PlayerControl player, [HarmonyArgument(2)] MessageReader reader) + { + RepairSystemPatch.Prefix(__instance, systemType, player, MessageReader.Get(reader).ReadByte()); + } public static void Postfix(ShipStatus __instance, [HarmonyArgument(0)] SystemTypes systemType, [HarmonyArgument(1)] PlayerControl player, [HarmonyArgument(2)] MessageReader reader) { - Camouflage.CheckCamouflage(); + RepairSystemPatch.Postfix(__instance, systemType, player, MessageReader.Get(reader).ReadByte()); } } [HarmonyPatch(typeof(ShipStatus), nameof(ShipStatus.UpdateSystem), typeof(SystemTypes), typeof(PlayerControl), typeof(byte))] @@ -154,6 +158,8 @@ class RepairSystemPatch [HarmonyArgument(1)] PlayerControl player, [HarmonyArgument(2)] byte amount) { + Camouflage.CheckCamouflage(); + if (systemType == SystemTypes.Electrical && 0 <= amount && amount <= 4) { var SwitchSystem = ShipStatus.Instance.Systems[SystemTypes.Electrical].Cast(); diff --git a/Resources/ModNews/English/TOHE+.v1.2.0.txt b/Resources/ModNews/English/TOHE+.v1.2.0.txt new file mode 100644 index 000000000..bed237040 --- /dev/null +++ b/Resources/ModNews/English/TOHE+.v1.2.0.txt @@ -0,0 +1,23 @@ + +#Number:100067 +#Title:TOHE PLUS v1.2.0 +#SubTitle:★★★★Compatibility with Fungle★★★★ +#ShortTitle:★TOHE+ v1.2.0 +#Date:2023-10-28T00:00:00Z +#----------------------------- + +## Thank you for using TOHE+! + +## Fixes +- This version is fully compatible with the new and loved Fungle map! +- Updated all roles to work on Fungle +- Other minor fixes + +#### Reminder: You can use Pets instead of Venting / Shapeshifting for some roles. You can turn on this option under the Game Modifiers tab, where Guesser Mode is also located. + +## New Setting +- You can now change the sabotage time limit on Mira HQ (both Reactor and O2) + +### Notes +- I'm sorry if something doesn't work. My time to test the code I add is next to 0, and I work alone on all of this. Still, I hope there aren't any major bugs and this brings you a good experience. +- Thank you for reading this and using my mod. Support and feedback is what motivates me to keep developing. \ No newline at end of file diff --git a/TOHE.csproj b/TOHE.csproj index ed4d3066b..661b09ea5 100644 --- a/TOHE.csproj +++ b/TOHE.csproj @@ -15,6 +15,14 @@ + + + + + + + +