mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
some fixes
This commit is contained in:
1 parent
fa14bdaf66
commit
9eb91936ac
11 files changed
+20
-18
No files matched your search
@@ -353,7 +353,7 @@ public static class RoomRush
|
||||
: 6;
|
||||
|
||||
if (SubmergedCompatibility.IsSubmerged()) decontaminationTime = 3;
|
||||
time += decontaminationTime + 3;
|
||||
time += decontaminationTime;
|
||||
}
|
||||
|
||||
switch (map)
|
||||
|
||||
@@ -824,6 +824,9 @@ public class Main : BasePlugin
|
||||
try { HandleRoleColorFiles(); }
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
if (AutoHaunt.Value)
|
||||
Modules.AutoHaunt.Start();
|
||||
|
||||
Logger.Msg("========= EHR loaded! =========", "Plugin Load");
|
||||
Logger.Msg($"EHR Version: {PluginVersion}, Test Build: {TestBuild}", "Plugin Load");
|
||||
};
|
||||
|
||||
+3
-1
@@ -253,6 +253,8 @@ public class CustomLogger
|
||||
if (dump) append += HtmlFooter;
|
||||
File.AppendAllText(LOGFilePath, append);
|
||||
PrivateInstance = null;
|
||||
if (dump) Main.Instance.StopCoroutine(InactivityCheck());
|
||||
#if DEBUG
|
||||
Main.Instance.StopCoroutine(InactivityCheck());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ internal static class ExtendedPlayerControl
|
||||
if (init) Main.PlayerStates[player.PlayerId].InitTask(player);
|
||||
}
|
||||
|
||||
public static HashSet<byte> TempExiled = [];
|
||||
public static readonly HashSet<byte> TempExiled = [];
|
||||
|
||||
public static void ExileTemporarily(this PlayerControl pc)
|
||||
{
|
||||
|
||||
@@ -208,7 +208,7 @@ public class PlayerState(byte playerId)
|
||||
case CustomRoles.Cleansed:
|
||||
replaceAll = true;
|
||||
break;
|
||||
case CustomRoles.BananaMan when !SubRoles.Contains(CustomRoles.BananaMan):
|
||||
case CustomRoles.BananaMan when Main.IntroDestroyed && !SubRoles.Contains(CustomRoles.BananaMan):
|
||||
LateTask.New(() => Utils.RpcChangeSkin(Player, new()), 0.2f, log: false);
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -2080,7 +2080,7 @@ public static class Utils
|
||||
if (Options.FormatNameMode.GetInt() == 1 && Main.NickName == string.Empty)
|
||||
{
|
||||
string notFormattedName = Palette.GetColorName(player.Data.DefaultOutfit.ColorId);
|
||||
name = char.ToUpper(notFormattedName[0]) + notFormattedName.Substring(1).ToLower();
|
||||
name = char.ToUpper(notFormattedName[0]) + notFormattedName[1..].ToLower();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -9,12 +9,12 @@ public static class DeconSystemUpdateSystemPatch
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || SubmergedCompatibility.IsSubmerged()) return;
|
||||
|
||||
if (Options.ChangeDecontaminationTime.GetBool())
|
||||
{
|
||||
bool bedwars = Options.CurrentGameMode == CustomGameMode.BedWars;
|
||||
bool roomrush = Options.CurrentGameMode == CustomGameMode.RoomRush;
|
||||
bool bedwars = Options.CurrentGameMode == CustomGameMode.BedWars;
|
||||
bool roomrush = Options.CurrentGameMode == CustomGameMode.RoomRush;
|
||||
|
||||
__instance.DoorOpenTime = bedwars
|
||||
if (bedwars || roomrush || Options.ChangeDecontaminationTime.GetBool())
|
||||
{
|
||||
__instance.DoorOpenTime = bedwars || roomrush
|
||||
? 2f
|
||||
: Main.CurrentMap switch
|
||||
{
|
||||
|
||||
+3
-3
@@ -827,15 +827,15 @@ internal static class TaskPanelBehaviourPatch
|
||||
{
|
||||
string[] splitted = roleInfo.Split(' ');
|
||||
|
||||
roleWithInfo = splitted.Length <= 3
|
||||
roleWithInfo = $"{GetString($"{Options.CurrentGameMode}")}\r\n" + (splitted.Length <= 3
|
||||
? $"<size=60%>{roleInfo}</size>\r\n"
|
||||
: $"<size=60%>{string.Join(' ', splitted[..3])}\r\n{string.Join(' ', splitted[3..])}</size>\r\n";
|
||||
: $"<size=60%>{string.Join(' ', splitted[..3])}\r\n{string.Join(' ', splitted[3..])}</size>\r\n");
|
||||
}
|
||||
else if (roleInfo.RemoveHtmlTags().Length > 35)
|
||||
{
|
||||
string[] split = roleInfo.Split(' ');
|
||||
int half = split.Length / 2;
|
||||
roleWithInfo = $"{GetString($"{Options.CurrentGameMode}")}\r\n<size=80%>{role.ToColoredString()}:\r\n{string.Join(' ', split[..half])}\r\n{string.Join(' ', split[half..])}</size>";
|
||||
roleWithInfo = $"<size=80%>{role.ToColoredString()}:\r\n{string.Join(' ', split[..half])}\r\n{string.Join(' ', split[half..])}</size>";
|
||||
}
|
||||
|
||||
string finalText = Utils.ColorString(player.GetRoleColor(), roleWithInfo);
|
||||
|
||||
@@ -195,11 +195,6 @@ public static class HudSpritePatch
|
||||
newAbilityButton = CustomButton.Get("JesterVent");
|
||||
break;
|
||||
}
|
||||
case CustomRoles.Mario:
|
||||
{
|
||||
newAbilityButton = CustomButton.Get("Happy");
|
||||
break;
|
||||
}
|
||||
case CustomRoles.Transporter:
|
||||
case CustomRoles.Swapster:
|
||||
{
|
||||
|
||||
@@ -292,6 +292,7 @@ internal static class ChangeRoleSettings
|
||||
AFKDetector.ShieldedPlayers.Clear();
|
||||
Main.Invisible.Clear();
|
||||
ChatCommands.MutedPlayers.Clear();
|
||||
ExtendedPlayerControl.TempExiled.Clear();
|
||||
|
||||
MeetingTimeManager.Init();
|
||||
Main.DefaultCrewmateVision = Main.RealOptionsData.GetFloat(FloatOptionNames.CrewLightMod);
|
||||
|
||||
@@ -1727,6 +1727,7 @@
|
||||
"AssassinMarkCooldown": "Mark Cooldown",
|
||||
"AssassinAssassinateCooldown": "Assassinate Cooldown",
|
||||
"AssassinCanKillAfterAssassinate": "Can kill after Assassinating",
|
||||
"AssassinInvisibilityTimeAfterAssassinate": "Invisibility Time After Assassination",
|
||||
"UndertakerMarkCooldown": "Mark Cooldown",
|
||||
"UndertakerAssassinateCooldown": "Assassinate Cooldown",
|
||||
"UndertakerCanKillAfterAssassinate": "Can kill after Assassinating",
|
||||
|
||||
Reference in new issue
Block a user