mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Remove unnecessary assignments
This commit is contained in:
1 parent
2d4ede8614
commit
4d5ff2221d
62 files changed
+126
-127
No files matched your search
@@ -17,7 +17,7 @@ internal static class FFAManager
|
||||
|
||||
private static Dictionary<byte, float> originalSpeed = new();
|
||||
public static Dictionary<byte, int> KBScore = new();
|
||||
public static int RoundTime = new();
|
||||
public static int RoundTime;
|
||||
|
||||
//Options
|
||||
public static OptionItem FFA_GameTime;
|
||||
@@ -305,7 +305,7 @@ internal static class FFAManager
|
||||
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))]
|
||||
class FixedUpdatePatch
|
||||
{
|
||||
private static long LastFixedUpdate = new();
|
||||
private static long LastFixedUpdate;
|
||||
public static void Postfix(PlayerControl __instance)
|
||||
{
|
||||
if (!GameStates.IsInTask || Options.CurrentGameMode != CustomGameMode.FFA) return;
|
||||
|
||||
@@ -27,7 +27,7 @@ internal static class SoloKombatManager
|
||||
|
||||
private static Dictionary<byte, float> originalSpeed = new();
|
||||
public static Dictionary<byte, int> KBScore = new();
|
||||
public static int RoundTime = new();
|
||||
public static int RoundTime;
|
||||
|
||||
//Options
|
||||
public static OptionItem KB_GameTime;
|
||||
@@ -333,7 +333,7 @@ internal static class SoloKombatManager
|
||||
[HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.FixedUpdate))]
|
||||
class FixedUpdatePatch
|
||||
{
|
||||
private static long LastFixedUpdate = new();
|
||||
private static long LastFixedUpdate;
|
||||
public static void Postfix(PlayerControl __instance)
|
||||
{
|
||||
if (!GameStates.IsInTask || Options.CurrentGameMode != CustomGameMode.SoloKombat) return;
|
||||
|
||||
@@ -52,7 +52,7 @@ public static class AntiBlackout
|
||||
return numCrewmates - numImpostors;
|
||||
}
|
||||
}
|
||||
public static bool IsCached { get; private set; } = false;
|
||||
public static bool IsCached { get; private set; }
|
||||
private static Dictionary<byte, (bool isDead, bool Disconnected)> isDeadCache = new();
|
||||
private readonly static LogHandler logger = Logger.Handler("AntiBlackout");
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ClientOptionItem
|
||||
public ToggleButtonBehaviour ToggleButton;
|
||||
|
||||
public static SpriteRenderer CustomBackground;
|
||||
private static int numOptions = 0;
|
||||
private static int numOptions;
|
||||
|
||||
private ClientOptionItem(
|
||||
string name,
|
||||
|
||||
+3
-3
@@ -11,10 +11,10 @@ internal class Cloud
|
||||
{
|
||||
private static string IP;
|
||||
//private static int LOBBY_PORT = 0;
|
||||
private static int EAC_PORT = 0;
|
||||
private static int EAC_PORT;
|
||||
//private static Socket ClientSocket;
|
||||
private static Socket EacClientSocket;
|
||||
private static long LastRepotTimeStamp = 0;
|
||||
private static long LastRepotTimeStamp;
|
||||
public static void Init()
|
||||
{
|
||||
try
|
||||
@@ -71,7 +71,7 @@ internal class Cloud
|
||||
return true;
|
||||
}*/
|
||||
|
||||
private static bool connecting = false;
|
||||
private static bool connecting;
|
||||
public static void StartConnect()
|
||||
{
|
||||
if (connecting || EacClientSocket != null && EacClientSocket.Connected) return;
|
||||
|
||||
@@ -362,9 +362,9 @@ internal class CustomRoleSelector
|
||||
|
||||
}
|
||||
|
||||
public static int addScientistNum = 0;
|
||||
public static int addEngineerNum = 0;
|
||||
public static int addShapeshifterNum = 0;
|
||||
public static int addScientistNum;
|
||||
public static int addEngineerNum;
|
||||
public static int addShapeshifterNum;
|
||||
public static void CalculateVanillaRoleCount()
|
||||
{
|
||||
// 计算原版特殊职业数量
|
||||
|
||||
+2
-2
@@ -31,8 +31,8 @@ class Logger
|
||||
public static bool isEnable;
|
||||
public static List<string> disableList = new();
|
||||
public static List<string> sendToGameList = new();
|
||||
public static bool isDetail = false;
|
||||
public static bool isAlsoInGame = false;
|
||||
public static bool isDetail;
|
||||
public static bool isAlsoInGame;
|
||||
public static void Enable() => isEnable = true;
|
||||
public static void Disable() => isEnable = false;
|
||||
public static void Enable(string tag, bool toGame = false)
|
||||
|
||||
@@ -10,7 +10,7 @@ class DisableDevice
|
||||
{
|
||||
public static bool DoDisable => Options.DisableDevices.GetBool();
|
||||
private static List<byte> DesyncComms = new();
|
||||
private static int frame = 0;
|
||||
private static int frame;
|
||||
public static readonly Dictionary<string, Vector2> DevicePos = new()
|
||||
{
|
||||
["SkeldAdmin"] = new(3.48f, -8.62f),
|
||||
|
||||
@@ -2,7 +2,7 @@ namespace TOHE.Modules;
|
||||
|
||||
public static class DoorsReset
|
||||
{
|
||||
private static bool isEnabled = false;
|
||||
private static bool isEnabled;
|
||||
private static ResetMode mode;
|
||||
private static DoorsSystemType DoorsSystem => ShipStatus.Instance.Systems.TryGetValue(SystemTypes.Doors, out var system) ? system.TryCast<DoorsSystemType>() : null;
|
||||
private static readonly LogHandler logger = Logger.Handler(nameof(DoorsReset));
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ namespace TOHE;
|
||||
|
||||
internal class EAC
|
||||
{
|
||||
public static int MeetingTimes = 0;
|
||||
public static int DeNum = 0;
|
||||
public static int MeetingTimes;
|
||||
public static int DeNum;
|
||||
public static void WarnHost(int denum = 1)
|
||||
{
|
||||
DeNum += denum;
|
||||
|
||||
@@ -619,8 +619,8 @@ public class PlayerVersion
|
||||
}
|
||||
public static class GameStates
|
||||
{
|
||||
public static bool InGame = false;
|
||||
public static bool AlreadyDied = false;
|
||||
public static bool InGame;
|
||||
public static bool AlreadyDied;
|
||||
public static bool IsModHost => PlayerControl.AllPlayerControls.ToArray().FirstOrDefault(x => x.PlayerId == 0 && x.IsModClient());
|
||||
public static bool IsLobby => AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Joined;
|
||||
public static bool IsInGame => InGame;
|
||||
@@ -640,13 +640,13 @@ public static class GameStates
|
||||
}
|
||||
public static class MeetingStates
|
||||
{
|
||||
public static DeadBody[] DeadBodies = null;
|
||||
private static GameData.PlayerInfo reportTarget = null;
|
||||
public static DeadBody[] DeadBodies;
|
||||
private static GameData.PlayerInfo reportTarget;
|
||||
public static bool IsEmergencyMeeting => ReportTarget == null;
|
||||
public static bool IsExistDeadBody => DeadBodies.Length > 0;
|
||||
|
||||
public static GameData.PlayerInfo ReportTarget { get => reportTarget; set => reportTarget = value; }
|
||||
|
||||
public static bool MeetingCalled = false;
|
||||
public static bool MeetingCalled;
|
||||
public static bool FirstMeeting = true;
|
||||
}
|
||||
+10
-10
@@ -18,17 +18,17 @@ public class ModUpdater
|
||||
{
|
||||
//private static readonly string URL_2018k = "http://api.2018k.cn";
|
||||
//private static readonly string URL_Github = "https://api.github.com/repos/Loonie-Toons/TOHE-Restored";
|
||||
public static bool hasUpdate = false;
|
||||
public static bool forceUpdate = false;
|
||||
public static bool isBroken = false;
|
||||
public static bool isChecked = false;
|
||||
public static Version latestVersion = null;
|
||||
public static string latestTitle = null;
|
||||
public static string downloadUrl = null;
|
||||
public static string md5 = null;
|
||||
public static string notice = null;
|
||||
public static bool hasUpdate;
|
||||
public static bool forceUpdate;
|
||||
public static bool isBroken;
|
||||
public static bool isChecked;
|
||||
public static Version latestVersion;
|
||||
public static string latestTitle;
|
||||
public static string downloadUrl;
|
||||
public static string md5;
|
||||
public static string notice;
|
||||
public static GenericPopup InfoPopup;
|
||||
public static int visit = 0;
|
||||
public static int visit;
|
||||
|
||||
[HarmonyPatch(typeof(MainMenuManager), nameof(MainMenuManager.Start)), HarmonyPrefix]
|
||||
[HarmonyPriority(2)]
|
||||
|
||||
@@ -681,7 +681,7 @@ public static class Options
|
||||
// ボタン回数
|
||||
public static OptionItem SyncButtonMode;
|
||||
public static OptionItem SyncedButtonCount;
|
||||
public static int UsedButtonCount = 0;
|
||||
public static int UsedButtonCount;
|
||||
|
||||
// 全員生存時の会議時間
|
||||
public static OptionItem AllAliveMeeting;
|
||||
@@ -838,9 +838,9 @@ public static class Options
|
||||
|
||||
public static int SnitchExposeTaskLeft = 1;
|
||||
|
||||
public static bool IsLoaded = false;
|
||||
public static bool IsLoaded;
|
||||
|
||||
public static int LoadingPercentage = 0;
|
||||
public static int LoadingPercentage;
|
||||
public static string MainLoadingText = string.Empty;
|
||||
public static string RoleLoadingText = string.Empty;
|
||||
|
||||
|
||||
@@ -114,5 +114,5 @@ public static class OptionSaver
|
||||
}
|
||||
|
||||
/// <summary>オプションの形式に互換性のない変更(プリセット数変更など)を加えるときはここの数字を上げる</summary>
|
||||
public static readonly int Version = 0;
|
||||
public static readonly int Version;
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace TOHE;
|
||||
|
||||
public static class OptionShower
|
||||
{
|
||||
public static int currentPage = 0;
|
||||
public static int currentPage;
|
||||
public static List<string> pages = new();
|
||||
static OptionShower()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using AmongUs.Data;
|
||||
using AmongUs.GameOptions;
|
||||
using Epic.OnlineServices;
|
||||
using Hazel;
|
||||
using Il2CppInterop.Runtime.InteropTypes;
|
||||
using InnerNet;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ namespace TOHE;
|
||||
[HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))]
|
||||
public static class Zoom
|
||||
{
|
||||
private static bool ResetButtons = false;
|
||||
private static bool ResetButtons;
|
||||
public static void Postfix()
|
||||
{
|
||||
//if (PlayerControl.LocalPlayer.Is(RoleType.Impostor) && Options.OperateVisibilityImpostor.GetBool()) return;
|
||||
|
||||
@@ -1067,7 +1067,7 @@ internal class ChatCommands
|
||||
[HarmonyPatch(typeof(ChatController), nameof(ChatController.Update))]
|
||||
internal class ChatUpdatePatch
|
||||
{
|
||||
public static bool DoBlockChat = false;
|
||||
public static bool DoBlockChat;
|
||||
public static void Postfix(ChatController __instance)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || !Main.MessagesToSend.Any() || (Main.MessagesToSend[0].Item2 == byte.MaxValue && Main.MessageWait.Value > __instance.timeSinceLastMessage)) return;
|
||||
|
||||
@@ -66,7 +66,7 @@ internal class SplashLogoAnimatorPatch
|
||||
[HarmonyPatch(typeof(EOSManager), nameof(EOSManager.IsAllowedOnline))]
|
||||
internal class RunLoginPatch
|
||||
{
|
||||
public static int ClickCount = 0;
|
||||
public static int ClickCount;
|
||||
public static void Prefix(ref bool canOnline)
|
||||
{
|
||||
#if DEBUG
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TOHE;
|
||||
internal class ControllerManagerUpdatePatch
|
||||
{
|
||||
private static readonly (int, int)[] resolutions = { (480, 270), (640, 360), (800, 450), (1280, 720), (1600, 900), (1920, 1080) };
|
||||
private static int resolutionIndex = 0;
|
||||
private static int resolutionIndex;
|
||||
|
||||
public static List<string> addDes = new();
|
||||
public static int addonIndex = -1;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class GameStartManagerPatch
|
||||
[HarmonyPatch(typeof(GameStartManager), nameof(GameStartManager.Update))]
|
||||
public class GameStartManagerUpdatePatch
|
||||
{
|
||||
private static bool update = false;
|
||||
private static bool update;
|
||||
private static string currentText = "";
|
||||
public static float exitTimer = -1f;
|
||||
private static float minWait, maxWait;
|
||||
|
||||
+10
-10
@@ -14,13 +14,13 @@ namespace TOHE;
|
||||
[HarmonyPatch(typeof(HudManager), nameof(HudManager.Update))]
|
||||
class HudManagerPatch
|
||||
{
|
||||
public static bool ShowDebugText = false;
|
||||
public static int LastCallNotifyRolesPerSecond = 0;
|
||||
public static int NowCallNotifyRolesCount = 0;
|
||||
public static int LastSetNameDesyncCount = 0;
|
||||
public static int LastFPS = 0;
|
||||
public static int NowFrameCount = 0;
|
||||
public static float FrameRateTimer = 0.0f;
|
||||
public static bool ShowDebugText;
|
||||
public static int LastCallNotifyRolesPerSecond;
|
||||
public static int NowCallNotifyRolesCount;
|
||||
public static int LastSetNameDesyncCount;
|
||||
public static int LastFPS;
|
||||
public static int NowFrameCount;
|
||||
public static float FrameRateTimer;
|
||||
public static TextMeshPro LowerInfoText;
|
||||
public static GameObject TempLowerInfoText;
|
||||
public static void Postfix(HudManager __instance)
|
||||
@@ -575,7 +575,7 @@ class SetVentOutlinePatch
|
||||
[HarmonyPatch(typeof(HudManager), nameof(HudManager.SetHudActive), new System.Type[] { typeof(PlayerControl), typeof(RoleBehaviour), typeof(bool) })]
|
||||
class SetHudActivePatch
|
||||
{
|
||||
public static bool IsActive = false;
|
||||
public static bool IsActive;
|
||||
public static void Prefix(HudManager __instance, [HarmonyArgument(2)] ref bool isActive)
|
||||
{
|
||||
isActive &= !GameStates.IsMeeting;
|
||||
@@ -816,8 +816,8 @@ class TaskPanelBehaviourPatch
|
||||
|
||||
class RepairSender
|
||||
{
|
||||
public static bool enabled = false;
|
||||
public static bool TypingAmount = false;
|
||||
public static bool enabled;
|
||||
public static bool TypingAmount;
|
||||
|
||||
public static int SystemType;
|
||||
public static int amount;
|
||||
|
||||
@@ -172,7 +172,7 @@ public class MainMenuManagerPatch
|
||||
[HarmonyPatch(typeof(Constants), nameof(Constants.ShouldHorseAround))]
|
||||
public static class HorseModePatch
|
||||
{
|
||||
public static bool isHorseMode = false;
|
||||
public static bool isHorseMode;
|
||||
public static bool Prefix(ref bool __result)
|
||||
{
|
||||
__result = isHorseMode;
|
||||
@@ -182,7 +182,7 @@ public static class HorseModePatch
|
||||
[HarmonyPatch(typeof(Constants), nameof(Constants.ShouldFlipSkeld))]
|
||||
public static class DleksPatch
|
||||
{
|
||||
public static bool isDleks = false;
|
||||
public static bool isDleks;
|
||||
public static bool Prefix(ref bool __result)
|
||||
{
|
||||
__result = isDleks;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace TOHE;
|
||||
[HarmonyPatch(typeof(MovingPlatformBehaviour))]
|
||||
public static class MovingPlatformBehaviourPatch
|
||||
{
|
||||
private static bool isDisabled = false;
|
||||
private static bool isDisabled;
|
||||
|
||||
[HarmonyPatch(nameof(MovingPlatformBehaviour.Start)), HarmonyPrefix]
|
||||
public static void StartPrefix(MovingPlatformBehaviour __instance)
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace TOHE.Roles.Crewmate
|
||||
private static Dictionary<byte, float> SuicideTimer = new();
|
||||
private static Dictionary<byte, float> ImmortalTimer = new();
|
||||
|
||||
private static float DefaultSpeed = new();
|
||||
private static float DefaultSpeed;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ public static class Admirer
|
||||
|
||||
public static OptionItem AdmireCooldown;
|
||||
public static OptionItem KnowTargetRole;
|
||||
private static int AdmireLimit = new();
|
||||
private static int AdmireLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -13,14 +13,14 @@ namespace TOHE.Roles.Crewmate
|
||||
public static class Alchemist
|
||||
{
|
||||
private static readonly int Id = 5250;
|
||||
public static bool IsProtected = false;
|
||||
public static bool IsProtected;
|
||||
private static List<byte> playerIdList = new();
|
||||
private static Dictionary<byte, int> ventedId = new();
|
||||
public static byte PotionID = 10;
|
||||
public static string PlayerName = string.Empty;
|
||||
private static Dictionary<byte, long> InvisTime = new();
|
||||
public static bool VisionPotionActive = false;
|
||||
public static bool FixNextSabo = false;
|
||||
public static bool VisionPotionActive;
|
||||
public static bool FixNextSabo;
|
||||
|
||||
public static OptionItem VentCooldown;
|
||||
public static OptionItem ShieldDuration;
|
||||
@@ -180,7 +180,7 @@ namespace TOHE.Roles.Crewmate
|
||||
|
||||
PotionID = 10;
|
||||
}
|
||||
private static long lastFixedTime = 0;
|
||||
private static long lastFixedTime;
|
||||
public static bool IsInvis(byte id) => InvisTime.ContainsKey(id);
|
||||
private static void SendRPC(PlayerControl pc)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ public static class Chameleon
|
||||
=> GameStates.IsInTask && !InvisTime.ContainsKey(id) && !lastTime.ContainsKey(id);
|
||||
public static bool IsInvis(byte id) => InvisTime.ContainsKey(id);
|
||||
|
||||
private static long lastFixedTime = 0;
|
||||
private static long lastFixedTime;
|
||||
public static void AfterMeetingTasks()
|
||||
{
|
||||
lastTime = new();
|
||||
|
||||
@@ -17,7 +17,7 @@ public static class Deputy
|
||||
public static OptionItem DeputyHandcuffCDForTarget;
|
||||
private static OptionItem DeputyHandcuffDelay;
|
||||
|
||||
private static int HandcuffLimit = new();
|
||||
private static int HandcuffLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace TOHE.Roles.Crewmate
|
||||
if (!Main.ResetCamPlayerList.Contains(playerId))
|
||||
Main.ResetCamPlayerList.Add(playerId);
|
||||
}
|
||||
public static bool isEnable = false;
|
||||
public static bool isEnable;
|
||||
|
||||
public static void SetCooldown(byte id) => Main.AllPlayerKillCooldown[id] = FarseerCooldown.GetFloat();
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public static class Marshall
|
||||
|
||||
public static OptionItem OptionMadmateCanFindMarshall;
|
||||
|
||||
public static bool MadmateCanFindMarshall = false;
|
||||
public static bool MadmateCanFindMarshall;
|
||||
|
||||
private static readonly Dictionary<byte, bool> IsExposed = new();
|
||||
private static readonly Dictionary<byte, bool> IsComplete = new();
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class Monarch
|
||||
public static OptionItem KnightMax;
|
||||
|
||||
|
||||
private static int KnightLimit = new();
|
||||
private static int KnightLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ internal class Monitor
|
||||
}
|
||||
public static bool IsEnable => playerIdList.Any();
|
||||
|
||||
private static int Count = 0;
|
||||
private static int Count;
|
||||
public static void FixedUpdate()
|
||||
{
|
||||
if (!IsEnable) return;
|
||||
|
||||
@@ -19,7 +19,7 @@ public static class SabotageMaster
|
||||
public static OptionItem UsesUsedWhenFixingLightsOrComms;
|
||||
public static float UsedSkillCount;
|
||||
|
||||
private static bool DoorsProgressing = false;
|
||||
private static bool DoorsProgressing;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace TOHE.Roles.Crewmate
|
||||
private static Dictionary<byte, long> ShowGhostArrowUntil = new();
|
||||
private static Dictionary<byte, long> LastGhostArrowShowTime = new();
|
||||
|
||||
public static byte SpiritualistTarget = new();
|
||||
public static byte SpiritualistTarget;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace TOHE.Roles.Crewmate
|
||||
{
|
||||
private static readonly int Id = 8300;
|
||||
private static List<byte> playerIdList = new();
|
||||
public static bool IsEnable = false;
|
||||
public static bool IsEnable;
|
||||
|
||||
private static OptionItem TrackLimitOpt;
|
||||
private static OptionItem OptionCanSeeLastRoomInMeeting;
|
||||
|
||||
@@ -38,7 +38,7 @@ internal class AntiAdminer
|
||||
}
|
||||
public static bool IsEnable() => playerIdList.Any();
|
||||
|
||||
private static int Count = 0;
|
||||
private static int Count;
|
||||
public static void FixedUpdate()
|
||||
{
|
||||
if (!IsEnable()) return;
|
||||
|
||||
@@ -9,7 +9,7 @@ using static TOHE.Utils;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
internal class Gambler
|
||||
public static class Gambler
|
||||
{
|
||||
private static readonly int Id = 640700;
|
||||
public static List<byte> playerIdList = new();
|
||||
@@ -64,7 +64,7 @@ namespace TOHE.Roles.Impostor
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
HighKCD = FloatOptionItem.Create(Id + 19, "GamblerHighKCD", new(10f, 60f, 2.5f), 30f, TabGroup.ImpostorRoles, false).SetParent(CustomRoleSpawnChances[CustomRoles.Gambler])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
LowKCD = FloatOptionItem.Create(Id + 20, "GamblerLowKCD", new(10f, 60f, 2.5f), 20f, TabGroup.ImpostorRoles, false).SetParent(CustomRoleSpawnChances[CustomRoles.Gambler])
|
||||
LowKCD = FloatOptionItem.Create(Id + 20, "GamblerLowKCD", new(10f, 60f, 2.5f), 17.5f, TabGroup.ImpostorRoles, false).SetParent(CustomRoleSpawnChances[CustomRoles.Gambler])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
TPDelay = IntegerOptionItem.Create(Id + 21, "GamblerKillDelay", new(0, 10, 1), 2, TabGroup.ImpostorRoles, false).SetParent(CustomRoleSpawnChances[CustomRoles.Gambler])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
|
||||
@@ -5,7 +5,7 @@ using static TOHE.Utils;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
internal class Hitman
|
||||
public static class Hitman
|
||||
{
|
||||
private static readonly int Id = 640800;
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
@@ -6,7 +6,7 @@ using static TOHE.Utils;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
internal class Mastermind
|
||||
public static class Mastermind
|
||||
{
|
||||
private static readonly int Id = 640600;
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
@@ -8,7 +8,7 @@ using static TOHE.Utils;
|
||||
|
||||
namespace TOHE.Roles.Impostor
|
||||
{
|
||||
internal class RiftMaker
|
||||
public static class RiftMaker
|
||||
{
|
||||
private static readonly int Id = 640900;
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
@@ -24,7 +24,7 @@ public static class Swooper
|
||||
public static Dictionary<byte, long> lastTime = new();
|
||||
private static Dictionary<byte, int> ventedId = new();
|
||||
public static Dictionary<byte, float> SwoopLimit = new();
|
||||
private static int CD = 0;
|
||||
private static int CD;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -76,7 +76,7 @@ public static class Swooper
|
||||
=> GameStates.IsInTask && !InvisTime.ContainsKey(id) && !lastTime.ContainsKey(id);
|
||||
public static bool IsInvis(byte id) => InvisTime.ContainsKey(id);
|
||||
|
||||
private static long lastFixedTime = 0;
|
||||
private static long lastFixedTime;
|
||||
public static void AfterMeetingTasks()
|
||||
{
|
||||
lastTime = new();
|
||||
|
||||
@@ -47,7 +47,7 @@ public static class Vampire
|
||||
PlayerIdList.Add(playerId);
|
||||
}
|
||||
|
||||
public static bool IsEnable = false;
|
||||
public static bool IsEnable;
|
||||
public static bool IsThisRole(byte playerId) => PlayerIdList.Contains(playerId);
|
||||
|
||||
public static bool OnCheckMurder(PlayerControl killer, PlayerControl target)
|
||||
|
||||
@@ -8,7 +8,7 @@ public static class Agitater
|
||||
{
|
||||
private static readonly int Id = 12420;
|
||||
public static List<byte> playerIdList = new();
|
||||
public static bool IsEnable = false;
|
||||
public static bool IsEnable;
|
||||
|
||||
public static OptionItem BombExplodeCooldown;
|
||||
public static OptionItem PassCooldown;
|
||||
@@ -19,9 +19,9 @@ public static class Agitater
|
||||
|
||||
public static byte CurrentBombedPlayer = byte.MaxValue;
|
||||
public static byte LastBombedPlayer = byte.MaxValue;
|
||||
public static bool AgitaterHasBombed = false;
|
||||
public static long CurrentBombedPlayerTime = new();
|
||||
public static long AgitaterBombedTime = new();
|
||||
public static bool AgitaterHasBombed;
|
||||
public static long CurrentBombedPlayerTime;
|
||||
public static long AgitaterBombedTime;
|
||||
|
||||
|
||||
public static void SetupCustomOption()
|
||||
|
||||
@@ -24,7 +24,7 @@ public static class Amnesiac
|
||||
"Role.Maverick",
|
||||
};
|
||||
|
||||
private static int RememberLimit = new();
|
||||
private static int RememberLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ public static class Bandit
|
||||
{
|
||||
private static readonly int Id = 18420;
|
||||
private static List<byte> playerIdList = new();
|
||||
public static bool IsEnable = false;
|
||||
public static bool IsEnable;
|
||||
|
||||
private static OptionItem KillCooldown;
|
||||
public static OptionItem MaxSteals;
|
||||
|
||||
@@ -17,7 +17,7 @@ public static class CursedSoul
|
||||
public static OptionItem CurseMax;
|
||||
public static OptionItem KnowTargetRole;
|
||||
public static OptionItem CanCurseNeutral;
|
||||
private static int CurseLimit = new();
|
||||
private static int CurseLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -12,9 +12,9 @@ public static class Doomsayer
|
||||
public static List<CustomRoles> GuessedRoles = new();
|
||||
public static Dictionary<byte, int> GuessingToWin = new();
|
||||
|
||||
public static int GuessesCount = 0;
|
||||
public static int GuessesCountPerMeeting = 0;
|
||||
public static bool CantGuess = false;
|
||||
public static int GuessesCount;
|
||||
public static int GuessesCountPerMeeting;
|
||||
public static bool CantGuess;
|
||||
|
||||
public static OptionItem DoomsayerAmountOfGuessesToWin;
|
||||
public static OptionItem DCanGuessImpostors;
|
||||
|
||||
@@ -30,7 +30,7 @@ public static class Glitch
|
||||
public static long LastKill;
|
||||
public static long LastMimic;
|
||||
|
||||
private static bool isShifted = false;
|
||||
private static bool isShifted;
|
||||
// public static OptionItem CanUseSabotage;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
|
||||
@@ -22,7 +22,7 @@ public static class Infectious
|
||||
public static OptionItem HideBittenRolesOnEject;
|
||||
|
||||
|
||||
private static int BiteLimit = new();
|
||||
private static int BiteLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ public static class Mafioso
|
||||
public static OptionItem CanVent;
|
||||
private static OptionItem HasImpostorVision;
|
||||
|
||||
public static bool CanKill = false;
|
||||
public static bool CanKill;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -143,7 +143,7 @@ public static class Magician
|
||||
pc.SetKillCooldown(time: LowKCD.GetFloat());
|
||||
CardId = byte.MaxValue;
|
||||
break;
|
||||
case 3: // TP to nearest vent
|
||||
case 3: // TP to random vent
|
||||
var vents = Object.FindObjectsOfType<Vent>();
|
||||
var vent = vents[IRandom.Instance.Next(0, vents.Count)];
|
||||
TP(pc.NetTransform, new Vector2(vent.transform.position.x, vent.transform.position.y));
|
||||
|
||||
@@ -172,7 +172,7 @@ public static class Pelican
|
||||
SyncEatenList(pc);
|
||||
}
|
||||
|
||||
private static int Count = 0;
|
||||
private static int Count;
|
||||
public static void OnFixedUpdate()
|
||||
{
|
||||
if (!GameStates.IsInTask)
|
||||
|
||||
@@ -115,7 +115,7 @@ public static class Postman
|
||||
var sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine(baseText);
|
||||
if (Target != byte.MaxValue) sb.AppendLine(string.Format(Translator.GetString("PostmanGetNewTarget"), Utils.GetPlayerById(Target)));
|
||||
if (!IsFinished) sb.AppendLine(string.Format(Translator.GetString("PostmanGetNewTarget"), Utils.GetPlayerById(Target)));
|
||||
else sb.AppendLine(Translator.GetString("PostmanDone"));
|
||||
|
||||
pc.Notify(sb.ToString());
|
||||
@@ -125,7 +125,7 @@ public static class Postman
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
|
||||
if (Target != byte.MaxValue) sb.AppendLine(string.Format(Translator.GetString("PostmanTarget"), Utils.GetPlayerById(Target)));
|
||||
if (!IsFinished) sb.AppendLine(string.Format(Translator.GetString("PostmanTarget"), Utils.GetPlayerById(Target)));
|
||||
else sb.AppendLine(Translator.GetString("PostmanDone"));
|
||||
|
||||
return sb.ToString();
|
||||
@@ -133,6 +133,6 @@ public static class Postman
|
||||
|
||||
public static string GetProgressText(byte playerId)
|
||||
{
|
||||
return Target != byte.MaxValue ? string.Format(Translator.GetString("PostmanTarget"), Utils.GetPlayerById(Target)) : string.Empty;
|
||||
return !IsFinished ? string.Format(Translator.GetString("PostmanTarget"), Utils.GetPlayerById(Target)) : string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -15,9 +15,9 @@ public static class Romantic
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
private static readonly int MaxBetTimes = 1;
|
||||
public static bool isProtect = false;
|
||||
public static bool isProtect;
|
||||
public static bool isRomanticAlive = true;
|
||||
public static bool isPartnerProtected = false;
|
||||
public static bool isPartnerProtected;
|
||||
|
||||
public static OptionItem BetCooldown;
|
||||
private static OptionItem ProtectCooldown;
|
||||
@@ -225,7 +225,7 @@ public static class VengefulRomantic
|
||||
{
|
||||
public static List<byte> playerIdList = new();
|
||||
|
||||
public static bool hasKilledKiller = false;
|
||||
public static bool hasKilledKiller;
|
||||
public static Dictionary<byte, byte> VengefulTarget = new();
|
||||
|
||||
public static void Init()
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TOHE.Roles.Neutral
|
||||
{
|
||||
private static readonly int Id = 13400;
|
||||
private static List<byte> playerIdList = new();
|
||||
private static int SpiritLimit = new();
|
||||
private static int SpiritLimit;
|
||||
|
||||
private static Dictionary<byte, long> PlayersHaunted = new();
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace TOHE.Roles.Neutral
|
||||
private static OptionItem SpiritCauseVision;
|
||||
private static OptionItem SpiritCauseVisionTime;
|
||||
|
||||
private static long ProtectTimeStamp = new();
|
||||
private static long ProtectTimeStamp;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public static class Succubus
|
||||
"CharmedCountMode.Original",
|
||||
};
|
||||
|
||||
private static int CharmLimit = new();
|
||||
private static int CharmLimit;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -17,11 +17,11 @@ public static class Vengeance
|
||||
private static OptionItem HasImpostorVision;
|
||||
private static OptionItem RevengeTime;
|
||||
|
||||
private static bool IsRevenge = false;
|
||||
private static int Timer = 0;
|
||||
private static bool Success = false;
|
||||
private static PlayerControl Killer = null;
|
||||
private static float tempKillTimer = 0;
|
||||
private static bool IsRevenge;
|
||||
private static int Timer;
|
||||
private static bool Success;
|
||||
private static PlayerControl Killer;
|
||||
private static float tempKillTimer;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace TOHE.Roles.Neutral
|
||||
{
|
||||
private static readonly int Id = 13200;
|
||||
private static List<byte> playerIdList = new();
|
||||
private static int InfectLimit = new();
|
||||
private static int InfectLimit;
|
||||
public static List<byte> InfectedPlayer = new();
|
||||
|
||||
private static OptionItem KillCooldown;
|
||||
|
||||
@@ -22,7 +22,7 @@ public static class Werewolf
|
||||
|
||||
private static Dictionary<byte, long> RampageTime = new();
|
||||
public static Dictionary<byte, long> lastTime = new();
|
||||
private static int CD = 0;
|
||||
private static int CD;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public static class Werewolf
|
||||
=> GameStates.IsInTask && !RampageTime.ContainsKey(id) && !lastTime.ContainsKey(id);
|
||||
public static bool IsRampaging(byte id) => RampageTime.ContainsKey(id);
|
||||
|
||||
private static long lastFixedTime = 0;
|
||||
private static long lastFixedTime;
|
||||
public static void AfterMeetingTasks()
|
||||
{
|
||||
lastTime = new();
|
||||
|
||||
@@ -21,7 +21,7 @@ public static class Wraith
|
||||
private static Dictionary<byte, long> InvisTime = new();
|
||||
public static Dictionary<byte, long> lastTime = new();
|
||||
private static Dictionary<byte, int> ventedId = new();
|
||||
private static int CD = 0;
|
||||
private static int CD;
|
||||
|
||||
public static void SetupCustomOption()
|
||||
{
|
||||
@@ -71,7 +71,7 @@ public static class Wraith
|
||||
=> GameStates.IsInTask && !InvisTime.ContainsKey(id) && !lastTime.ContainsKey(id);
|
||||
public static bool IsInvis(byte id) => InvisTime.ContainsKey(id);
|
||||
|
||||
private static long lastFixedTime = 0;
|
||||
private static long lastFixedTime;
|
||||
public static void AfterMeetingTasks()
|
||||
{
|
||||
lastTime = new();
|
||||
|
||||
@@ -46,10 +46,10 @@ public class Main : BasePlugin
|
||||
public Harmony Harmony { get; } = new Harmony(PluginGuid);
|
||||
public static Version version = Version.Parse(PluginVersion);
|
||||
public static BepInEx.Logging.ManualLogSource Logger;
|
||||
public static bool hasArgumentException = false;
|
||||
public static bool hasArgumentException;
|
||||
public static string ExceptionMessage;
|
||||
public static bool ExceptionMessageIsShown = false;
|
||||
public static bool AlreadyShowMsgBox = false;
|
||||
public static bool ExceptionMessageIsShown;
|
||||
public static bool AlreadyShowMsgBox;
|
||||
public static string credentialsText;
|
||||
public static NormalGameOptionsV07 NormalOptions => GameOptionsManager.Instance.currentNormalGameOptions;
|
||||
//Client Options
|
||||
@@ -87,7 +87,7 @@ public class Main : BasePlugin
|
||||
public static Dictionary<byte, PlayerState.DeathReason> AfterMeetingDeathPlayers = new();
|
||||
public static Dictionary<CustomRoles, string> roleColors;
|
||||
public static bool IsFixedCooldown => CustomRoles.Vampire.IsEnable() || CustomRoles.Poisoner.IsEnable();
|
||||
public static float RefixCooldownDelay = 0f;
|
||||
public static float RefixCooldownDelay;
|
||||
public static bool ProcessShapeshifts = true;
|
||||
public static Dictionary<byte, long> DoormasterCD = new();
|
||||
public static Dictionary<byte, long> HackerCD = new();
|
||||
@@ -121,7 +121,7 @@ public class Main : BasePlugin
|
||||
public static List<string> winnerNameList = new();
|
||||
public static List<int> clientIdList = new();
|
||||
public static List<(string, byte, string)> MessagesToSend = new();
|
||||
public static bool isChatCommand = false;
|
||||
public static bool isChatCommand;
|
||||
public static List<PlayerControl> LoversPlayers = new();
|
||||
public static bool isLoversDead = true;
|
||||
public static Dictionary<byte, float> AllPlayerKillCooldown = new();
|
||||
@@ -137,7 +137,7 @@ public class Main : BasePlugin
|
||||
public static Dictionary<byte, long> ExpressSpeedUp = new();
|
||||
public static float ExpressSpeedNormal;
|
||||
public static List<int> BlockedVents = new();
|
||||
public static float VentguardNumberOfAbilityUses = 0;
|
||||
public static float VentguardNumberOfAbilityUses;
|
||||
public static List<byte> WorkaholicAlive = new();
|
||||
public static List<byte> SpeedrunnerAlive = new();
|
||||
public static List<byte> BaitAlive = new();
|
||||
@@ -151,9 +151,9 @@ public class Main : BasePlugin
|
||||
public static Dictionary<byte, string> DetectiveNotify = new();
|
||||
public static Dictionary<byte, string> VirusNotify = new();
|
||||
public static List<byte> OverDeadPlayerList = new();
|
||||
public static bool DoBlockNameChange = false;
|
||||
public static bool DoBlockNameChange;
|
||||
public static int updateTime;
|
||||
public static bool newLobby = false;
|
||||
public static bool newLobby;
|
||||
public static Dictionary<int, int> SayStartTimes = new();
|
||||
public static Dictionary<int, int> SayBanwordsTimes = new();
|
||||
public static Dictionary<byte, float> AllPlayerSpeed = new();
|
||||
@@ -209,9 +209,9 @@ public class Main : BasePlugin
|
||||
public static Dictionary<(byte, byte), string> targetArrows = new();
|
||||
public static Dictionary<byte, Vector2> EscapeeLocation = new();
|
||||
public static Dictionary<byte, Vector2> TimeMasterLocation = new();
|
||||
public static bool VisibleTasksCount = false;
|
||||
public static bool VisibleTasksCount;
|
||||
public static string nickName = "";
|
||||
public static bool introDestroyed = false;
|
||||
public static bool introDestroyed;
|
||||
public static int DiscussionTime;
|
||||
public static int VotingTime;
|
||||
public static byte currentDousingTarget = byte.MaxValue;
|
||||
@@ -223,8 +223,8 @@ public class Main : BasePlugin
|
||||
public static bool ResetOptions = true;
|
||||
public static byte FirstDied = byte.MaxValue;
|
||||
public static byte ShieldPlayer = byte.MaxValue;
|
||||
public static int MadmateNum = 0;
|
||||
public static int BardCreations = 0;
|
||||
public static int MadmateNum;
|
||||
public static int BardCreations;
|
||||
public static Dictionary<byte, byte> Provoked = new();
|
||||
public static Dictionary<byte, float> DovesOfNeaceNumOfUsed = new();
|
||||
|
||||
|
||||
Reference in new issue
Block a user