mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
Lobby View Settings (#521)
* First * RoleTabs * Add fix in text * Fix Max title and move pos * Fix LanguageID in some languages * Fix * Fix id * Some fix and changes * Fix role settings * Changes * Recode Y positions for role settings * Try * Hide settings/roles when categoryHeaderRoleOrigin was pressed * Viwe supprort gamemodes & fix collapsed sections Y pos * Set size labelBackground & Hide Option Shower * Fix role category header color * Rename * Add right and left arrow button * Some fixes * Colored settings & Fix children settings roles * Fix chat for modded clients when lobby view open * Some fix * Optimaze DrawOptions() and DrawRoles() * Change role text scale * Change * Add colored check mark & Show only enabled roles button & More fixes * Change * Fix missed PresetExplorer color
This commit is contained in:
1 parent
55f18c7951
commit
6baebb12a9
25 files changed
+1252
-88
No files matched your search
@@ -269,6 +269,11 @@ dotnet_style_qualification_for_property = false:silent
|
||||
dotnet_style_qualification_for_method = false:silent
|
||||
dotnet_style_qualification_for_event = false:silent
|
||||
|
||||
# Remove warning about invalid name like __instance
|
||||
dotnet_diagnostic.IDE1006.severity = none
|
||||
# Remove suggestion to reduce NULL checking
|
||||
dotnet_diagnostic.IDE0031.severity = none
|
||||
|
||||
[*.{appxmanifest,asax,ascx,aspx,axaml,blockshader,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,h++,hh,hlsl,hlsli,hlslinc,hp,hpp,hxx,icc,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,resx,shader,shaderFoundry,skin,tcc,tpp,urtshader,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
@@ -3378,7 +3378,8 @@ public static class Options
|
||||
|
||||
public static void SetupRoleOptions(int id, TabGroup tab, CustomRoles role, CustomGameMode customGameMode = CustomGameMode.Standard, bool zeroOne = false)
|
||||
{
|
||||
var spawnOption = new StringOptionItem(id, role.ToString(), zeroOne ? RatesZeroOne : Rates, 0, tab).SetColor(Utils.GetRoleColor(role))
|
||||
var spawnOption = new StringOptionItem(id, role.ToString(), zeroOne ? RatesZeroOne : Rates, 0, tab)
|
||||
.SetColor(Utils.GetRoleColor(role))
|
||||
.SetHeader(true)
|
||||
.SetGameMode(customGameMode) as StringOptionItem;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using EHR.Modules;
|
||||
using EHR.Patches;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using EHR.Modules;
|
||||
using UnityEngine;
|
||||
|
||||
namespace EHR;
|
||||
@@ -230,13 +231,13 @@ public abstract class OptionItem
|
||||
return IsSingleValue ? SingleValue : AllValues[CurrentPreset];
|
||||
}
|
||||
|
||||
public bool IsCurrentlyHidden()
|
||||
public bool IsCurrentlyHidden(bool forLobbyView = false, bool checkCollapsedSection = true)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (OptionItem current = this; current != null; current = current.Parent)
|
||||
{
|
||||
if (Hidden(current))
|
||||
if (Hidden(current, forLobbyView, checkCollapsedSection))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -244,10 +245,10 @@ public abstract class OptionItem
|
||||
|
||||
return false;
|
||||
|
||||
static bool Hidden(OptionItem oi)
|
||||
static bool Hidden(OptionItem oi, bool forLobbyView, bool checkCollapsedSection)
|
||||
{
|
||||
if (oi.Header is { CollapsesSection: true }) return true;
|
||||
CustomGameMode mode = EHR.Options.CurrentGameMode;
|
||||
if (checkCollapsedSection && oi.Header is { CollapsesSection: true }) return true;
|
||||
CustomGameMode mode = !forLobbyView ? EHR.Options.CurrentGameMode : LobbyViewSettingsPanePatch.LastGameModeSelected;
|
||||
const CustomGameMode nd = CustomGameMode.NaturalDisasters;
|
||||
return (oi.IsHidden || (oi.GameMode != CustomGameMode.All && oi.GameMode != mode) ||
|
||||
(oi.Name == "IntegrateNaturalDisasters" && mode == nd)) &&
|
||||
|
||||
@@ -17,6 +17,7 @@ public static class OptionShower
|
||||
|
||||
static OptionShower() { }
|
||||
|
||||
// Now EHR use LobbyViewSettingsPane instead of this
|
||||
public static string GetTextNoFresh()
|
||||
{
|
||||
try
|
||||
|
||||
+1
-1
@@ -476,7 +476,7 @@ internal static class RPCHandlerPatch
|
||||
}
|
||||
|
||||
OptionSaver.Save();
|
||||
Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
//Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
break;
|
||||
}
|
||||
case CustomRPC.SetDeathReason:
|
||||
|
||||
+12
-2
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using EHR.Gamemodes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
@@ -7,7 +8,6 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.RegularExpressions;
|
||||
using EHR.Gamemodes;
|
||||
|
||||
namespace EHR;
|
||||
|
||||
@@ -325,4 +325,14 @@ public static class Translator
|
||||
return OriginalRoleNames.TryGetValue(role, out var d) && d.TryGetValue(GetUserTrueLang(), out var o) ? infoLong.Replace(o, role.ToColoredString(), StringComparison.OrdinalIgnoreCase) : infoLong;
|
||||
}
|
||||
|
||||
public static bool LangHasSensitiveOutlineText()
|
||||
{
|
||||
return TranslationController.InstanceExists && TranslationController.Instance.currentLanguage.languageID is
|
||||
SupportedLangs.Russian or
|
||||
SupportedLangs.Korean or
|
||||
SupportedLangs.Japanese or
|
||||
SupportedLangs.SChinese or
|
||||
SupportedLangs.TChinese;
|
||||
}
|
||||
|
||||
}
|
||||
+18
-1
@@ -464,6 +464,23 @@ public static class Utils
|
||||
_ = ColorUtility.TryParseHtmlString(hexColor, out Color c);
|
||||
return c;
|
||||
}
|
||||
public static Color GetTabColor(this TabGroup tab)
|
||||
{
|
||||
return tab switch
|
||||
{
|
||||
TabGroup.SystemSettings => new(0.2f, 0.2f, 0.2f),
|
||||
TabGroup.GameSettings => new(0.2f, 0.4f, 0.3f),
|
||||
TabGroup.TaskSettings => new(0.4f, 0.2f, 0.5f),
|
||||
TabGroup.ImpostorRoles => new(0.5f, 0.2f, 0.2f),
|
||||
TabGroup.CrewmateRoles => new(0.2f, 0.4f, 0.5f),
|
||||
TabGroup.NeutralRoles => new(0.5f, 0.4f, 0.2f),
|
||||
TabGroup.CovenRoles => new(0.5f, 0.2f, 0.4f),
|
||||
TabGroup.Addons => new(0.4f, 0.2f, 0.3f),
|
||||
TabGroup.OtherRoles => new(0.4f, 0.4f, 0.4f),
|
||||
TabGroup.PresetExplorer => new(0.5f, 0.5f, 0.5f),
|
||||
_ => new(0.3f, 0.3f, 0.3f)
|
||||
};
|
||||
}
|
||||
|
||||
public static string GetRoleColorCode(CustomRoles role)
|
||||
{
|
||||
@@ -4410,7 +4427,7 @@ public static class Utils
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private static unsafe Texture2D LoadTextureFromResources(string path)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -48,7 +48,7 @@ internal static class ControllerManagerUpdatePatch
|
||||
|
||||
if (GameStates.IsLobby && (!HudManager.Instance.Chat || !HudManager.Instance.Chat.IsOpenOrOpening))
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Tab)) OptionShower.Next();
|
||||
//if (Input.GetKeyDown(KeyCode.Tab)) OptionShower.Next();
|
||||
|
||||
for (var i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
@@ -125,7 +125,8 @@ public static class GameOptionsMenuPatch
|
||||
OptionItem option = OptionItem.AllOptions[index];
|
||||
if (option.Tab != modTab) continue;
|
||||
|
||||
bool enabled = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabledOrNotCollapsed = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabled = !option.IsCurrentlyHidden(checkCollapsedSection: false) && AllParentsEnabledAndVisible(option.Parent, checkCollapsedSection: false);
|
||||
|
||||
if (option is TextOptionItem toi)
|
||||
{
|
||||
@@ -155,14 +156,14 @@ public static class GameOptionsMenuPatch
|
||||
categoryHeaderMasked.gameObject.SetActive(enabled);
|
||||
ModGameOptionsMenu.CategoryHeaderList.TryAdd(index, categoryHeaderMasked);
|
||||
|
||||
if (enabled) num -= 0.63f;
|
||||
if (enabledOrNotCollapsed) num -= 0.63f;
|
||||
header = toi;
|
||||
continue;
|
||||
}
|
||||
|
||||
option.Header = header;
|
||||
|
||||
if (option.IsHeader && enabled)
|
||||
if (option.IsHeader && enabledOrNotCollapsed)
|
||||
num -= 0.18f;
|
||||
|
||||
BaseGameSetting baseGameSetting = GetSetting(option);
|
||||
@@ -194,13 +195,13 @@ public static class GameOptionsMenuPatch
|
||||
optionBehaviour.SetUpFromData(baseGameSetting, 20);
|
||||
ModGameOptionsMenu.OptionList.TryAdd(optionBehaviour, index);
|
||||
ModGameOptionsMenu.BehaviourList.TryAdd(index, optionBehaviour);
|
||||
optionBehaviour.gameObject.SetActive(enabled);
|
||||
optionBehaviour.gameObject.SetActive(enabledOrNotCollapsed);
|
||||
optionBehaviour.OnValueChanged = new Action<OptionBehaviour>(__instance.ValueChanged);
|
||||
__instance.Children.Add(optionBehaviour);
|
||||
|
||||
option.OptionBehaviour = optionBehaviour;
|
||||
|
||||
if (enabled) num -= 0.45f;
|
||||
if (enabledOrNotCollapsed) num -= 0.45f;
|
||||
}
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
@@ -221,11 +222,11 @@ public static class GameOptionsMenuPatch
|
||||
{
|
||||
if (option.Tab != modTab) continue;
|
||||
|
||||
bool enabled = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabledOrNotCollapsed = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
|
||||
if (option is TextOptionItem)
|
||||
num -= 0.63f;
|
||||
else if (enabled)
|
||||
else if (enabledOrNotCollapsed)
|
||||
{
|
||||
if (option.IsHeader) num -= 0.18f;
|
||||
|
||||
@@ -237,12 +238,12 @@ public static class GameOptionsMenuPatch
|
||||
}
|
||||
}
|
||||
|
||||
private static bool AllParentsEnabledAndVisible(OptionItem o)
|
||||
public static bool AllParentsEnabledAndVisible(OptionItem o, bool checkCollapsedSection = true)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (o == null) return true;
|
||||
if (o.IsCurrentlyHidden() || !o.GetBool()) return false;
|
||||
if (o.IsCurrentlyHidden(forLobbyView: false, checkCollapsedSection: checkCollapsedSection) || !o.GetBool()) return false;
|
||||
o = o.Parent;
|
||||
}
|
||||
}
|
||||
@@ -324,7 +325,15 @@ public static class GameOptionsMenuPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
[HarmonyPatch(nameof(GameOptionsMenu.Update))]
|
||||
[HarmonyPrefix]
|
||||
public static void UpdatePostfix(GameOptionsMenu __instance)
|
||||
{
|
||||
// Disable scroll options when chat open
|
||||
if (!HudManager.InstanceExists || !__instance.gameObject.activeSelf) return;
|
||||
|
||||
__instance.scrollBar.enabled = !HudManager.Instance.Chat.IsOpenOrOpening;
|
||||
}
|
||||
[HarmonyPatch(nameof(GameOptionsMenu.ValueChanged))]
|
||||
[HarmonyPrefix]
|
||||
private static bool ValueChangedPrefix(GameOptionsMenu __instance, OptionBehaviour option)
|
||||
@@ -353,21 +362,22 @@ public static class GameOptionsMenuPatch
|
||||
OptionItem option = OptionItem.AllOptions[index];
|
||||
if (option.Tab != modTab) continue;
|
||||
|
||||
bool enabled = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabledOrNotCollapsed = !option.IsCurrentlyHidden() && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabled = !option.IsCurrentlyHidden(checkCollapsedSection: false) && AllParentsEnabledAndVisible(option.Parent, checkCollapsedSection: false);
|
||||
|
||||
if (ModGameOptionsMenu.CategoryHeaderList.TryGetValue(index, out CategoryHeaderMasked categoryHeaderMasked))
|
||||
{
|
||||
categoryHeaderMasked.transform.localPosition = new(-0.903f, num, -2f);
|
||||
categoryHeaderMasked.gameObject.SetActive(enabled);
|
||||
if (enabled) num -= 0.63f;
|
||||
if (enabledOrNotCollapsed) num -= 0.63f;
|
||||
}
|
||||
else if (option.IsHeader && enabled) num -= 0.18f;
|
||||
else if (option.IsHeader && enabledOrNotCollapsed) num -= 0.18f;
|
||||
|
||||
if (ModGameOptionsMenu.BehaviourList.TryGetValue(index, out OptionBehaviour optionBehaviour))
|
||||
{
|
||||
optionBehaviour.transform.localPosition = new(0.952f, num, -2f);
|
||||
optionBehaviour.gameObject.SetActive(enabled);
|
||||
if (enabled) num -= 0.45f;
|
||||
optionBehaviour.gameObject.SetActive(enabledOrNotCollapsed);
|
||||
if (enabledOrNotCollapsed) num -= 0.45f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,7 +389,7 @@ public static class GameOptionsMenuPatch
|
||||
__instance.scrollBar.SetYBoundsMax(-num - 1.65f);
|
||||
}
|
||||
|
||||
private static BaseGameSetting GetSetting(OptionItem item)
|
||||
public static BaseGameSetting GetSetting(OptionItem item)
|
||||
{
|
||||
BaseGameSetting baseGameSetting;
|
||||
|
||||
@@ -815,7 +825,7 @@ public static class StringOptionPatch
|
||||
icon.SetAsLastSibling();
|
||||
}
|
||||
|
||||
private static string GetGhostRoleTeam(CustomRoles role)
|
||||
public static string GetGhostRoleTeam(CustomRoles role)
|
||||
{
|
||||
IGhostRole instance = GhostRolesManager.CreateGhostRoleInstance(role);
|
||||
if (instance == null) return string.Empty;
|
||||
@@ -994,9 +1004,9 @@ public static class GameSettingMenuPatch
|
||||
{
|
||||
try
|
||||
{
|
||||
(OptionItem MinSetting, OptionItem MaxSetting) impLimits = Options.FactionMinMaxSettings[Team.Impostor];
|
||||
MinImpsOnOpen = impLimits.MinSetting.GetInt();
|
||||
MaxImpsOnOpen = impLimits.MaxSetting.GetInt();
|
||||
(OptionItem MinSetting, OptionItem MaxSetting) = Options.FactionMinMaxSettings[Team.Impostor];
|
||||
MinImpsOnOpen = MinSetting.GetInt();
|
||||
MaxImpsOnOpen = MaxSetting.GetInt();
|
||||
NumImpsOnOpen = Main.NormalOptions.NumImpostors;
|
||||
|
||||
VanillaKillCooldownOnOpen = Main.NormalOptions.KillCooldown;
|
||||
@@ -1025,21 +1035,7 @@ public static class GameSettingMenuPatch
|
||||
label.color = Color.white;
|
||||
button.activeTextColor = button.inactiveTextColor = Color.white;
|
||||
button.selectedTextColor = new(0.7f, 0.7f, 0.7f);
|
||||
|
||||
Color color = tab switch
|
||||
{
|
||||
TabGroup.SystemSettings => new(0.2f, 0.2f, 0.2f),
|
||||
TabGroup.GameSettings => new(0.2f, 0.4f, 0.3f),
|
||||
TabGroup.TaskSettings => new(0.4f, 0.2f, 0.5f),
|
||||
TabGroup.ImpostorRoles => new(0.5f, 0.2f, 0.2f),
|
||||
TabGroup.CrewmateRoles => new(0.2f, 0.4f, 0.5f),
|
||||
TabGroup.NeutralRoles => new(0.5f, 0.4f, 0.2f),
|
||||
TabGroup.CovenRoles => new(0.5f, 0.2f, 0.4f),
|
||||
TabGroup.Addons => new(0.4f, 0.2f, 0.3f),
|
||||
TabGroup.OtherRoles => new(0.4f, 0.4f, 0.4f),
|
||||
TabGroup.PresetExplorer => new(0.5f, 0.5f, 0.5f),
|
||||
_ => new(0.3f, 0.3f, 0.3f)
|
||||
};
|
||||
Color color = tab.GetTabColor();
|
||||
|
||||
button.inactiveSprites.GetComponent<SpriteRenderer>().color = color;
|
||||
button.activeSprites.GetComponent<SpriteRenderer>().color = color;
|
||||
@@ -1304,6 +1300,7 @@ public static class GameSettingMenuPatch
|
||||
|
||||
result.ForEach(x => x.SetHidden(true));
|
||||
|
||||
gameSettings.scrollBar.ScrollToTop();
|
||||
GameOptionsMenuPatch.ReCreateSettings(gameSettings);
|
||||
textField.Clear();
|
||||
}
|
||||
@@ -1459,12 +1456,12 @@ public static class GameSettingMenuPatch
|
||||
try
|
||||
{
|
||||
int numImpostors = Main.NormalOptions.NumImpostors;
|
||||
(OptionItem MinSetting, OptionItem MaxSetting) impLimits = Options.FactionMinMaxSettings[Team.Impostor];
|
||||
(OptionItem MinSetting, OptionItem MaxSetting) = Options.FactionMinMaxSettings[Team.Impostor];
|
||||
|
||||
if (numImpostors != NumImpsOnOpen && MinImpsOnOpen == impLimits.MinSetting.GetInt() && MaxImpsOnOpen == impLimits.MaxSetting.GetInt())
|
||||
if (numImpostors != NumImpsOnOpen && MinImpsOnOpen == MinSetting.GetInt() && MaxImpsOnOpen == MaxSetting.GetInt())
|
||||
{
|
||||
impLimits.MinSetting.SetValue(numImpostors);
|
||||
impLimits.MaxSetting.SetValue(numImpostors);
|
||||
MinSetting.SetValue(numImpostors);
|
||||
MaxSetting.SetValue(numImpostors);
|
||||
Logger.SendInGame(string.Format(Translator.GetString("MinMaxModdedImpCountsSettingsChangedAuto"), numImpostors));
|
||||
}
|
||||
|
||||
@@ -1497,7 +1494,7 @@ public static class GameSettingMenuPatch
|
||||
ModSettingsTabs = [];
|
||||
GMButtons = [];
|
||||
|
||||
Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
//Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public static class GameStartManagerPatch
|
||||
|
||||
if (!AmongUsClient.Instance) return false;
|
||||
|
||||
if (AmongUsClient.Instance.AmHost) VanillaUpdate(__instance);
|
||||
VanillaUpdate(__instance);
|
||||
|
||||
if (AmongUsClient.Instance.IsGameStarted || GameStates.IsInGame || !__instance || __instance.startState == GameStartManager.StartingStates.Starting) return false;
|
||||
|
||||
@@ -156,7 +156,7 @@ public static class GameStartManagerPatch
|
||||
}
|
||||
}
|
||||
|
||||
if (!AmongUsClient.Instance || !GameData.Instance || !AmongUsClient.Instance.AmHost) return true;
|
||||
if (!AmongUsClient.Instance || !GameData.Instance) return true;
|
||||
|
||||
CheckAutoStart(__instance);
|
||||
}
|
||||
@@ -239,7 +239,7 @@ public static class GameStartManagerPatch
|
||||
|
||||
private static void VanillaUpdate(GameStartManager instance)
|
||||
{
|
||||
if (!GameData.Instance || !GameManager.Instance || !AmongUsClient.Instance.AmHost) return;
|
||||
if (!GameData.Instance || !GameManager.Instance) return;
|
||||
|
||||
try { instance.UpdateMapImage((MapNames)GameManager.Instance.LogicOptions.MapId); }
|
||||
catch (Exception e)
|
||||
@@ -254,7 +254,7 @@ public static class GameStartManagerPatch
|
||||
}
|
||||
|
||||
instance.CheckSettingsDiffs();
|
||||
instance.StartButton.gameObject.SetActive(true);
|
||||
instance.StartButton.gameObject.SetActive(AmongUsClient.Instance.AmHost);
|
||||
instance.RulesPresetText.text = TranslationController.Instance.GetString(GameOptionsManager.Instance.CurrentGameOptions.GetRulesPresetTitle());
|
||||
|
||||
if (GameCode.IntToGameName(AmongUsClient.Instance.GameId) == null) instance.privatePublicPanelText.text = TranslationController.Instance.GetString(StringNames.LocalButton);
|
||||
@@ -320,13 +320,19 @@ public static class GameStartManagerPatch
|
||||
instance.GameStartText.text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!HudManager.InstanceExists) return;
|
||||
|
||||
if (instance.LobbyInfoPane.gameObject.activeSelf && HudManager.Instance.Chat.IsOpenOrOpening)
|
||||
instance.LobbyInfoPane.DeactivatePane();
|
||||
if (instance.LobbyInfoPane.gameObject.activeSelf)
|
||||
{
|
||||
var lobbyViewSettingsPane = instance.LobbyInfoPane.LobbyViewSettingsPane;
|
||||
lobbyViewSettingsPane.scrollBar.enabled = !HudManager.Instance.Chat.IsOpenOrOpening;
|
||||
}
|
||||
|
||||
instance.LobbyInfoPane.gameObject.SetActive(!HudManager.Instance.Chat.IsOpenOrOpening);
|
||||
//if (instance.LobbyInfoPane.gameObject.activeSelf && HudManager.Instance.Chat.IsOpenOrOpening)
|
||||
// instance.LobbyInfoPane.DeactivatePane();
|
||||
|
||||
//instance.LobbyInfoPane.gameObject.SetActive(!HudManager.Instance.Chat.IsOpenOrOpening);
|
||||
}
|
||||
|
||||
public static void Postfix(GameStartManager __instance)
|
||||
@@ -430,7 +436,7 @@ public static class GameStartManagerPatch
|
||||
tmp.alignment = TextAlignmentOptions.Center;
|
||||
tmp.color = Color.cyan;
|
||||
tmp.outlineColor = Color.black;
|
||||
tmp.outlineWidth = 0.4f;
|
||||
tmp.outlineWidth = LangHasSensitiveOutlineText() ? 0.1f : 0.4f;
|
||||
tmp.transform.localPosition += new Vector3(-0.625f, -0.12f, 0f);
|
||||
tmp.transform.localScale = new(0.6f, 0.6f, 1f);
|
||||
}
|
||||
|
||||
+5
-5
@@ -63,11 +63,11 @@ internal static class HudManagerPatch
|
||||
SettingsText = null;
|
||||
}
|
||||
|
||||
if (SettingsText)
|
||||
{
|
||||
SettingsText.text = OptionShower.GetTextNoFresh();
|
||||
SettingsText.enabled = SettingsText.text != string.Empty;
|
||||
}
|
||||
//if (SettingsText)
|
||||
//{
|
||||
// SettingsText.text = OptionShower.GetTextNoFresh();
|
||||
// SettingsText.enabled = SettingsText.text != string.Empty;
|
||||
//}
|
||||
}
|
||||
else if (SettingsText)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -96,7 +96,7 @@ internal static class OnGameJoinedPatch
|
||||
ClientData client = PlayerControl.LocalPlayer.GetClient();
|
||||
Logger.Info($"{client.PlayerName.RemoveHtmlTags()} (ClientID: {client.Id} / FriendCode: {client.FriendCode} / HashPuid: {client.GetHashedPuid()} / Platform: {client.PlatformData.Platform}) Hosted room (Server: {Utils.GetRegionName()})", "Session");
|
||||
|
||||
Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
//Main.Instance.StartCoroutine(OptionShower.GetText());
|
||||
}, 1f, "OnGameJoinedPatch");
|
||||
|
||||
LateTask.New(() =>
|
||||
@@ -244,8 +244,8 @@ internal static class OnGameJoinedPatch
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
LateTask.New(() => Main.Instance.StartCoroutine(OptionShower.GetText()), 10f, "OptionShower.GetText on client");
|
||||
//else
|
||||
// LateTask.New(() => Main.Instance.StartCoroutine(OptionShower.GetText()), 10f, "OptionShower.GetText on client");
|
||||
}
|
||||
|
||||
// Written with AI because I don't want it to delete the wrong files
|
||||
|
||||
@@ -9,6 +9,9 @@ using EHR.Roles;
|
||||
using HarmonyLib;
|
||||
using Hazel;
|
||||
using UnityEngine;
|
||||
#if DEBUG
|
||||
using EHR.Patches;
|
||||
#endif
|
||||
|
||||
namespace EHR;
|
||||
|
||||
|
||||
@@ -537,6 +537,12 @@ Click this badge to view our translation project:
|
||||
|
||||
>
|
||||
> - Crowded is integrated into EHR
|
||||
|
||||
### :star: [MiraAPI](https://github.com/All-Of-Us-Mods/MiraAPI)
|
||||
|
||||
>
|
||||
> - Next button sprites (Inactive and Active)
|
||||
|
||||
|
||||
### Endless Host Roles (EHR), with Endless Possibilities, brought to you by the Endless Network.
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 834 B |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
@@ -10155,6 +10155,12 @@
|
||||
"MainMenu.ExitGameButton": "Quit",
|
||||
"MainMenu.InventoryButton": "Inventory",
|
||||
|
||||
/* ==============================
|
||||
Lobby View Settings
|
||||
============================== */
|
||||
"LobbyViewSettings_ShowOnlyEnabledRolesButtonText": "Show Only Enabled Roles",
|
||||
"LobbyViewSettings_ShowAlldRolesButtonText": "Show All Roles",
|
||||
|
||||
/* ==============================
|
||||
General Settings
|
||||
============================== */
|
||||
@@ -11479,11 +11485,11 @@
|
||||
"RoleSubCategoryLimitOptions.Neutral_Pariah.EnableLimit": "<#ffffff>Alter the number of</color> Neutral Pariah <#ffffff>roles in the game</color>",
|
||||
"RoleSubCategoryLimitOptions.Neutral_Pariah.Max": "Maximum Neutral Pariah Roles",
|
||||
"RoleSubCategoryLimitOptions.Neutral_Pariah.Min": "Minimum Neutral Pariah Roles",
|
||||
|
||||
|
||||
/* ==============================
|
||||
Faction Information
|
||||
============================== */
|
||||
|
||||
|
||||
"CovenInfoDescription": "The Coven is a Team of 1-4 people, after 3 meetings (amount replaced with hosts settings) a random Member of the Coven will gain the Necronomicon. With the Necronomicon, that Coven Member may kill normally and also has a stronger ability. After the Necronomicon was given to the first member, every meeting after will give it to another until all members of the Coven have it. Most roles in this faction are also Support oriented, meaning that they need Teamwork and coordination to work perfectly together.\n\nThe Necronomicon is an ability buff owned by a single member of the Coven. The Necronomicon goes to a different Coven member after every meeting, and for that round will buff their role's ability. Most Coven roles will state in their description what the Necronomicon buffs in their role.\n\n<size=50%>Credit to mystic_haze2 on Discord for writing the first paragraph</size>",
|
||||
"NeutralInfoDescription": "Neutrals do not belong to Crewmates or Impostors, and they win on their own terms. Each type of neutral wins in a different way. Neutrals work for themselves and have specific conditions depending on their role on how to win.\n\n<b>Neutral Benigns</b> win when their specific conditions are completed, each role having different conditions necessary to win. They do not trigger the game to end, meaning they must wait until the Crewmates, Impostors, Coven, or another Neutral to win the game and win along with them. \n\n<b>Neutral Evils</b> also have their own specific conditions to win, much like the Neutral Benigns. However, when they complete their objectives to win the game, they end the game and win without Crewmates, Coven, or Impostors- also called 'stealing the win'.\n\n<b>Neutral Killers</b> are neutrals who can kill, much like Impostors, but do not work with the Impostors. Most of the Neutral killers work on their own, although some can recruit other players to work with them. They win the game by killing off all the Impostors, Cremwates, Coven, and other Neutrals, until they are the only player remaining.\n\n<b>Neutral Pariah</b> roles are much like Neutral Benign roles, however their main objective is to make sure Crewmates do not win. If any team other than the Crewmates win, said Neutral Pariah role will win along with the winning team. They have special abilities to try and harm the crewmates."
|
||||
}
|
||||
@@ -16,6 +16,10 @@ public class Agent : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(69_211_2000, $"TypeImpostor", TabGroup.ImpostorRoles)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek);
|
||||
|
||||
Options.SetupRoleOptions(69_211_2001, TabGroup.ImpostorRoles, CustomRoles.Agent, CustomGameMode.HideAndSeek);
|
||||
|
||||
Vision = new FloatOptionItem(69_211_2003, "AgentVision", new(0.05f, 5f, 0.05f), 0.25f, TabGroup.ImpostorRoles)
|
||||
|
||||
@@ -21,6 +21,10 @@ public class Detector : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(69_211_600, $"TypeCrewmate", TabGroup.CrewmateRoles)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek);
|
||||
|
||||
Options.SetupRoleOptions(69_211_601, TabGroup.CrewmateRoles, CustomRoles.Detector, CustomGameMode.HideAndSeek);
|
||||
|
||||
Vision = new FloatOptionItem(69_211_603, "DetectorVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles)
|
||||
|
||||
@@ -16,6 +16,10 @@ internal class Fox : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(69_211_300, $"TypeNeutral", TabGroup.NeutralRoles)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek); ;
|
||||
|
||||
Options.SetupRoleOptions(69_211_301, TabGroup.NeutralRoles, CustomRoles.Fox, CustomGameMode.HideAndSeek);
|
||||
|
||||
Vision = new FloatOptionItem(69_211_303, "FoxVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.NeutralRoles)
|
||||
|
||||
+20
-10
@@ -6,6 +6,8 @@ internal class Hider : RoleBase, IHideAndSeekRole
|
||||
{
|
||||
private static bool On;
|
||||
|
||||
public static int StartId = 69_211_199;
|
||||
|
||||
private static OptionItem Vision;
|
||||
private static OptionItem Speed;
|
||||
private static OptionItem TimeDecreaseOnShortTaskComplete;
|
||||
@@ -23,45 +25,53 @@ internal class Hider : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(69_211_199, "Hider", TabGroup.CrewmateRoles)
|
||||
var textOpt = new TextOptionItem(StartId, "Hider", TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetHeader(true)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetHeader(true);
|
||||
|
||||
textOpt.SetValue(1, false, false); // Set Value as 1, becouse TextOptionItem "Hider" is parent option
|
||||
|
||||
Vision = new FloatOptionItem(69_211_101, "HiderVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
Speed = new FloatOptionItem(69_211_102, "HiderSpeed", new(0.05f, 5f, 0.05f), 1.4f, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
TimeDecreaseOnShortTaskComplete = new IntegerOptionItem(69_211_103, "TimeDecreaseOnShortTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
TimeDecreaseOnCommonTaskComplete = new IntegerOptionItem(69_211_104, "TimeDecreaseOnCommonTaskComplete", new(0, 60, 1), 10, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
TimeDecreaseOnLongTaskComplete = new IntegerOptionItem(69_211_105, "TimeDecreaseOnLongTaskComplete", new(0, 60, 1), 15, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
TimeDecreaseOnSituationalTaskComplete = new IntegerOptionItem(69_211_106, "TimeDecreaseOnSituationalTaskComplete", new(0, 60, 1), 20, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
TimeDecreaseOnOtherTaskComplete = new IntegerOptionItem(69_211_107, "TimeDecreaseOnOtherTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
}
|
||||
|
||||
public override void Add(byte playerId)
|
||||
|
||||
@@ -6,6 +6,8 @@ internal class Seeker : RoleBase, IHideAndSeekRole
|
||||
{
|
||||
public static bool On;
|
||||
|
||||
public static int StartId = 69_211_299;
|
||||
|
||||
public static OptionItem Vision;
|
||||
public static OptionItem Speed;
|
||||
public static OptionItem CanVent;
|
||||
@@ -21,34 +23,40 @@ internal class Seeker : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(69_211_299, "Seeker", TabGroup.ImpostorRoles)
|
||||
var textOpt = new TextOptionItem(StartId, "Seeker", TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetHeader(true)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetHeader(true);
|
||||
|
||||
textOpt.SetValue(1, false, false); // Set Value as 1, becouse TextOptionItem "Seeker" is parent option
|
||||
|
||||
Vision = new FloatOptionItem(69_211_201, "SeekerVision", new(0.05f, 5f, 0.05f), 0.25f, TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
Speed = new FloatOptionItem(69_211_202, "SeekerSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
CanVent = new BooleanOptionItem(69_211_204, "CanVent", false, TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
BlindTime = new FloatOptionItem(69_211_206, "BlindTime", new(0f, 60f, 1f), 10f, TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
|
||||
KillCooldown = new IntegerOptionItem(69_211_207, "KillCooldown", new(0, 60, 1), 10, TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue))
|
||||
.SetParent(textOpt);
|
||||
}
|
||||
|
||||
public override void Add(byte playerId)
|
||||
|
||||
Reference in new issue
Block a user