mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
More settings & Optimize & A little something for April Fools :) HF
This commit is contained in:
1 parent
d58338988c
commit
9fae719e1b
12 files changed
+282
-26
No files matched your search
@@ -5,6 +5,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EHR/@EntryIndexedValue">EHR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FFA/@EntryIndexedValue">FFA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FFF/@EntryIndexedValue">FFF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FPS/@EntryIndexedValue">FPS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GM/@EntryIndexedValue">GM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HUD/@EntryIndexedValue">HUD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RPC/@EntryIndexedValue">RPC</s:String>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace EHR
|
||||
public static void AssignRoles(ref Dictionary<PlayerControl, CustomRoles> result)
|
||||
{
|
||||
List<PlayerControl> allPlayers = [.. Main.AllAlivePlayerControls];
|
||||
allPlayers.Shuffle(IRandom.Instance);
|
||||
allPlayers = allPlayers.Shuffle(IRandom.Instance).ToList();
|
||||
|
||||
int seekerNum = Main.RealOptionsData.GetInt(Int32OptionNames.NumImpostors);
|
||||
int seekerNum = Math.Min(Main.RealOptionsData.GetInt(Int32OptionNames.NumImpostors), 1);
|
||||
|
||||
Dictionary<CustomRoles, int> roles = Assembly
|
||||
.GetExecutingAssembly()
|
||||
|
||||
+16
-10
@@ -26,7 +26,6 @@ public class ClientOptionItem
|
||||
|
||||
var mouseMoveToggle = optionsMenuBehaviour.DisableMouseMovement;
|
||||
|
||||
// 1つ目のボタンの生成時に背景も生成
|
||||
if (CustomBackground == null)
|
||||
{
|
||||
numOptions = 0;
|
||||
@@ -48,15 +47,19 @@ public class ClientOptionItem
|
||||
UiElement[] selectableButtons = optionsMenuBehaviour.ControllerSelectable.ToArray();
|
||||
PassiveButton leaveButton = null;
|
||||
PassiveButton returnButton = null;
|
||||
for (int i = 0; i < selectableButtons.Length; i++)
|
||||
foreach (var button in selectableButtons)
|
||||
{
|
||||
var button = selectableButtons[i];
|
||||
if (button == null) continue;
|
||||
|
||||
if (button.name == "LeaveGameButton")
|
||||
leaveButton = button.GetComponent<PassiveButton>();
|
||||
else if (button.name == "ReturnToGameButton")
|
||||
returnButton = button.GetComponent<PassiveButton>();
|
||||
switch (button.name)
|
||||
{
|
||||
case "LeaveGameButton":
|
||||
leaveButton = button.GetComponent<PassiveButton>();
|
||||
break;
|
||||
case "ReturnToGameButton":
|
||||
returnButton = button.GetComponent<PassiveButton>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var generalTab = mouseMoveToggle.transform.parent.parent.parent;
|
||||
@@ -70,8 +73,11 @@ public class ClientOptionItem
|
||||
modOptionsPassiveButton.OnClick = new();
|
||||
modOptionsPassiveButton.OnClick.AddListener(new Action(() => { CustomBackground.gameObject.SetActive(true); }));
|
||||
|
||||
if (leaveButton != null)
|
||||
if (leaveButton != null && leaveButton.transform != null)
|
||||
{
|
||||
leaveButton.transform.localPosition = new(-1.35f, -2.411f, -1f);
|
||||
}
|
||||
|
||||
if (returnButton != null)
|
||||
returnButton.transform.localPosition = new(1.35f, -2.411f, -1f);
|
||||
}
|
||||
@@ -89,7 +95,7 @@ public class ClientOptionItem
|
||||
passiveButton.OnClick = new();
|
||||
passiveButton.OnClick.AddListener(new Action(() =>
|
||||
{
|
||||
config.Value = !config.Value;
|
||||
if (config != null) config.Value = !config.Value;
|
||||
UpdateToggle();
|
||||
additionalOnClickAction?.Invoke();
|
||||
}));
|
||||
@@ -114,7 +120,7 @@ public class ClientOptionItem
|
||||
{
|
||||
if (ToggleButton == null) return;
|
||||
|
||||
var color = Config.Value ? new(255, 192, 203, byte.MaxValue) : new Color32(77, 77, 77, byte.MaxValue);
|
||||
var color = Config is { Value: true } ? new(255, 192, 203, byte.MaxValue) : new Color32(77, 77, 77, byte.MaxValue);
|
||||
ToggleButton.Background.color = color;
|
||||
ToggleButton.Rollover?.ChangeOutColor(color);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ internal static class CustomRoleSelector
|
||||
foreach (var role in EnumHelper.GetAllValues<CustomRoles>())
|
||||
{
|
||||
int chance = role.GetMode();
|
||||
if (role.IsVanilla() || chance == 0 || role.IsAdditionRole() || (role.OnlySpawnsWithPets() && !Options.UsePets.GetBool())) continue;
|
||||
if (role.IsVanilla() || chance == 0 || role.IsAdditionRole() || (role.OnlySpawnsWithPets() && !Options.UsePets.GetBool()) || (role != CustomRoles.Randomizer && role.IsCrewmate() && Options.AprilFoolsMode.GetBool())) continue;
|
||||
switch (role)
|
||||
{
|
||||
case CustomRoles.Commander when optImpNum <= 1 && Commander.CannotSpawnAsSoloImp.GetBool():
|
||||
@@ -155,6 +155,13 @@ internal static class CustomRoleSelector
|
||||
}
|
||||
|
||||
int count = role.GetCount();
|
||||
|
||||
if (role == CustomRoles.Randomizer && Options.AprilFoolsMode.GetBool())
|
||||
{
|
||||
chance = 100;
|
||||
count = 15;
|
||||
}
|
||||
|
||||
RoleAssignInfo info = new(role, chance, count);
|
||||
|
||||
if (role.IsImpostor()) Roles[RoleAssignType.Impostor].Add(info);
|
||||
|
||||
@@ -10,6 +10,7 @@ namespace EHR;
|
||||
|
||||
/*
|
||||
* Roles that use the same code as another role:
|
||||
*
|
||||
* Nuker = Bomber
|
||||
* Undertaker = Assassin
|
||||
* Chameleon = Swooper
|
||||
|
||||
@@ -740,6 +740,9 @@ public static class Options
|
||||
|
||||
public static OptionItem SpawnAdditionalRefugeeOnImpsDead;
|
||||
public static OptionItem SpawnAdditionalRefugeeWhenNKAlive;
|
||||
public static OptionItem SpawnAdditionalRefugeeMinAlivePlayers;
|
||||
|
||||
public static OptionItem AprilFoolsMode;
|
||||
|
||||
|
||||
// 投票モード
|
||||
@@ -1733,6 +1736,15 @@ public static class Options
|
||||
.SetGameMode(CustomGameMode.Standard)
|
||||
.SetColor(Color.magenta)
|
||||
.SetParent(SpawnAdditionalRefugeeOnImpsDead);
|
||||
SpawnAdditionalRefugeeMinAlivePlayers = IntegerOptionItem.Create(23859, "SpawnAdditionalRefugeeMinAlivePlayers", new(1, 14, 1), 7, TabGroup.TaskSettings, false)
|
||||
.SetGameMode(CustomGameMode.Standard)
|
||||
.SetColor(Color.magenta)
|
||||
.SetParent(SpawnAdditionalRefugeeOnImpsDead);
|
||||
|
||||
AprilFoolsMode = BooleanOptionItem.Create(23860, "AprilFoolsMode", Main.IsAprilFools, TabGroup.TaskSettings, false)
|
||||
.SetGameMode(CustomGameMode.Standard)
|
||||
.SetHeader(true)
|
||||
.SetColor(new Color32(255, 153, 153, byte.MaxValue));
|
||||
|
||||
|
||||
//Disable Short Tasks
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
using HarmonyLib;
|
||||
using Il2CppSystem;
|
||||
using static CosmeticsLayer;
|
||||
|
||||
namespace EHR.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(AprilFoolsMode), nameof(AprilFoolsMode.ShouldShowAprilFoolsToggle))]
|
||||
public static class ShouldShowTogglePatch
|
||||
{
|
||||
public static void Postfix(ref bool __result)
|
||||
{
|
||||
__result = false;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(NormalGameManager), nameof(NormalGameManager.GetBodyType))]
|
||||
public static class GetNormalBodyTypePatch
|
||||
{
|
||||
public static void Postfix(ref PlayerBodyTypes __result)
|
||||
{
|
||||
if (Main.HorseMode.Value)
|
||||
{
|
||||
__result = PlayerBodyTypes.Horse;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Main.LongMode.Value)
|
||||
{
|
||||
__result = PlayerBodyTypes.Long;
|
||||
return;
|
||||
}
|
||||
|
||||
__result = PlayerBodyTypes.Normal;
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(HideAndSeekManager), nameof(HideAndSeekManager.GetBodyType))]
|
||||
public static class GetHnsBodyTypePatch
|
||||
{
|
||||
public static void Postfix(ref PlayerBodyTypes __result, [HarmonyArgument(0)] PlayerControl player)
|
||||
{
|
||||
if (player == null || player.Data == null || player.Data.Role == null)
|
||||
{
|
||||
if (Main.HorseMode.Value)
|
||||
{
|
||||
__result = PlayerBodyTypes.Horse;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Main.LongMode.Value)
|
||||
{
|
||||
__result = PlayerBodyTypes.Long;
|
||||
return;
|
||||
}
|
||||
|
||||
__result = PlayerBodyTypes.Normal;
|
||||
}
|
||||
else if (Main.HorseMode.Value)
|
||||
{
|
||||
if (player.Data.Role.IsImpostor)
|
||||
{
|
||||
__result = PlayerBodyTypes.Normal;
|
||||
return;
|
||||
}
|
||||
|
||||
__result = PlayerBodyTypes.Horse;
|
||||
}
|
||||
else if (Main.LongMode.Value)
|
||||
{
|
||||
if (player.Data.Role.IsImpostor)
|
||||
{
|
||||
__result = PlayerBodyTypes.LongSeeker;
|
||||
return;
|
||||
}
|
||||
|
||||
__result = PlayerBodyTypes.Long;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.Data.Role.IsImpostor)
|
||||
{
|
||||
__result = PlayerBodyTypes.Seeker;
|
||||
return;
|
||||
}
|
||||
|
||||
__result = PlayerBodyTypes.Normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(LongBoiPlayerBody))]
|
||||
public static class LongBoiPatches
|
||||
{
|
||||
[HarmonyPatch(nameof(LongBoiPlayerBody.Awake))]
|
||||
[HarmonyPrefix]
|
||||
public static bool LongBoyAwake_Patch(LongBoiPlayerBody __instance)
|
||||
{
|
||||
__instance.cosmeticLayer.OnSetBodyAsGhost += (Action)__instance.SetPoolableGhost;
|
||||
__instance.cosmeticLayer.OnColorChange += (Action<int>)__instance.SetHeightFromColor;
|
||||
__instance.cosmeticLayer.OnCosmeticSet += (Action<string, int, CosmeticKind>)__instance.OnCosmeticSet;
|
||||
__instance.gameObject.layer = 8;
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(LongBoiPlayerBody.Start))]
|
||||
[HarmonyPrefix]
|
||||
public static bool LongBoyStart_Patch(LongBoiPlayerBody __instance)
|
||||
{
|
||||
__instance.ShouldLongAround = true;
|
||||
if (__instance.hideCosmeticsQC)
|
||||
{
|
||||
__instance.cosmeticLayer.SetHatVisorVisible(false);
|
||||
}
|
||||
|
||||
__instance.SetupNeckGrowth();
|
||||
if (__instance.isExiledPlayer)
|
||||
{
|
||||
ShipStatus instance = ShipStatus.Instance;
|
||||
if (instance == null || instance.Type != ShipStatus.MapType.Fungle)
|
||||
{
|
||||
__instance.cosmeticLayer.AdjustCosmeticRotations(-17.75f);
|
||||
}
|
||||
}
|
||||
|
||||
if (!__instance.isPoolablePlayer)
|
||||
{
|
||||
__instance.cosmeticLayer.ValidateCosmetics();
|
||||
}
|
||||
|
||||
if (__instance.myPlayerControl)
|
||||
{
|
||||
__instance.StopAllCoroutines();
|
||||
__instance.SetHeightFromColor(__instance.myPlayerControl.Data.DefaultOutfit.ColorId);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(LongBoiPlayerBody.SetHeighFromDistanceHnS))]
|
||||
[HarmonyPrefix]
|
||||
public static bool LongBoyNeckSize_Patch(LongBoiPlayerBody __instance, ref float distance)
|
||||
{
|
||||
__instance.targetHeight = distance / 10f + 0.5f;
|
||||
__instance.SetupNeckGrowth(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(HatManager), nameof(HatManager.CheckLongModeValidCosmetic))]
|
||||
[HarmonyPrefix]
|
||||
public static bool CheckLongMode_Patch(HatManager __instance, out bool __result, ref string cosmeticID, ref bool ignoreLongMode)
|
||||
{
|
||||
if (AprilFoolsMode.ShouldHorseAround() || AprilFoolsMode.ShouldLongAround())
|
||||
{
|
||||
__result = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (string.Equals("skin_rhm", cosmeticID))
|
||||
{
|
||||
__result = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
__result = true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ public static class OptionsMenuBehaviourStartPatch
|
||||
private static ClientOptionItem EnableCustomSoundEffect;
|
||||
private static ClientOptionItem SwitchVanilla;
|
||||
private static ClientOptionItem DarkTheme;
|
||||
private static ClientOptionItem HorseMode;
|
||||
private static ClientOptionItem LongMode;
|
||||
#if DEBUG
|
||||
private static ClientOptionItem VersionCheat;
|
||||
private static ClientOptionItem GodMode;
|
||||
@@ -26,6 +28,7 @@ public static class OptionsMenuBehaviourStartPatch
|
||||
if (__instance.DisableMouseMovement == null) return;
|
||||
|
||||
Main.SwitchVanilla.Value = false;
|
||||
|
||||
if (Main.ResetOptions || !DebugModeManager.AmDebugger)
|
||||
{
|
||||
Main.ResetOptions = false;
|
||||
@@ -48,9 +51,11 @@ public static class OptionsMenuBehaviourStartPatch
|
||||
Logger.SendInGame(string.Format(Translator.GetString("FPSSetTo"), Application.targetFrameRate));
|
||||
}
|
||||
}
|
||||
|
||||
if (AutoStart == null || AutoStart.ToggleButton == null)
|
||||
{
|
||||
AutoStart = ClientOptionItem.Create("AutoStart", Main.AutoStart, __instance, AutoStartButtonToggle);
|
||||
|
||||
static void AutoStartButtonToggle()
|
||||
{
|
||||
if (Main.AutoStart.Value == false && GameStates.IsCountDown)
|
||||
@@ -60,35 +65,83 @@ public static class OptionsMenuBehaviourStartPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ForceOwnLanguage == null || ForceOwnLanguage.ToggleButton == null)
|
||||
{
|
||||
ForceOwnLanguage = ClientOptionItem.Create("ForceOwnLanguage", Main.ForceOwnLanguage, __instance);
|
||||
}
|
||||
|
||||
if (ForceOwnLanguageRoleName == null || ForceOwnLanguageRoleName.ToggleButton == null)
|
||||
{
|
||||
ForceOwnLanguageRoleName = ClientOptionItem.Create("ForceOwnLanguageRoleName", Main.ForceOwnLanguageRoleName, __instance);
|
||||
}
|
||||
|
||||
if (EnableCustomButton == null || EnableCustomButton.ToggleButton == null)
|
||||
{
|
||||
EnableCustomButton = ClientOptionItem.Create("EnableCustomButton", Main.EnableCustomButton, __instance);
|
||||
}
|
||||
|
||||
if (EnableCustomSoundEffect == null || EnableCustomSoundEffect.ToggleButton == null)
|
||||
{
|
||||
EnableCustomSoundEffect = ClientOptionItem.Create("EnableCustomSoundEffect", Main.EnableCustomSoundEffect, __instance);
|
||||
}
|
||||
|
||||
if (SwitchVanilla == null || SwitchVanilla.ToggleButton == null)
|
||||
{
|
||||
SwitchVanilla = ClientOptionItem.Create("SwitchVanilla", Main.SwitchVanilla, __instance, SwitchVanillaButtonToggle);
|
||||
|
||||
static void SwitchVanillaButtonToggle()
|
||||
{
|
||||
Harmony.UnpatchAll();
|
||||
Main.Instance.Unload();
|
||||
}
|
||||
}
|
||||
|
||||
if (DarkTheme == null || DarkTheme.ToggleButton == null)
|
||||
{
|
||||
DarkTheme = ClientOptionItem.Create("EnableDarkTheme", Main.DarkTheme, __instance);
|
||||
}
|
||||
|
||||
if (HorseMode == null || HorseMode.ToggleButton == null)
|
||||
{
|
||||
HorseMode = ClientOptionItem.Create("HorseMode", Main.HorseMode, __instance, SwitchHorseMode);
|
||||
|
||||
static void SwitchHorseMode()
|
||||
{
|
||||
Main.LongMode.Value = false;
|
||||
HorseMode.UpdateToggle();
|
||||
LongMode.UpdateToggle();
|
||||
foreach (var pc in Main.AllPlayerControls)
|
||||
{
|
||||
pc.MyPhysics.SetBodyType(pc.BodyType);
|
||||
if (pc.BodyType == PlayerBodyTypes.Normal)
|
||||
{
|
||||
pc.cosmetics.currentBodySprite.BodySprite.transform.localScale = new(0.5f, 0.5f, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (LongMode == null || LongMode.ToggleButton == null)
|
||||
{
|
||||
LongMode = ClientOptionItem.Create("LongMode", Main.LongMode, __instance, SwitchLongMode);
|
||||
|
||||
static void SwitchLongMode()
|
||||
{
|
||||
Main.HorseMode.Value = false;
|
||||
HorseMode.UpdateToggle();
|
||||
LongMode.UpdateToggle();
|
||||
foreach (var pc in Main.AllPlayerControls)
|
||||
{
|
||||
pc.MyPhysics.SetBodyType(pc.BodyType);
|
||||
if (pc.BodyType == PlayerBodyTypes.Normal)
|
||||
{
|
||||
pc.cosmetics.currentBodySprite.BodySprite.transform.localScale = new(0.5f, 0.5f, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
if ((VersionCheat == null || VersionCheat.ToggleButton == null) && DebugModeManager.AmDebugger)
|
||||
{
|
||||
|
||||
@@ -163,7 +163,7 @@ class ExileControllerWrapUpPatch
|
||||
if (map != null) Main.AllAlivePlayerControls.Do(map.RandomTeleport);
|
||||
}
|
||||
|
||||
if (exiled != null && Options.SpawnAdditionalRefugeeOnImpsDead.GetBool() && !Main.AllAlivePlayerControls.Any(x => x.PlayerId != exiled.PlayerId && (x.Is(CustomRoleTypes.Impostor) || (x.IsNeutralKiller() && Options.SpawnAdditionalRefugeeWhenNKAlive.GetBool()))))
|
||||
if (exiled != null && Options.SpawnAdditionalRefugeeOnImpsDead.GetBool() && Main.AllAlivePlayerControls.Length >= Options.SpawnAdditionalRefugeeMinAlivePlayers.GetInt() && !CustomRoles.Refugee.RoleExist(countDead: true) && !Main.AllAlivePlayerControls.Any(x => x.PlayerId != exiled.PlayerId && (x.Is(CustomRoleTypes.Impostor) || (x.IsNeutralKiller() && Options.SpawnAdditionalRefugeeWhenNKAlive.GetBool()))))
|
||||
{
|
||||
PlayerControl[] ListToChooseFrom = Options.UsePets.GetBool() ? Main.AllAlivePlayerControls.Where(x => x.PlayerId != exiled.PlayerId && x.Is(CustomRoleTypes.Crewmate)).ToArray() : Main.AllAlivePlayerControls.Where(x => x.PlayerId != exiled.PlayerId && x.Is(CustomRoleTypes.Crewmate) && x.GetCustomRole().GetRoleTypes() == RoleTypes.Impostor).ToArray();
|
||||
|
||||
@@ -172,7 +172,6 @@ class ExileControllerWrapUpPatch
|
||||
var index = IRandom.Instance.Next(0, ListToChooseFrom.Length);
|
||||
var pc = ListToChooseFrom[index];
|
||||
pc.RpcSetCustomRole(CustomRoles.Refugee);
|
||||
pc.ResetKillCooldown();
|
||||
pc.SetKillCooldown();
|
||||
Logger.Warn($"{pc.GetRealName()} is now a Refugee since all Impostors are dead", "Add Refugee");
|
||||
}
|
||||
|
||||
@@ -2892,6 +2892,9 @@
|
||||
"WhackAMole": "Whack-A-Mole",
|
||||
"SpawnAdditionalRefugeeOnImpsDead": "Random <#8cffff>Crewmate</color> Turns To <#ff1919>Renegade</color> When All <#ff1919>Impostors</color> Die",
|
||||
"SpawnAdditionalRefugeeWhenNKAlive": "Spawn Even If a <#ffab1b>Neutral Killer</color> is Alive",
|
||||
"SpawnAdditionalRefugeeMinAlivePlayers": "Minimum Number of Alive Players to Spawn",
|
||||
"HorseMode": "Horse Mode",
|
||||
"LongMode": "Long Mode",
|
||||
"NoPetActionMsg1": "You just ate a cookie",
|
||||
"NoPetActionMsg2": "You look around",
|
||||
"NoPetActionMsg3": "You start wondering whether you are sus or not",
|
||||
|
||||
+14
-11
@@ -99,19 +99,22 @@ public class Werewolf : RoleBase
|
||||
|
||||
var now = Utils.TimeStamp;
|
||||
|
||||
if (lastTime != -10 && !player.IsModClient())
|
||||
if (lastTime != -10)
|
||||
{
|
||||
var cooldown = lastTime + (long)RampageCD.GetFloat() - now;
|
||||
if ((int)cooldown != CD) player.Notify(string.Format(GetString("CDPT"), cooldown + 1), 1.1f);
|
||||
CD = (int)cooldown;
|
||||
}
|
||||
if (!player.IsModClient())
|
||||
{
|
||||
var cooldown = lastTime + (long)RampageCD.GetFloat() - now;
|
||||
if ((int)cooldown != CD) player.Notify(string.Format(GetString("CDPT"), cooldown + 1), 1.1f);
|
||||
CD = (int)cooldown;
|
||||
}
|
||||
|
||||
if (lastTime + (long)RampageCD.GetFloat() < now)
|
||||
{
|
||||
lastTime = -10;
|
||||
if (!player.IsModClient()) player.Notify(GetString("WWCanRampage"));
|
||||
SendRPC();
|
||||
CD = 0;
|
||||
if (lastTime + (long)RampageCD.GetFloat() < now)
|
||||
{
|
||||
lastTime = -10;
|
||||
if (!player.IsModClient()) player.Notify(GetString("WWCanRampage"));
|
||||
SendRPC();
|
||||
CD = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (lastFixedTime != now && RampageTime != -10)
|
||||
|
||||
@@ -64,6 +64,8 @@ public class Main : BasePlugin
|
||||
public static ConfigEntry<bool> VersionCheat { get; private set; }
|
||||
public static ConfigEntry<bool> GodMode { get; private set; }
|
||||
public static ConfigEntry<bool> DarkTheme { get; private set; }
|
||||
public static ConfigEntry<bool> HorseMode { get; private set; }
|
||||
public static ConfigEntry<bool> LongMode { get; private set; }
|
||||
|
||||
public static Dictionary<byte, PlayerVersion> PlayerVersion = [];
|
||||
|
||||
@@ -221,6 +223,8 @@ public class Main : BasePlugin
|
||||
VersionCheat = Config.Bind("Client Options", "VersionCheat", false);
|
||||
GodMode = Config.Bind("Client Options", "GodMode", false);
|
||||
DarkTheme = Config.Bind("Client Options", "DarkTheme", false);
|
||||
HorseMode = Config.Bind("Client Options", "HorseMode", false);
|
||||
LongMode = Config.Bind("Client Options", "LongMode", false);
|
||||
|
||||
Logger = BepInEx.Logging.Logger.CreateLogSource("EHR");
|
||||
EHR.Logger.Enable();
|
||||
|
||||
Reference in new issue
Block a user