Code Cleanup

This commit is contained in:
Gurge44 committed 2023-12-23 17:37:34 +01:00
1 parent 59f3c2e334
commit a902cdf29f
13 files changed
+11 -39

No files matched your search

+1 -2
View File
@@ -1,6 +1,5 @@
using HarmonyLib;
using Hazel;
using Il2CppSystem.Runtime.Remoting.Messaging;
using System.Collections.Generic;
using System.Linq;
using TOHE.Modules;
@@ -400,7 +399,7 @@ internal static class FFAManager
pc.RPCPlayCustomSound("Teleport");
var originPs = target.Pos();
target.TP(pc);
target.TP(pc.Pos());
pc.TP(originPs);
target.Notify(Utils.ColorString(new Color32(0, 255, 165, byte.MaxValue), string.Format(GetString("FFA-Event-RandomTP"), pc.GetRealName())));
+1 -1
View File
@@ -12,8 +12,8 @@ using TOHE.Roles.Crewmate;
using TOHE.Roles.Impostor;
using TOHE.Roles.Neutral;
using UnityEngine;
using static TOHE.Utils;
using static TOHE.Translator;
using static TOHE.Utils;
namespace TOHE;
-2
View File
@@ -285,7 +285,6 @@ public static class GuessManager
else pc.ShowPopUp(GetString("GuessSuperStar"));
return true;
case CustomRoles.Glow:
case CustomRoles.Sentinel:
case CustomRoles.LastImpostor:
if (!isUI) Utils.SendMessage(GetString("GuessObviousAddon"), pc.PlayerId);
else pc.ShowPopUp(GetString("GuessObviousAddon"));
@@ -1044,7 +1043,6 @@ public static class GuessManager
or CustomRoles.Impostor
or CustomRoles.Shapeshifter
or CustomRoles.Flashman
or CustomRoles.Sentinel
or CustomRoles.NotAssigned
or CustomRoles.KB_Normal
// or CustomRoles.Marshall
+1 -1
View File
@@ -1878,7 +1878,7 @@ public static class Utils
{
string tag = devUser.GetTag();
if (player.AmOwner || player.IsModClient())
name = tag + name;
name = tag + name;
else name = tag.Replace("\r\n", " - ") + name;
}
+1 -2
View File
@@ -1,6 +1,5 @@
using HarmonyLib;
using InnerNet;
using System.Collections.Generic;
using TOHE.Modules;
using UnityEngine;
using static TOHE.Translator;
@@ -103,7 +102,7 @@ internal class InnerNetClientCanBanPatch
internal class KickPlayerPatch
{
public static void Prefix(InnerNetClient __instance, int clientId, bool ban)
{
{
if (!AmongUsClient.Instance.AmHost) return;
if (ban) BanManager.AddBanPlayer(AmongUsClient.Instance.GetRecentClient(clientId));
}
+2 -2
View File
@@ -88,12 +88,12 @@ public class MainMenuManagerPatch
updatePassiveButton.OnClick.AddListener((Action)(() =>
{
updateButton.SetActive(false);
ModUpdater.StartUpdate(ModUpdater.downloadUrl);
ModUpdater.StartUpdate(ModUpdater.downloadUrl, true);
}));
updatePassiveButton.OnMouseOut.AddListener((Action)(() => updateButtonSprite.color = updateText.color = updateColor));
updateButtonSprite.color = updateText.color = updateColor;
updateButtonSprite.size *= 1.5f;
updateButton.SetActive(false);
updateButton.gameObject.SetActive(ModUpdater.hasUpdate);
#if RELEASE
//フリープレイの無効化
-1
View File
@@ -1330,7 +1330,6 @@ class MeetingHudOnDestroyPatch
Main.AllPlayerControls.Do(pc => RandomSpawn.CustomNetworkTransformPatch.NumOfTP[pc.PlayerId] = 0);
Main.LastVotedPlayerInfo = null;
EAC.MeetingTimes = 0;
}
}
}
-1
View File
@@ -1,5 +1,4 @@
using HarmonyLib;
using System.Collections.Generic;
namespace TOHE.Patches;
+1 -7
View File
@@ -1,11 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
using static TOHE.Options;
using static TOHE.Translator;
using static TOHE.Utils;
namespace TOHE.Roles.Crewmate
{
+1 -8
View File
@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static TOHE.Options;
using static TOHE.Translator;
using static TOHE.Utils;
using static TOHE.Options;
namespace TOHE.Roles.Crewmate
{
+1 -7
View File
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TOHE.Roles.Crewmate
namespace TOHE.Roles.Crewmate
{
internal class Philantropist
{
+1 -4
View File
@@ -1,10 +1,7 @@
using Epic.OnlineServices;
using Hazel;
using Hazel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using static TOHE.Options;
using static TOHE.Translator;
+1 -1
View File
@@ -2,8 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using static TOHE.Options;
using static TOHE.Utils;
using static TOHE.Translator;
using static TOHE.Utils;
namespace TOHE.Roles.Neutral
{