mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-11-19 13:16:56 +00:00
Brand New Settings UI & Bug Fixes
This commit is contained in:
1 parent
dd250dbb8b
commit
0fb9a9cf63
52 files changed
+2481
-2233
No files matched your search
@@ -231,8 +231,6 @@ jobs:
|
||||
run: |
|
||||
cp -rf packaging/epic/* epic/
|
||||
cp -rf packaging/steam/* steam/
|
||||
cp -rf packaging/il2cppinterop/* steam/BepInEx/core/
|
||||
cp -rf packaging/il2cppinterop/* epic/BepInEx/core/
|
||||
|
||||
- name: Steam App ID
|
||||
run: |
|
||||
|
||||
@@ -380,7 +380,7 @@ public static class BedWars
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
GracePeriodEnd = Utils.TimeStamp + 60;
|
||||
GracePeriodEnd = Utils.TimeStamp + 1000;
|
||||
|
||||
Data = [];
|
||||
InShop = [];
|
||||
@@ -454,11 +454,11 @@ public static class BedWars
|
||||
.Flatten()
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
|
||||
Main.AllAlivePlayerControlsToList.SetChatVisible(true);
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
|
||||
MapNames map = Main.CurrentMap;
|
||||
Dictionary<BedWarsTeam, Base> bases = Bases[map];
|
||||
@@ -519,12 +519,12 @@ public static class BedWars
|
||||
|
||||
Data[pc.PlayerId] = data;
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(0.3f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(0.6f) : WaitFrameIfNecessary();
|
||||
}
|
||||
|
||||
sender.SendMessage(dispose: PlayerControl.AllPlayerControls.Count <= 1);
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
|
||||
if (GameStates.IsEnded || !GameStates.InGame || GameStates.IsLobby)
|
||||
{
|
||||
@@ -551,14 +551,14 @@ public static class BedWars
|
||||
if (bed != null) AllNetObjects[team] = new(bed, new(itemShop), new(upgradeShop));
|
||||
rooms.Add(Utils.ColorString(team.GetColor(), Translator.GetString(room)));
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
}
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
|
||||
players.NotifyPlayers($"{rooms[0]}\n{string.Join(" | ", rooms.Skip(1))}", 20f, setName: false);
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
|
||||
foreach ((Item item, List<Vector2> positions) in ItemGeneratorPositions[map])
|
||||
{
|
||||
@@ -579,7 +579,7 @@ public static class BedWars
|
||||
if (generator != null) ItemGenerators.Add(generator);
|
||||
});
|
||||
|
||||
yield return vanilla ? new WaitForSeconds(1f) : WaitFrameIfNecessary();
|
||||
yield return vanilla ? new WaitForSeconds(2f) : WaitFrameIfNecessary();
|
||||
}
|
||||
|
||||
GracePeriodEnd = Utils.TimeStamp + GracePeriod;
|
||||
|
||||
@@ -41,6 +41,7 @@ internal static class CustomHnS
|
||||
Color color = new(52, 94, 235, byte.MaxValue);
|
||||
|
||||
MaxGameLength = new IntegerOptionItem(id, "FFA_GameTime", new(0, 1200, 10), 600, TabGroup.GameSettings)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(color);
|
||||
|
||||
@@ -78,7 +78,11 @@ public class Main : BaseUnityPlugin
|
||||
|
||||
public static readonly Version Version = Version.Parse(PluginVersion);
|
||||
|
||||
public static readonly bool Mono = !OperatingSystem.IsAndroid() && Directory.Exists("./MonoBleedingEdge");
|
||||
#if IL2CPP
|
||||
private const bool Mono = false;
|
||||
#else
|
||||
private const bool Mono = true;
|
||||
#endif
|
||||
|
||||
//public static ManualLogSource Logger;
|
||||
public static bool HasArgumentException;
|
||||
|
||||
@@ -142,6 +142,8 @@ public static class Camouflage
|
||||
|
||||
private static IEnumerator UpdateCamouflageStatusAsync()
|
||||
{
|
||||
bool camouflage = IsCamouflage;
|
||||
|
||||
foreach (PlayerControl pc in Main.EnumeratePlayerControls())
|
||||
{
|
||||
if (pc.inVent || pc.walkingToVent || pc.onLadder || pc.inMovingPlat)
|
||||
@@ -153,9 +155,14 @@ public static class Camouflage
|
||||
RpcSetSkin(pc);
|
||||
|
||||
yield return new WaitForSecondsRealtime(0.1f);
|
||||
|
||||
if (camouflage != IsCamouflage) yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
if (camouflage != IsCamouflage) yield break;
|
||||
|
||||
yield return Utils.NotifyEveryoneAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -548,7 +548,7 @@ public class ClientControlGUI : MonoBehaviour
|
||||
}
|
||||
|
||||
bool canZoom = Zoom.CanZoom;
|
||||
bool canNoClip = canMove && Main.IntroDestroyed && (!AmongUsClient.Instance.IsGameStarted || !GameStates.IsOnlineGame) && (!GameStartManager.Instance || GameStartManager.Instance.startState == GameStartManager.StartingStates.NotStarting);
|
||||
bool canNoClip = canMove && GameStartManager.Instance && GameStartManager.Instance.startState == GameStartManager.StartingStates.NotStarting;
|
||||
bool canToggleHud = Main.IntroDestroyed && !inMeeting && !ExileController.Instance && !ReportDeadBodyPatch.MeetingStarted;
|
||||
|
||||
if (canZoom || canNoClip || canToggleHud)
|
||||
@@ -591,7 +591,7 @@ public class ClientControlGUI : MonoBehaviour
|
||||
if (OperatingSystem.IsAndroid()) PlayerControl.LocalPlayer.Collider.offset = ControllerManagerUpdatePatch.NoClipEnabled ? new Vector2(0f, 127f) : new Vector2(0f, -0.3636f);
|
||||
});
|
||||
}
|
||||
else if (ControllerManagerUpdatePatch.NoClipEnabled && OperatingSystem.IsAndroid() && PlayerControl.LocalPlayer)
|
||||
else if (ControllerManagerUpdatePatch.NoClipEnabled && OperatingSystem.IsAndroid() && PlayerControl.LocalPlayer && Main.IntroDestroyed && !Main.HasJustStarted)
|
||||
{
|
||||
PlayerControl.LocalPlayer.Collider.offset = new Vector2(0f, -0.3636f);
|
||||
ControllerManagerUpdatePatch.NoClipEnabled = false;
|
||||
|
||||
+1
-1
@@ -295,7 +295,7 @@ internal static class EAC
|
||||
|
||||
break;
|
||||
}
|
||||
case RpcCalls.Shapeshift when !pc.IsNonHostModdedClient():
|
||||
case RpcCalls.Shapeshift when !pc.IsNonHostModdedClient() && pc.PlayerId < 254:
|
||||
{
|
||||
Report(pc, "Directly Shapeshift");
|
||||
MessageWriter swriter = AmongUsClient.Instance.StartRpcImmediately(pc.NetId, (byte)RpcCalls.Shapeshift, SendOption.Reliable);
|
||||
|
||||
@@ -63,7 +63,7 @@ public static class GuessManager
|
||||
public static bool GuesserMsg(PlayerControl pc, string msg, bool isUI = false)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return false;
|
||||
if (!GameStates.IsMeeting || MeetingHud.Instance.state is MeetingHud.MeetingStates.Results or MeetingHud.MeetingStates.Proceeding || !pc) return false;
|
||||
if (!GameStates.IsMeeting || MeetingHud.Instance.state is MeetingHud.MeetingStates.Results or MeetingHud.MeetingStates.Proceeding || !pc || Starspawn.IsDayBreak) return false;
|
||||
|
||||
bool hasGuessingRole = pc.GetCustomRole() is CustomRoles.NiceGuesser or CustomRoles.EvilGuesser or CustomRoles.Doomsayer or CustomRoles.Prosecutor or CustomRoles.Swapper or CustomRoles.Councillor or CustomRoles.NecroGuesser or CustomRoles.Augur;
|
||||
if (!hasGuessingRole && !pc.Is(CustomRoles.Guesser) && !Options.GuesserMode.GetBool()) return false;
|
||||
|
||||
@@ -184,7 +184,7 @@ internal static class ExitGamePatch
|
||||
}
|
||||
|
||||
if (GameSettingMenu.Instance)
|
||||
GameSettingMenuPatch.Close_Prefix();
|
||||
CustomSettingsUIPatches.GameSettingMenuPatches.PreClose(GameSettingMenu.Instance);
|
||||
}
|
||||
|
||||
public static void Postfix(InnerNetClient __instance)
|
||||
|
||||
+148
-35
@@ -14,12 +14,13 @@ using System.Text.Json;
|
||||
using Newtonsoft.Json;
|
||||
#endif
|
||||
|
||||
// ReSharper disable PossibleLossOfFraction
|
||||
|
||||
namespace EHR.Modules;
|
||||
|
||||
public static class OnlinePresetsManager
|
||||
{
|
||||
private static readonly Dictionary<int, StringOption> OptionBehaviourCache = [];
|
||||
private static readonly Dictionary<int, CategoryHeaderMasked> HeaderCache = [];
|
||||
public static readonly Dictionary<int, GameObject> Buttons = [];
|
||||
public static List<PresetMeta> CachedPresets = [];
|
||||
public static bool PresetsLoaded = false;
|
||||
|
||||
@@ -28,15 +29,86 @@ public static class OnlinePresetsManager
|
||||
if (!PresetsLoaded) return;
|
||||
|
||||
float y = 2.0f;
|
||||
|
||||
|
||||
{
|
||||
CategoryHeaderMasked header = HeaderCache.TryGetValue(0, out CategoryHeaderMasked cache) ? cache : ModGameOptionsMenu.Track(Object.Instantiate(
|
||||
CategoryHeaderMasked header = Object.Instantiate(
|
||||
menu.categoryHeaderOrigin,
|
||||
Vector3.zero,
|
||||
Quaternion.identity,
|
||||
menu.settingsContainer
|
||||
));
|
||||
HeaderCache[0] = header;
|
||||
);
|
||||
|
||||
header.SetHeader(StringNames.RolesCategory, 20);
|
||||
header.Title.DestroyTranslator();
|
||||
header.Title.text = Translator.GetString("LocalPresets");
|
||||
header.transform.localScale = Vector3.one * 0.63f;
|
||||
header.transform.localPosition = new(-0.903f, y, -2f);
|
||||
|
||||
y -= 0.8f;
|
||||
|
||||
PassiveButton template = CustomSettingsUIPatches.GamePresetsTabPatches.TemplatePresetButton;
|
||||
string[] childrenNames = ["Active", "Inactive", "Selected", "InactiveSelected"];
|
||||
|
||||
for (int i = 1; i <= 20; i++)
|
||||
{
|
||||
int num = i - 1;
|
||||
GameObject button = Object.Instantiate(template.gameObject, Vector3.zero, Quaternion.identity, menu.settingsContainer);
|
||||
button.SetActive(true);
|
||||
button.name = $"PresetButton_{i}";
|
||||
button.transform.localScale *= 0.2f;
|
||||
button.transform.localPosition = new Vector3(-1.6f + (num % 10 * 0.6f), 1f - (0.85f * (num / 10)), -2f);
|
||||
var passiveButton = button.GetComponent<PassiveButton>();
|
||||
passiveButton.SelectButton(OptionItem.CurrentPreset == num);
|
||||
passiveButton.OnClick.RemoveAllListeners();
|
||||
passiveButton.OnClick.AddListener(() =>
|
||||
{
|
||||
Options.Preset.SetValue(num);
|
||||
foreach (GameObject gameObject in Buttons.Values)
|
||||
gameObject.GetComponent<PassiveButton>().SelectButton(false);
|
||||
passiveButton.SelectButton(true);
|
||||
GameSettingMenu.Instance.RoleSettingsButton.gameObject.SetActive(Options.CurrentGameMode is CustomGameMode.Standard or CustomGameMode.HideAndSeek);
|
||||
CustomSettingsUIPatches.GameSettingMenuPatches.IsDirty = true;
|
||||
CustomSettingsUIPatches.GameOptionsMenuPatches.SetAllDirty();
|
||||
});
|
||||
|
||||
Color color = Color.black;
|
||||
|
||||
foreach (string name in childrenNames)
|
||||
{
|
||||
Transform transform = button.transform.Find(name);
|
||||
var label = transform.Find("Label").GetComponent<SpriteRenderer>();
|
||||
label.maskInteraction = SpriteMaskInteraction.VisibleInsideMask;
|
||||
label.color = color;
|
||||
var frame = transform.Find("Frame").GetComponent<SpriteRenderer>();
|
||||
frame.maskInteraction = SpriteMaskInteraction.VisibleInsideMask;
|
||||
frame.color = color;
|
||||
Object.Destroy(transform.Find("Background").gameObject);
|
||||
}
|
||||
|
||||
var textMeshPro = button.transform.Find("ModeText").GetComponent<TextMeshPro>();
|
||||
textMeshPro.DestroyTranslator();
|
||||
textMeshPro.text = $"<font=\"DIN_Pro_Bold_700 SDF\">{Translator.GetString("Preset").ToUpper()}</font>";
|
||||
textMeshPro.fontWeight = FontWeight.Bold;
|
||||
textMeshPro.color = Color.white;
|
||||
|
||||
var numberText = Object.Instantiate(textMeshPro, textMeshPro.transform.parent);
|
||||
numberText.transform.localPosition += new Vector3(0f, 1.8f, 0f);
|
||||
numberText.GetComponent<RectTransform>().sizeDelta = new(1.5f, 1.5f);
|
||||
numberText.text = $"<font=\"DIN_Pro_Bold_700 SDF\"><size=300%>{i}</size></font>";
|
||||
|
||||
Buttons[i] = button;
|
||||
}
|
||||
|
||||
y -= 1.8f;
|
||||
}
|
||||
|
||||
{
|
||||
CategoryHeaderMasked header = Object.Instantiate(
|
||||
menu.categoryHeaderOrigin,
|
||||
Vector3.zero,
|
||||
Quaternion.identity,
|
||||
menu.settingsContainer
|
||||
);
|
||||
|
||||
header.SetHeader(StringNames.RolesCategory, 20);
|
||||
header.Title.DestroyTranslator();
|
||||
@@ -46,7 +118,7 @@ public static class OnlinePresetsManager
|
||||
|
||||
y -= 0.8f;
|
||||
|
||||
StringOption upload = OptionBehaviourCache.TryGetValue(-1, out StringOption uploadCache) ? uploadCache : ModGameOptionsMenu.Track(Object.Instantiate(menu.stringOptionOrigin, Vector3.zero, Quaternion.identity, menu.settingsContainer));
|
||||
StringOption upload = Object.Instantiate(menu.stringOptionOrigin, Vector3.zero, Quaternion.identity, menu.settingsContainer);
|
||||
upload.name = nameof(OnlinePresetsManager) + ";" + Translator.GetString("UploadPreset");
|
||||
upload.transform.localPosition = new Vector3(0.952f, y, -2f);
|
||||
upload.SetClickMask(menu.ButtonClickMask);
|
||||
@@ -70,19 +142,17 @@ public static class OnlinePresetsManager
|
||||
upload.gameObject.SetActive(true);
|
||||
|
||||
menu.Children.Add(upload);
|
||||
OptionBehaviourCache[-1] = upload;
|
||||
|
||||
y -= 0.6f;
|
||||
}
|
||||
|
||||
{
|
||||
CategoryHeaderMasked header = HeaderCache.TryGetValue(1, out CategoryHeaderMasked cache) ? cache : ModGameOptionsMenu.Track(Object.Instantiate(
|
||||
CategoryHeaderMasked header = Object.Instantiate(
|
||||
menu.categoryHeaderOrigin,
|
||||
Vector3.zero,
|
||||
Quaternion.identity,
|
||||
menu.settingsContainer
|
||||
));
|
||||
HeaderCache[1] = header;
|
||||
);
|
||||
|
||||
header.SetHeader(StringNames.RolesCategory, 20);
|
||||
header.Title.DestroyTranslator();
|
||||
@@ -96,7 +166,7 @@ public static class OnlinePresetsManager
|
||||
for (var index = 0; index < CachedPresets.Count; index++)
|
||||
{
|
||||
PresetMeta preset = CachedPresets[index];
|
||||
StringOption row = OptionBehaviourCache.TryGetValue(index, out StringOption cache) ? cache : ModGameOptionsMenu.Track(Object.Instantiate(menu.stringOptionOrigin, Vector3.zero, Quaternion.identity, menu.settingsContainer));
|
||||
StringOption row = Object.Instantiate(menu.stringOptionOrigin, Vector3.zero, Quaternion.identity, menu.settingsContainer);
|
||||
row.name = $"{nameof(OnlinePresetsManager)};{string.Format(Translator.GetString("OnlinePresetInfo"), preset.name, preset.author, (Utils.TimeStamp - (long)preset.created_at) / 86400, preset.downloads)}";
|
||||
row.transform.localPosition = new Vector3(0.952f, y, -2f);
|
||||
row.SetClickMask(menu.ButtonClickMask);
|
||||
@@ -119,21 +189,48 @@ public static class OnlinePresetsManager
|
||||
row.PlusBtn.OnClick = new();
|
||||
row.PlusBtn.OnClick.AddListener(() =>
|
||||
{
|
||||
bool b = plusText.text == "ⓘ";
|
||||
GameObject.Find("PlayerOptionsMenu(Clone)").transform.Find("What Is This?").gameObject.SetActive(b);
|
||||
GameSettingMenuPatch.GMButtons.Values.Do(x => x.gameObject.SetActive(!b));
|
||||
if (b) GameSettingMenu.Instance.MenuDescriptionText.text = preset.description;
|
||||
plusText.text = b ? "∅" : "ⓘ";
|
||||
TransitionOpen popup = Object.Instantiate(CustomSettingsUIPatches.GamePresetsTabPatches.TemplateConfirmPopUp, menu.transform, false);
|
||||
popup.gameObject.SetActive(true);
|
||||
popup.transform.localPosition = new Vector3(3f, -2f, popup.transform.localPosition.z);
|
||||
Transform background = popup.transform.Find("Background");
|
||||
Object.Destroy(background.Find("TitleText_TMP").gameObject);
|
||||
Object.Destroy(background.Find("DividerImage").gameObject);
|
||||
Object.Destroy(background.Find("BackButton").gameObject);
|
||||
Object.Destroy(background.Find("ContinueButton").gameObject);
|
||||
TextMeshPro textMeshPro = background.Find("Text_TMP").GetComponent<TextMeshPro>();
|
||||
textMeshPro.DestroyTranslator();
|
||||
textMeshPro.text = preset.description;
|
||||
RectTransform rectTransform = textMeshPro.GetComponent<RectTransform>();
|
||||
rectTransform.sizeDelta = new(rectTransform.sizeDelta.x, 2.5f);
|
||||
PassiveButton closeButton = background.Find("CloseButton").GetComponent<PassiveButton>();
|
||||
closeButton.OnClick.RemoveAllListeners();
|
||||
closeButton.OnClick.AddListener(() =>
|
||||
{
|
||||
LateTask.New(() => Object.Destroy(popup.gameObject), 0.5f);
|
||||
ControllerManager.Instance.CloseOverlayMenu(popup.name);
|
||||
popup.Close();
|
||||
});
|
||||
ControllerManager.Instance.OpenOverlayMenu(popup.name, closeButton, closeButton);
|
||||
});
|
||||
|
||||
row.MinusBtn.transform.localPosition += new Vector3(1.7f, 0f, 0f);
|
||||
row.MinusBtn.OnClick = new();
|
||||
row.MinusBtn.OnClick.AddListener(() =>
|
||||
{
|
||||
LateTask.New(() => { }, 0.01f);
|
||||
GameSettingMenu.Instance.Close();
|
||||
|
||||
Prompt.Show(Translator.GetString("Promt.ApplyPreset"), () =>
|
||||
var confirmPresetPopUp = Object.Instantiate(CustomSettingsUIPatches.GamePresetsTabPatches.TemplateConfirmPopUp, menu.transform, false);
|
||||
confirmPresetPopUp.transform.localPosition = new Vector3(3f, -2f, confirmPresetPopUp.transform.localPosition.z);
|
||||
Transform background = confirmPresetPopUp.transform.Find("Background");
|
||||
PassiveButton presetConfirmButton = background.Find("ContinueButton").GetComponent<PassiveButton>();
|
||||
PassiveButton[] presetCancelButtons = [background.Find("BackButton").GetComponent<PassiveButton>(), background.Find("CloseButton").GetComponent<PassiveButton>()];
|
||||
confirmPresetPopUp.gameObject.SetActive(true);
|
||||
presetConfirmButton.OnClick.RemoveAllListeners();
|
||||
#if IL2CPP
|
||||
foreach (PassiveButton presetCancelButton in presetCancelButtons)
|
||||
presetCancelButton.OnClick.RemoveAllListeners();
|
||||
#else
|
||||
presetCancelButtons.ForEach(x => x.OnClick.RemoveAllListeners());
|
||||
#endif
|
||||
presetConfirmButton.OnClick.AddListener(() =>
|
||||
{
|
||||
Logger.SendInGame(Translator.GetString("DownloadingPreset"));
|
||||
|
||||
@@ -153,22 +250,36 @@ public static class OnlinePresetsManager
|
||||
Logger.SendInGame(Translator.GetString("PresetApplied"), Color.green);
|
||||
})
|
||||
);
|
||||
}, () =>
|
||||
{
|
||||
LateTask.New(() =>
|
||||
{
|
||||
if (!GameStates.IsLobby) return;
|
||||
GameObject.Find("Host Buttons").transform.Find("Edit").GetComponent<PassiveButton>().ReceiveClickDown();
|
||||
}, 0.1f);
|
||||
|
||||
ControllerManager.Instance.CloseOverlayMenu(confirmPresetPopUp.name);
|
||||
confirmPresetPopUp.Close();
|
||||
|
||||
LateTask.New(() =>
|
||||
{
|
||||
if (!GameStates.IsLobby || !GameSettingMenu.Instance) return;
|
||||
const int tabIndex = (int)TabGroup.PresetExplorer + 3;
|
||||
GameSettingMenu.Instance.ChangeTab(tabIndex, Controller.currentTouchType == Controller.TouchType.Joystick);
|
||||
ModGameOptionsMenu.TabIndex = tabIndex;
|
||||
}, 0.4f);
|
||||
}, showBackButton: false);
|
||||
Object.Destroy(confirmPresetPopUp.gameObject);
|
||||
if (!GameSettingMenu.Instance) return;
|
||||
GameSettingMenu.Instance.Close();
|
||||
}, 0.5f);
|
||||
});
|
||||
#if IL2CPP
|
||||
foreach (PassiveButton presetCancelButton in presetCancelButtons)
|
||||
{
|
||||
presetCancelButton.OnClick.AddListener(() =>
|
||||
{
|
||||
ControllerManager.Instance.CloseOverlayMenu(confirmPresetPopUp.name);
|
||||
confirmPresetPopUp.Close();
|
||||
LateTask.New(() => Object.Destroy(confirmPresetPopUp.gameObject), 0.5f);
|
||||
});
|
||||
}
|
||||
#else
|
||||
presetCancelButtons.ForEach(x => x.OnClick.AddListener(() =>
|
||||
{
|
||||
ControllerManager.Instance.CloseOverlayMenu(confirmPresetPopUp.name);
|
||||
confirmPresetPopUp.Close();
|
||||
LateTask.New(() => Object.Destroy(confirmPresetPopUp.gameObject), 0.5f);
|
||||
}));
|
||||
#endif
|
||||
ControllerManager.Instance.OpenOverlayMenu(confirmPresetPopUp.name, presetCancelButtons[0], presetConfirmButton);
|
||||
});
|
||||
TextMeshPro minusText = row.MinusBtn.GetComponentInChildren<TextMeshPro>();
|
||||
minusText.DestroyTranslator();
|
||||
@@ -177,7 +288,6 @@ public static class OnlinePresetsManager
|
||||
row.gameObject.SetActive(true);
|
||||
|
||||
menu.Children.Add(row);
|
||||
OptionBehaviourCache[index] = row;
|
||||
|
||||
y -= 0.6f;
|
||||
}
|
||||
@@ -330,6 +440,7 @@ public static class OnlinePresetsManager
|
||||
if (request.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Logger.SendInGame($"Preset list fetch failed: {request.error}");
|
||||
onSuccess?.Invoke([]);
|
||||
yield break;
|
||||
}
|
||||
|
||||
@@ -348,12 +459,14 @@ public static class OnlinePresetsManager
|
||||
Logger.SendInGame("Preset list parse failed");
|
||||
Logger.Info(request.downloadHandler.text.Trim(), "Response");
|
||||
Utils.ThrowException(ex);
|
||||
onSuccess?.Invoke([]);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (response?.presets == null)
|
||||
{
|
||||
Logger.SendInGame("Preset list empty or invalid");
|
||||
onSuccess?.Invoke([]);
|
||||
yield break;
|
||||
}
|
||||
|
||||
|
||||
+11
-10
@@ -949,7 +949,7 @@ public static class Options
|
||||
_ => CustomGameMode.Standard
|
||||
};
|
||||
|
||||
public static float DefaultKillCooldown = Main.NormalOptions == null ? FallBackKillCooldownValue?.GetFloat() ?? 25f : Main.NormalOptions.KillCooldown;
|
||||
public static float DefaultKillCooldown = Main.NormalOptions == null || Main.NormalOptions.KillCooldown <= 1.1f ? FallBackKillCooldownValue?.GetFloat() ?? 25f : Main.NormalOptions.KillCooldown;
|
||||
|
||||
public static float AdjustedDefaultKillCooldown => !GameStates.InGame
|
||||
? DefaultKillCooldown
|
||||
@@ -981,6 +981,7 @@ public static class Options
|
||||
GroupAddons();
|
||||
LoadUserData();
|
||||
Achievements.LoadAllData();
|
||||
CustomSettingsUIPatches.GameOptionsMenuPatches.InitializeSections();
|
||||
// OptionShower.LastText = Translator.GetString("Loading");
|
||||
|
||||
if (AllCrewRolesHaveVanillaColor.GetBool())
|
||||
@@ -1316,6 +1317,8 @@ public static class Options
|
||||
|
||||
if (IsLoaded) yield break;
|
||||
|
||||
while (!Main.Loaded) yield return null;
|
||||
|
||||
OptionSaver.Initialize();
|
||||
|
||||
yield return null;
|
||||
@@ -3131,8 +3134,8 @@ public static class Options
|
||||
.SetColor(new Color32(193, 255, 209, byte.MaxValue));
|
||||
|
||||
IntegrateNaturalDisasters = new BooleanOptionItem(24454, "IntegrateNaturalDisasters", false, TabGroup.GameSettings)
|
||||
.SetColor(new Color32(193, 255, 209, byte.MaxValue))
|
||||
.RegisterUpdateValueEvent((_, _, _) => GameOptionsMenuPatch.ReCreateSettings(TabGroup.GameSettings));
|
||||
.SetHidden(true)
|
||||
.SetColor(new Color32(193, 255, 209, byte.MaxValue));
|
||||
|
||||
EnableGameTimeLimit = new BooleanOptionItem(24455, "EnableGameTimeLimit", false, TabGroup.GameSettings)
|
||||
.SetColor(new Color32(193, 255, 209, byte.MaxValue))
|
||||
@@ -3203,7 +3206,8 @@ public static class Options
|
||||
id = 68000;
|
||||
|
||||
new TextOptionItem(110040, "MenuTitle.AutoFactionMinMaxSettings", TabGroup.SystemSettings)
|
||||
.SetHeader(true);
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.Standard);
|
||||
|
||||
EnableAutoFactionMinMaxSettings = new BooleanOptionItem(id++, "EnableAutoFactionMinMaxSettings", false, TabGroup.SystemSettings)
|
||||
.SetHeader(true)
|
||||
@@ -3330,11 +3334,6 @@ public static class Options
|
||||
|
||||
for (var index = 1; index <= MaxAutoGMRotationRandomGroups; index++)
|
||||
{
|
||||
new TextOptionItem(100031 + index, "MenuTitle.AGMR.RandomGroup", TabGroup.SystemSettings)
|
||||
.SetHeader(true)
|
||||
.SetParent(EnableAutoGMRotation)
|
||||
.AddReplacement(("{index}", index.ToString()));
|
||||
|
||||
Dictionary<CustomGameMode, OptionItem> dict = [];
|
||||
|
||||
foreach (CustomGameMode customGameMode in Main.CustomGameModeValues[..^1])
|
||||
@@ -3343,7 +3342,9 @@ public static class Options
|
||||
.SetParent(EnableAutoGMRotation)
|
||||
.SetValueFormat(OptionFormat.Percent)
|
||||
.SetColor(Main.GameModeColors[customGameMode])
|
||||
.AddReplacement(("{gm}", Translator.GetString($"{customGameMode}")));
|
||||
.SetHeader(customGameMode == CustomGameMode.Standard)
|
||||
.AddReplacement(("{gm}", Translator.GetString($"{customGameMode}")))
|
||||
.AddReplacement(("{index}", index.ToString()));
|
||||
|
||||
dict[customGameMode] = chanceToSelectGMInGroup;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ public abstract class OptionItem
|
||||
public const int PresetId = 0;
|
||||
public readonly List<OptionItem> Children;
|
||||
|
||||
public OptionBehaviour OptionBehaviour;
|
||||
|
||||
protected OptionItem(int id, string name, int defaultValue, TabGroup tab, bool isSingleValue)
|
||||
{
|
||||
Id = id;
|
||||
@@ -57,7 +55,7 @@ public abstract class OptionItem
|
||||
public bool IsSingleValue { get; }
|
||||
|
||||
public Color NameColor { get; set; }
|
||||
private OptionFormat ValueFormat { get; set; }
|
||||
public OptionFormat ValueFormat { get; set; }
|
||||
public CustomGameMode GameMode { get; private set; }
|
||||
public bool IsHeader { get; protected set; }
|
||||
private bool IsHidden { get; set; }
|
||||
@@ -229,13 +227,13 @@ public abstract class OptionItem
|
||||
return IsSingleValue ? SingleValue : AllValues[CurrentPreset];
|
||||
}
|
||||
|
||||
public bool IsCurrentlyHidden(bool forLobbyView = false, bool checkCollapsedSection = true)
|
||||
public bool IsCurrentlyHidden(bool forLobbyView = false, bool checkParentEnabled = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
for (OptionItem current = this; current != null; current = current.Parent)
|
||||
{
|
||||
if (Hidden(current, forLobbyView, checkCollapsedSection))
|
||||
if (Hidden(this, current, forLobbyView, checkParentEnabled))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -243,9 +241,9 @@ public abstract class OptionItem
|
||||
|
||||
return false;
|
||||
|
||||
static bool Hidden(OptionItem oi, bool forLobbyView, bool checkCollapsedSection)
|
||||
static bool Hidden(OptionItem instance, OptionItem oi, bool forLobbyView, bool checkParentEnabled)
|
||||
{
|
||||
if (checkCollapsedSection && oi.Header is { CollapsesSection: true }) return true;
|
||||
if (checkParentEnabled && oi != instance && !oi.GetBool()) 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 ||
|
||||
@@ -262,12 +260,6 @@ public abstract class OptionItem
|
||||
|
||||
private void Refresh()
|
||||
{
|
||||
if (OptionBehaviour is StringOption opt)
|
||||
{
|
||||
opt.TitleText.text = GetName();
|
||||
opt.ValueText.text = GetString();
|
||||
opt.oldValue = opt.Value = CurrentValue;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetValue(int afterValue, bool doSave, bool doSync = true)
|
||||
@@ -348,6 +340,8 @@ public abstract class OptionItem
|
||||
|
||||
#region static
|
||||
|
||||
public static readonly Dictionary<string, OptionItem> BehaviourNameToItem = [];
|
||||
public static readonly Dictionary<string, CustomRoles> SettingObjectNameToRole = [];
|
||||
public static IReadOnlyList<OptionItem> AllOptions => Options;
|
||||
private static readonly List<OptionItem> Options = new(1024);
|
||||
public static IReadOnlyDictionary<int, OptionItem> FastOptions => FastOpts;
|
||||
|
||||
+15
-10
@@ -209,20 +209,22 @@ public static class Utils
|
||||
|
||||
nt.SnapTo(location, (ushort)(nt.lastSequenceId + 328));
|
||||
nt.SetDirtyBit(uint.MaxValue);
|
||||
|
||||
|
||||
if (NumSnapToCallsThisRound >= 80)
|
||||
{
|
||||
if (log) Logger.Warn($"Too many Reliable SnapTo calls this round ({NumSnapToCallsThisRound}) - Changed to SendOption.None", "TP");
|
||||
sendOption = SendOption.None;
|
||||
}
|
||||
|
||||
if (NumSnapToCallsThisRound >= 100)
|
||||
|
||||
if (GameStates.CurrentServerType == GameStates.ServerType.Vanilla)
|
||||
{
|
||||
if (log) Logger.Warn($"Too many Total SnapTo calls this round and this second ({NumSnapToCallsThisRound}) - Canceled", "TP");
|
||||
return false;
|
||||
if (NumSnapToCallsThisRound >= 100)
|
||||
{
|
||||
if (log) Logger.Warn($"Too many Total SnapTo calls this round and this second ({NumSnapToCallsThisRound}) - Canceled", "TP");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (GameStates.CurrentServerType != GameStates.ServerType.Vanilla)
|
||||
else
|
||||
sendOption = SendOption.Reliable;
|
||||
|
||||
var newSid = (ushort)(nt.lastSequenceId + 8);
|
||||
@@ -1272,7 +1274,7 @@ public static class Utils
|
||||
|
||||
void CheckAndAppendOptionString(OptionItem item)
|
||||
{
|
||||
if (item.GetBool() && item.Parent == null && !item.IsCurrentlyHidden(checkCollapsedSection: false))
|
||||
if (item.GetBool() && item.Parent == null && !item.IsCurrentlyHidden())
|
||||
sb.Append($"\n{item.GetName(true)}: {item.GetString()}");
|
||||
}
|
||||
}
|
||||
@@ -1317,7 +1319,7 @@ public static class Utils
|
||||
|
||||
foreach (OptionItem opt in OptionItem.AllOptions)
|
||||
{
|
||||
if (opt.GetBool() && opt.Parent == null && opt.Id is >= 80000 and < 640000 && !opt.IsCurrentlyHidden(checkCollapsedSection: false))
|
||||
if (opt.GetBool() && opt.Parent == null && opt.Id is >= 80000 and < 640000 && !opt.IsCurrentlyHidden())
|
||||
{
|
||||
if (opt.Name is "KillFlashDuration" or "RoleAssigningAlgorithm")
|
||||
sb.Append($"\n【{opt.GetName(true)}: {opt.GetString()}】\n");
|
||||
@@ -1365,7 +1367,7 @@ public static class Utils
|
||||
|
||||
sb.Append($"━━━━━━━━━━━━【{GetString("Settings")}】━━━━━━━━━━━━");
|
||||
|
||||
foreach (OptionItem opt in OptionItem.AllOptions.Where(x => x.GetBool() && x.Parent == null && x.Id is >= 80000 and < 640000 && !x.IsCurrentlyHidden(checkCollapsedSection: false)))
|
||||
foreach (OptionItem opt in OptionItem.AllOptions.Where(x => x.GetBool() && x.Parent == null && x.Id is >= 80000 and < 640000 && !x.IsCurrentlyHidden()))
|
||||
{
|
||||
if (opt.Name == "KillFlashDuration")
|
||||
sb.Append($"\n【{opt.GetName(true)}: {opt.GetString()}】\n");
|
||||
@@ -4302,6 +4304,9 @@ public static class Utils
|
||||
|
||||
switch (target.GetCustomRole())
|
||||
{
|
||||
case CustomRoles.Trapster:
|
||||
Trapster.TrapsterBody.Remove(target.PlayerId);
|
||||
break;
|
||||
case CustomRoles.Veteran when target.AmOwner && Veteran.VeteranInProtect.Contains(target.PlayerId):
|
||||
Achievements.Type.BadEncounter.Complete();
|
||||
break;
|
||||
|
||||
+14
-34
@@ -87,23 +87,7 @@ internal static class ControllerManagerUpdatePatch
|
||||
PlayerControl.LocalPlayer.Collider.offset = shouldNoclip ? new Vector2(0f, 127f) : new Vector2(0f, -0.3636f);
|
||||
}
|
||||
|
||||
if (!chatIsOpen)
|
||||
{
|
||||
if (isLobby)
|
||||
{
|
||||
/*if (Input.GetKeyDown(KeyCode.Tab)) OptionShower.Next();
|
||||
|
||||
for (var i = 0; i < 9; i++)
|
||||
{
|
||||
if (OrGetKeysDown(KeyCode.Alpha1 + i, KeyCode.Keypad1 + i) && OptionShower.Pages.Count >= i + 1)
|
||||
OptionShower.CurrentPage = i;
|
||||
}*/
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Return) && GameSettingMenu.Instance && GameSettingMenu.Instance.isActiveAndEnabled)
|
||||
GameSettingMenuPatch.SearchForOptionsAction?.Invoke();
|
||||
}
|
||||
}
|
||||
else
|
||||
if (chatIsOpen)
|
||||
{
|
||||
ChatController chat = HudManager.Instance.Chat;
|
||||
|
||||
@@ -113,19 +97,19 @@ internal static class ControllerManagerUpdatePatch
|
||||
|
||||
if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) && Input.GetKeyDown(KeyCode.C))
|
||||
ClipboardHelper.PutClipboardString(chat.freeChatField.textArea.text);
|
||||
|
||||
if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) &&
|
||||
Input.GetKeyDown(KeyCode.V))
|
||||
{
|
||||
var textArea = chat.freeChatField.textArea;
|
||||
|
||||
string currentText = textArea.text ?? string.Empty;
|
||||
string clipboard = GUIUtility.systemCopyBuffer ?? string.Empty;
|
||||
|
||||
int caretPos = Mathf.Clamp(textArea.caretPos, 0, currentText.Length);
|
||||
|
||||
textArea.SetText(currentText.Insert(caretPos, clipboard));
|
||||
textArea.caretPos = caretPos + clipboard.Length;
|
||||
|
||||
if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) &&
|
||||
Input.GetKeyDown(KeyCode.V))
|
||||
{
|
||||
var textArea = chat.freeChatField.textArea;
|
||||
|
||||
string currentText = textArea.text ?? string.Empty;
|
||||
string clipboard = GUIUtility.systemCopyBuffer ?? string.Empty;
|
||||
|
||||
int caretPos = Mathf.Clamp(textArea.caretPos, 0, currentText.Length);
|
||||
|
||||
textArea.SetText(currentText.Insert(caretPos, clipboard));
|
||||
textArea.caretPos = caretPos + clipboard.Length;
|
||||
}
|
||||
|
||||
if ((Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl)) && Input.GetKeyDown(KeyCode.X))
|
||||
@@ -308,10 +292,6 @@ internal static class ControllerManagerUpdatePatch
|
||||
OptionSaver.Save();
|
||||
|
||||
IsResetting = false;
|
||||
|
||||
GameOptionsMenuPatch.ReCreateAllSettings();
|
||||
GameOptionsMenuPatch.RefreshSettingValues();
|
||||
GameOptionsMenuPatch.RefreshTabButtons();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -19,7 +19,7 @@ public static class DiscordRPC
|
||||
|
||||
activity.Assets = new ActivityAssets
|
||||
{
|
||||
LargeImage = "https://i.imgur.com/07BjW2j.png"
|
||||
LargeImage = "https://i.imgur.com/fa7kFkv.png"
|
||||
};
|
||||
|
||||
try
|
||||
|
||||
+15
-14
@@ -21,13 +21,14 @@ internal static class ExileControllerWrapUpPatch
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
|
||||
var decidedWinner = false;
|
||||
CustomRoles role = exiled.GetCustomRole();
|
||||
bool collectorWin = Collector.CollectorWin(false);
|
||||
bool decidedWinner = collectorWin;
|
||||
|
||||
if (!Collector.CollectorWin(false) && exiled != null)
|
||||
if (!collectorWin && exiled != null)
|
||||
{
|
||||
//exiled.IsDead = true;
|
||||
Main.PlayerStates[exiled.PlayerId].deathReason = PlayerState.DeathReason.Vote;
|
||||
CustomRoles role = exiled.GetCustomRole();
|
||||
|
||||
if (Main.EnumeratePlayerControls().Any(x => x.Is(CustomRoles.Innocent) && !x.IsAlive() && x.GetRealKiller()?.PlayerId == exiled.PlayerId))
|
||||
{
|
||||
@@ -59,21 +60,21 @@ internal static class ExileControllerWrapUpPatch
|
||||
Damocles.OnCrewmateEjected();
|
||||
}
|
||||
|
||||
if (role == CustomRoles.Jester)
|
||||
{
|
||||
if (decidedWinner) CustomWinnerHolder.ShiftWinnerAndSetWinner(CustomWinner.Jester);
|
||||
else CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Jester);
|
||||
|
||||
CustomWinnerHolder.WinnerIds.Add(exiled.PlayerId);
|
||||
decidedWinner = true;
|
||||
}
|
||||
|
||||
if (Executioner.CheckExileTarget(exiled)) decidedWinner = true;
|
||||
|
||||
if (CustomWinnerHolder.WinnerTeam != CustomWinner.Terrorist)
|
||||
Main.PlayerStates[exiled.PlayerId].SetDead();
|
||||
}
|
||||
|
||||
if (role == CustomRoles.Jester)
|
||||
{
|
||||
if (decidedWinner) CustomWinnerHolder.ShiftWinnerAndSetWinner(CustomWinner.Jester);
|
||||
else CustomWinnerHolder.ResetAndSetWinner(CustomWinner.Jester);
|
||||
|
||||
CustomWinnerHolder.WinnerIds.Add(exiled.PlayerId);
|
||||
decidedWinner = true;
|
||||
}
|
||||
|
||||
if (Executioner.CheckExileTarget(exiled)) decidedWinner = true;
|
||||
|
||||
Witch.RemoveSpelledPlayer();
|
||||
|
||||
Swapper.OnExileFinish();
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -979,7 +979,7 @@ internal static class MapRoomDoorsUpdatePatch
|
||||
|
||||
if (!doorSprite || !shipStatusInstance) return false;
|
||||
#if IL2CPP
|
||||
if (SubmergedCompatibility.IsSubmerged() || Main.LIMap) return true;
|
||||
if (SubmergedCompatibility.IsSubmerged() || Main.LIMap || Main.CurrentMap == MapNames.MiraHQ) return true;
|
||||
#endif
|
||||
|
||||
SystemTypes room = __instance.room;
|
||||
|
||||
@@ -439,7 +439,7 @@ internal static class SetUpRoleTextPatch
|
||||
|
||||
foreach (OptionItem o in options)
|
||||
{
|
||||
if (!o.IsCurrentlyHidden(checkCollapsedSection: false) && (o.Parent == null ? !o.GetString().Equals(disabledRoleStr) : AllParentsEnabled(o)))
|
||||
if (!o.IsCurrentlyHidden() && (o.Parent == null ? !o.GetString().Equals(disabledRoleStr) : AllParentsEnabled(o)))
|
||||
sb.Append($"{(o.Parent == null ? o.GetName(true, true).RemoveHtmlTags().PadRightV2(40) : $"┗ {o.GetName(true, true).RemoveHtmlTags()}".PadRightV2(41))}:{o.GetString().RemoveHtmlTags()}\n");
|
||||
|
||||
if (i++ > 20)
|
||||
@@ -1211,7 +1211,11 @@ internal static class IntroCutsceneDestroyPatch
|
||||
|
||||
Main.IntroDestroyed = true;
|
||||
PreventKill = true;
|
||||
LateTask.New(() => PreventKill = false, Options.StartingKillCooldown?.GetFloat() ?? 10f, "PreventKillReset");
|
||||
LateTask.New(() =>
|
||||
{
|
||||
PreventKill = false;
|
||||
Main.ProcessShapeshifts = true;
|
||||
}, Options.StartingKillCooldown?.GetFloat() ?? 10f, "PreventKillReset");
|
||||
|
||||
var apc = Main.AllPlayerControlsToList;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using EHR.Modules;
|
||||
#if IL2CPP
|
||||
using BepInEx.Unity.IL2CPP.Utils.Collections;
|
||||
#endif
|
||||
@@ -622,7 +623,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
foreach (OptionItem option in OptionItem.AllOptions)
|
||||
{
|
||||
if (option.Tab != tabName) continue;
|
||||
BaseGameSetting data = GameOptionsMenuPatch.GetSetting(option);
|
||||
BaseGameSetting data = GetSetting(option);
|
||||
|
||||
bool enabledOrNotCollapsed = !option.IsCurrentlyHidden(true) && AllParentsEnabledAndVisible(option.Parent);
|
||||
|
||||
@@ -800,8 +801,8 @@ public static class LobbyViewSettingsPanePatch
|
||||
if (option.GameMode is not CustomGameMode.All && option.GameMode != LastGameModeSelected) continue;
|
||||
|
||||
bool enabledOrNotCollapsed = !option.IsCurrentlyHidden(true) && AllParentsEnabledAndVisible(option.Parent);
|
||||
bool enabled = !option.IsCurrentlyHidden(true, false) && AllParentsEnabledAndVisible(option.Parent, false);
|
||||
BaseGameSetting data = GameOptionsMenuPatch.GetSetting(option);
|
||||
bool enabled = !option.IsCurrentlyHidden(true) && AllParentsEnabledAndVisible(option.Parent);
|
||||
BaseGameSetting data = GetSetting(option);
|
||||
string titleName = option.GetName(true).Trim('★', ' ').RemoveHtmlTags();
|
||||
string realName = option.Name;
|
||||
|
||||
@@ -902,7 +903,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
}
|
||||
|
||||
if (role.IsExperimental()) titleName += $"<size=2>{Translator.GetString("ExperimentalRoleIndicator")}</size>";
|
||||
if (role.IsGhostRole()) titleName += StringOptionPatch.GetGhostRoleTeam(role);
|
||||
if (role.IsGhostRole()) titleName += GetGhostRoleTeam(role);
|
||||
if (role.IsDevFavoriteRole()) titleName += " <size=2><#00ffff>★</color></size>";
|
||||
|
||||
int chanceAddOnPerGame = Options.CustomAdtRoleSpawnRate.TryGetValue(role, out IntegerOptionItem valueAddOnOpt) ? valueAddOnOpt.GetInt() : 0;
|
||||
@@ -1104,7 +1105,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
bool show = firstOption.Name != "Maximum";
|
||||
if (!show) continue;
|
||||
|
||||
BaseGameSetting data = GameOptionsMenuPatch.GetSetting(firstOption);
|
||||
BaseGameSetting data = GetSetting(firstOption);
|
||||
if (!data) continue;
|
||||
|
||||
DrawSetting(firstOption, data);
|
||||
@@ -1112,7 +1113,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
|
||||
foreach (OptionItem secondOption in firstOption.Children)
|
||||
{
|
||||
data = GameOptionsMenuPatch.GetSetting(secondOption);
|
||||
data = GetSetting(secondOption);
|
||||
if (!data) continue;
|
||||
|
||||
DrawSetting(secondOption, data);
|
||||
@@ -1120,7 +1121,7 @@ public static class LobbyViewSettingsPanePatch
|
||||
|
||||
foreach (OptionItem thirdOption in secondOption.Children)
|
||||
{
|
||||
data = GameOptionsMenuPatch.GetSetting(thirdOption);
|
||||
data = GetSetting(thirdOption);
|
||||
if (!data) continue;
|
||||
|
||||
DrawSetting(thirdOption, data);
|
||||
@@ -1181,13 +1182,80 @@ public static class LobbyViewSettingsPanePatch
|
||||
}
|
||||
}
|
||||
|
||||
private static bool AllParentsEnabledAndVisible(OptionItem o, bool checkCollapsedSection = true)
|
||||
private static bool AllParentsEnabledAndVisible(OptionItem o)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
if (o == null) return true;
|
||||
if (o.IsCurrentlyHidden(true, checkCollapsedSection) || !o.GetBool()) return false;
|
||||
if (o.IsCurrentlyHidden(true) || !o.GetBool()) return false;
|
||||
o = o.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
public static BaseGameSetting GetSetting(OptionItem item)
|
||||
{
|
||||
BaseGameSetting baseGameSetting;
|
||||
|
||||
switch (item)
|
||||
{
|
||||
case BooleanOptionItem:
|
||||
var checkboxGameSetting = ScriptableObject.CreateInstance<CheckboxGameSetting>();
|
||||
checkboxGameSetting.Type = OptionTypes.Checkbox;
|
||||
baseGameSetting = checkboxGameSetting;
|
||||
break;
|
||||
case IntegerOptionItem integerOptionItem:
|
||||
var intGameSetting = ScriptableObject.CreateInstance<IntGameSetting>();
|
||||
intGameSetting.Type = OptionTypes.Int;
|
||||
intGameSetting.Value = integerOptionItem.GetInt();
|
||||
intGameSetting.Increment = integerOptionItem.Rule.Step;
|
||||
intGameSetting.ValidRange = new(integerOptionItem.Rule.MinValue, integerOptionItem.Rule.MaxValue);
|
||||
intGameSetting.ZeroIsInfinity = false;
|
||||
intGameSetting.SuffixType = NumberSuffixes.Multiplier;
|
||||
intGameSetting.FormatString = string.Empty;
|
||||
baseGameSetting = intGameSetting;
|
||||
break;
|
||||
case FloatOptionItem floatOptionItem:
|
||||
var floatGameSetting = ScriptableObject.CreateInstance<FloatGameSetting>();
|
||||
floatGameSetting.Type = OptionTypes.Float;
|
||||
floatGameSetting.Value = floatOptionItem.GetFloat();
|
||||
floatGameSetting.Increment = floatOptionItem.Rule.Step;
|
||||
floatGameSetting.ValidRange = new(floatOptionItem.Rule.MinValue, floatOptionItem.Rule.MaxValue);
|
||||
floatGameSetting.ZeroIsInfinity = false;
|
||||
floatGameSetting.SuffixType = NumberSuffixes.Multiplier;
|
||||
floatGameSetting.FormatString = string.Empty;
|
||||
baseGameSetting = floatGameSetting;
|
||||
break;
|
||||
case StringOptionItem stringOptionItem:
|
||||
var stringGameSetting = ScriptableObject.CreateInstance<StringGameSetting>();
|
||||
stringGameSetting.Type = OptionTypes.String;
|
||||
stringGameSetting.Values = new StringNames[stringOptionItem.Selections.Count];
|
||||
stringGameSetting.Index = stringOptionItem.GetInt();
|
||||
baseGameSetting = stringGameSetting;
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
baseGameSetting.Title = StringNames.Accept;
|
||||
return baseGameSetting;
|
||||
}
|
||||
|
||||
public static string GetGhostRoleTeam(CustomRoles role)
|
||||
{
|
||||
IGhostRole instance = GhostRolesManager.CreateGhostRoleInstance(role);
|
||||
if (instance == null) return string.Empty;
|
||||
|
||||
StringBuilder stringBuilder = new("<size=2>");
|
||||
|
||||
foreach (Team team in Main.TeamValues[1..])
|
||||
{
|
||||
if ((instance.Team & team) != 0)
|
||||
{
|
||||
if (stringBuilder.Length > 8) stringBuilder.Append('/');
|
||||
stringBuilder.Append(Utils.ColorString(team.GetColor(), Translator.GetString($"ShortTeamName.{team}").ToUpper()));
|
||||
}
|
||||
}
|
||||
|
||||
return stringBuilder.Append("</size>").ToString();
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public static class MatchInfoGuidePatch
|
||||
{
|
||||
foreach (OptionItem optionItem in settings)
|
||||
{
|
||||
if (optionItem.IsCurrentlyHidden(checkCollapsedSection: false) || optionItem.Parent != null || optionItem is PresetOptionItem or TextOptionItem) continue;
|
||||
if (optionItem.IsCurrentlyHidden() || optionItem.Parent != null || optionItem is PresetOptionItem or TextOptionItem) continue;
|
||||
|
||||
string value = optionItem switch
|
||||
{
|
||||
|
||||
@@ -23,8 +23,6 @@ internal static class NotificationPopperPatch
|
||||
|
||||
public static void AddSettingsChangeMessage(OptionItem option)
|
||||
{
|
||||
if (GameSettingMenuPatch.ChangingPreset) return;
|
||||
|
||||
string optValue = option.GetString();
|
||||
if (optValue == "STRMISS") return;
|
||||
|
||||
|
||||
@@ -1248,7 +1248,7 @@ internal static class ReportDeadBodyPatch
|
||||
x.IsBlackOut = false;
|
||||
x.Player.MarkDirtySettings();
|
||||
});
|
||||
}, 15f, "RemoveBlackout");
|
||||
}, 5f, "RemoveBlackout");
|
||||
|
||||
if (Main.GameTimer.IsRunning && !Options.GameTimeLimitRunsDuringMeetings.GetBool())
|
||||
Main.GameTimer.Stop();
|
||||
@@ -1695,7 +1695,7 @@ internal static class FixedUpdatePatch
|
||||
AmongUsClient.Instance.ChangeGamePublic(false);
|
||||
|
||||
// Kick low-level people
|
||||
if (!lowLoad && isLobby && GameSettingMenuPatch.LastPresetChange + 5 < TimeStamp && !player.AmOwner && Options.KickLowLevelPlayer.GetInt() != 0 && (
|
||||
if (!lowLoad && isLobby && !player.AmOwner && Options.KickLowLevelPlayer.GetInt() != 0 && (
|
||||
player.Data.PlayerLevel != 0 && player.Data.PlayerLevel < Options.KickLowLevelPlayer.GetInt() ||
|
||||
player.Data.FriendCode == string.Empty
|
||||
))
|
||||
|
||||
@@ -233,7 +233,7 @@ internal static class OnGameJoinedPatch
|
||||
float timer;
|
||||
if (nextGM != CustomGameMode.All) timer = 0f;
|
||||
else if (Options.AutoGMPollCommandAfterJoin.GetBool()) timer = Options.AutoGMPollCommandCooldown.GetInt() - 10;
|
||||
else if (Main.AutoStart.Value) timer = Options.MinWaitAutoStart.GetFloat() * 60 - 65;
|
||||
else if (Main.AutoStart.Value) timer = Options.MinWaitAutoStart.GetFloat() * 60 - 70;
|
||||
else timer = 30f;
|
||||
|
||||
Logger.Info($"Auto GM Rotation timer: {timer}", "Auto GM Rotation");
|
||||
|
||||
@@ -1935,6 +1935,7 @@
|
||||
"FrightenerInfo": "Prevent Players From Reporting",
|
||||
"FrightenerInfoLong": "(Impostors):\\nAs the Frightener, you can shapeshift into a player to alarm them for some time. Alarmed players can't report bodies (or even call meetings), else they die.",
|
||||
"Frightener.KillOnEmergencyMeetingCall": "Alarmed Players Die When Calling an Emergency Meeting",
|
||||
"Frightener.Suffix": "Alarmed players: {0}",
|
||||
"Gambler": "Gambler",
|
||||
"GamblerInfo": "Each Kill gets you an Effect",
|
||||
"GamblerInfoLong": "(Impostors):\\nAs the Gambler, a random event happens after each kill you get. These effects can be anywhere between a self-report and an extra sniper shot.",
|
||||
@@ -2168,6 +2169,7 @@
|
||||
"PenguinTimerText": "Drag Timer",
|
||||
"PenguinVictimCanUseAbilities": "Victim Can Use Their Abilities While Being Dragged",
|
||||
"PenguinVictimKill": "As the victim of the Penguin/Goose, you cannot interact with others",
|
||||
"PenguinCanVentWhileDragging": "Can Vent While Dragging",
|
||||
"Perplexer": "Perplexer",
|
||||
"PerplexerInfo": "Invert a player's movement controls",
|
||||
"PerplexerInfoLong": "(Impostors):\\nAs the Perplexer, use your shapeshift menu to select a player. That player will get their movement controls inverted for a certain amount of time.",
|
||||
@@ -2303,7 +2305,7 @@
|
||||
"TransposerInfoLong": "(Impostors):\\nAs the Transposer, you can select 2 players using your shapeshift menu to forcefully shapeshift them into each other for some time.",
|
||||
"Trapster": "Trapster",
|
||||
"TrapsterInfo": "Start a killing chain",
|
||||
"TrapsterInfoLong": "(Impostors):\\nAs the Trapster, you can vanish/pet to create a fake dead body. Anyone who reports this body will die, and depending on settings, the body will be reported.\\n\\n(Legacy Version):\\nIn the game, the Trapster kills a player and then puts a trap on their body. If another player reports the dead body and it has the Trapster's trap on it, the player who reports it will die instantly without the body getting reported. The player killed by the Trapster's trap will also become a Trapster. This chain reaction continues until no more players are left to become Trapsters. However, the Trapster will die immediately after making a kill. It's worth noting that the Trapster's own dead body cannot trigger their trap.",
|
||||
"TrapsterInfoLong": "(Impostors):\\nAs the Trapster, you can vanish/pet to create a fake dead body. Anyone who reports this body will die, and depending on settings, the body will be reported. After you die, your fake bodies won't cause deaths anymore.\\n\\n(Legacy Version):\\nIn the game, the Trapster kills a player and then puts a trap on their body. If another player reports the dead body and it has the Trapster's trap on it, the player who reports it will die instantly without the body getting reported. The player killed by the Trapster's trap will also become a Trapster. This chain reaction continues until no more players are left to become Trapsters. However, the Trapster will die immediately after making a kill. It's worth noting that the Trapster's own dead body cannot trigger their trap.",
|
||||
"Trickster": "Trickster",
|
||||
"TricksterInfo": "Kill and trick the crew",
|
||||
"TricksterInfoLong": "(Impostors):\\nAs the Trickster, you function as a regular Impostor but with one key difference. You appear crewmate to crewmate roles.\\n\\nThe Sheriff cannot kill you.\\nPsychic does not see you as evil.\\nSnitch cannot find you.",
|
||||
@@ -4257,6 +4259,7 @@
|
||||
"NToCheckGameModeSettings": "Type <b>/n</b> to view the settings for this game mode",
|
||||
"Standard": "Standard",
|
||||
"ModeStandard": "Gamemode: Standard",
|
||||
"StandardInfo": "Classic gameplay with custom roles",
|
||||
"BedWars": "BED WARS",
|
||||
"ModeBedWars": "Gamemode: Bed Wars",
|
||||
"ModeDescribe.BedWars": "In the Bed Wars gamemode, players are split into teams. Each team has a bed. If a team's bed is destroyed, all players in that team can no longer respawn. The goal is to destroy all other teams' beds (via Pet button) and be the last team alive.\\n\\nYou can buy items (blocks, weapons, tool, etc.) and team upgrades (heal pool, haste, trap, etc.) in shops from the resources (iron, gold, diamond, emerald) you can collect from the generators on the map. These are useful for protecting the bed with various layers to make it harder to break it, increase your attack damage, increase your defense, or give you or your team various abilities.\\n\\nIn the beginning, there's a grace period, where no attacks are allowed, and players can't leave their own base.\\n\\nEach player has an inventory with all of their items. Cycle through the slots using the Vanish button or by typing the number of the slot in the chat (ex. '5'). Use weapons through the kill button, other items via Pet. To start breaking someone's bed, Pet. Make sure to always have the correct item selected in your inventory (blocks when you protect the bed, tools when you break beds, etc.).\\nYou can break beds with anything, but using the correct tool for each layer will make the process significantly faster.\\n\\nIf you die, you will respawn after a few seconds, unless your bed is broken. If your bed is broken, you will not respawn anymore.",
|
||||
@@ -4486,8 +4489,12 @@
|
||||
"HideAndSeek": "HIDE AND SEEK",
|
||||
"ModeHideAndSeek": "Gamemode: Hide And Seek",
|
||||
"ModeShiftAndSeek": "Gamemode: Shift And Seek",
|
||||
"HideAndSeekInfo": "Custom HNS gameplay with unique roles",
|
||||
"ModeDescribe.HideAndSeek": "In the Hide And Seek gamemode, seekers have to kill all hiders, while hiders have to complete all tasks without being killed in order to win.\\nIf the time limit reaches 0, hiders win.\\nIf everyone apart from the Seekers die, the Seekers win.\\n\\nRoles: Hider, Seeker, Fox, Troll, Jumper, Detector, Jet, Dasher, Locator, Venter, Agent, Taskinator",
|
||||
"GameModeTutorial.HideAndSeek": "<size=90%>The current game mode is <#345eeb>Hide And Seek (Modded)</color>.</size>\\n<size=80%>Seekers must kill all hiders to win,\\nhiders must complete tasks to lower the timer.\\nIf the time limit ends, hiders win.</size>",
|
||||
"HNS.CrewmateRoles": "HIDER ROLES",
|
||||
"HNS.ImpostorRoles": "SEEKER ROLES",
|
||||
"HNS.NeutralRoles": "NEUTRAL ROLES",
|
||||
"HNS.DangerMeter": "Show (Custom) Danger Meter",
|
||||
"HNS.MaxNeutrals": "<#0000ff>Maximum</color> Number of <#ffab1b>Neutrals</color>",
|
||||
"HNS.MinNeutrals": "<#00ffff>Minimum</color> Number of <#ffab1b>Neutrals</color>",
|
||||
@@ -8698,6 +8705,8 @@
|
||||
"Achievement.YoureMyFriendNow.Description": "Recruit anyone as Gangster/Jackal/Infection/Virus/Cultist",
|
||||
"Achievement.YoureTooLate": "You're Too Late",
|
||||
"Achievement.YoureTooLate.Description": "As Pestilence, have a killer try to kill you, but unsuccessfully for them",
|
||||
"BasicSettings": "Basic Settings",
|
||||
"GameModeSettings": "Game Mode Settings",
|
||||
"TabGroup.VanillaSettings": "Vanilla Settings",
|
||||
"TabGroup.SystemSettings": "System Settings",
|
||||
"ModLanguage": "Mod Language",
|
||||
@@ -8844,8 +8853,7 @@
|
||||
"GameMode": "Game Mode",
|
||||
"AGMR.Slot.RandomGroupId": "Number/ID of the random group to use for choosing the game mode for this slot/game",
|
||||
"AGMR.Slot.Count": "How many times should we repeat this?",
|
||||
"MenuTitle.AGMR.RandomGroup": "Random Group {index}",
|
||||
"AGMR.RandomGroup.GMChance": "Chance of selecting {gm}",
|
||||
"AGMR.RandomGroup.GMChance": "[Random Group {index}] Chance of selecting {gm}",
|
||||
"TabGroup.GameSettings": "Mod Settings",
|
||||
"MenuTitle.Ejections": "★ Ejection ★",
|
||||
"ConfirmEjectionsMode": "Confirm Ejections Mode",
|
||||
@@ -9053,6 +9061,8 @@
|
||||
"ShowTaskCountWhenAlive": "Show Task Count When Alive",
|
||||
"ShowTaskCountWhenDead": "Show Task Count When Dead",
|
||||
"IntegrateNaturalDisasters": "Integrate the Natural Disasters game mode into the current game mode",
|
||||
"NDIntegrationShort": "Integrate\\nNatural\\nDisasters",
|
||||
"MenuDescription.GameModes": "Choose which game mode you want to play.",
|
||||
"EnableGameTimeLimit": "Enable Game Time Limit (Expired = No One Wins)",
|
||||
"GameTimeLimit": "Game Time Limit",
|
||||
"GameTimerEnded": "Game Time Limit Ended",
|
||||
@@ -10227,7 +10237,6 @@
|
||||
"PromotedSKCanRecruit": "New <color=#00b4eb>Jackal</color> can recruit new <color=#00b4eb>Sidekick</color>",
|
||||
"DownloadingPreset": "Downloading preset....",
|
||||
"PresetApplied": "Preset applied successfully!",
|
||||
"Promt.ApplyPreset": "<#ffff00>⚠ WARNING ⚠</color>\\nApplying this preset <b><u>OVERRIDES</u> your current preset</b>! Back it up if you need it or switch to an unused preset slot. It will be permanently deleted!\\nDo you wish to proceed?",
|
||||
"Promt.EnableAllRoles": "Enable all roles and add-ons?<size=80%>\\n\\n<b>Yes</b> - Enable all roles and add-ons\\n<b>No</b> - Enter the quick setup dialog of roles and add-ons</size>",
|
||||
"Promt.EnableRole": "<size=60%>({0}/{1}) {2}\\n</size><size=80%>Enable {3}?</size><size=60%>\\n\\n{4}</size>",
|
||||
"Promt.ResetAllOptions": "Are you sure you want to reset all options? This action is irreversible and may take few minutes.",
|
||||
@@ -10294,6 +10303,14 @@
|
||||
"ShortTeamName.Crewmate": "Crew",
|
||||
"ShortTeamName.Impostor": "Imp",
|
||||
"ShortTeamName.Neutral": "Neut",
|
||||
"ShortTabName.ImpostorRoles": "IMPOSTORS",
|
||||
"ShortTabName.CrewmateRoles": "CREWMATES",
|
||||
"ShortTabName.NeutralRoles": "NEUTRALS",
|
||||
"ShortTabName.CovenRoles": "COVEN",
|
||||
"ShortTabName.Addons": "ADD-ONS",
|
||||
"ShortTabName.OtherRoles": "GHOSTS",
|
||||
"ShortTabName.HNSRoles": "HNS ROLES",
|
||||
"BackToList": "BACK TO LIST",
|
||||
"ShowArrows": "Has Arrows pointing toward bodies",
|
||||
"ShowResults": "Show Results",
|
||||
"ShowSpecificRole": "Know specific roles on Task Completion",
|
||||
@@ -10710,6 +10727,7 @@
|
||||
"Untouched": "Global Setting Decides",
|
||||
"UploadPreset": "Upload current preset to database",
|
||||
"UploadPresetHeader": "Upload & Publish",
|
||||
"LocalPresets": "Local Presets",
|
||||
"UseLegacyVersion": "Use Legacy Version",
|
||||
"UsesPetInsteadOfKillNotice": "<#ffff00>⚠ As this role, you need to use your pet button as your kill button!</color>",
|
||||
"VengefulHasImpVision": "<color=#ba2749>Vengeful Romantic</color> Has <#ff1919>Impostor</color> Vision",
|
||||
|
||||
@@ -6,7 +6,7 @@ internal class Hider : RoleBase, IHideAndSeekRole
|
||||
{
|
||||
private static bool On;
|
||||
|
||||
public const int StartId = 69_211_199;
|
||||
public const int StartId = 69_211_101;
|
||||
|
||||
private static OptionItem Vision;
|
||||
private static OptionItem Speed;
|
||||
@@ -25,41 +25,38 @@ internal class Hider : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(StartId, "Hider", TabGroup.CrewmateRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetHeader(true);
|
||||
|
||||
Vision = new FloatOptionItem(69_211_101, "HiderVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.CrewmateRoles)
|
||||
Vision = new FloatOptionItem(StartId, "HiderVision", new(0.05f, 5f, 0.05f), 1.25f, TabGroup.GameSettings)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
Speed = new FloatOptionItem(69_211_102, "HiderSpeed", new(0.05f, 5f, 0.05f), 1.4f, TabGroup.CrewmateRoles)
|
||||
Speed = new FloatOptionItem(StartId + 1, "HiderSpeed", new(0.05f, 5f, 0.05f), 1.4f, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
TimeDecreaseOnShortTaskComplete = new IntegerOptionItem(69_211_103, "TimeDecreaseOnShortTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles)
|
||||
TimeDecreaseOnShortTaskComplete = new IntegerOptionItem(StartId + 2, "TimeDecreaseOnShortTaskComplete", new(0, 60, 1), 5, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
TimeDecreaseOnCommonTaskComplete = new IntegerOptionItem(69_211_104, "TimeDecreaseOnCommonTaskComplete", new(0, 60, 1), 10, TabGroup.CrewmateRoles)
|
||||
TimeDecreaseOnCommonTaskComplete = new IntegerOptionItem(StartId + 3, "TimeDecreaseOnCommonTaskComplete", new(0, 60, 1), 10, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
TimeDecreaseOnLongTaskComplete = new IntegerOptionItem(69_211_105, "TimeDecreaseOnLongTaskComplete", new(0, 60, 1), 15, TabGroup.CrewmateRoles)
|
||||
TimeDecreaseOnLongTaskComplete = new IntegerOptionItem(StartId + 4, "TimeDecreaseOnLongTaskComplete", new(0, 60, 1), 15, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
TimeDecreaseOnSituationalTaskComplete = new IntegerOptionItem(69_211_106, "TimeDecreaseOnSituationalTaskComplete", new(0, 60, 1), 20, TabGroup.CrewmateRoles)
|
||||
TimeDecreaseOnSituationalTaskComplete = new IntegerOptionItem(StartId + 5, "TimeDecreaseOnSituationalTaskComplete", new(0, 60, 1), 20, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
TimeDecreaseOnOtherTaskComplete = new IntegerOptionItem(69_211_107, "TimeDecreaseOnOtherTaskComplete", new(0, 60, 1), 5, TabGroup.CrewmateRoles)
|
||||
TimeDecreaseOnOtherTaskComplete = new IntegerOptionItem(StartId + 6, "TimeDecreaseOnOtherTaskComplete", new(0, 60, 1), 5, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(52, 94, 235, byte.MaxValue));
|
||||
|
||||
@@ -6,7 +6,7 @@ internal class Seeker : RoleBase, IHideAndSeekRole
|
||||
{
|
||||
public static bool On;
|
||||
|
||||
public const int StartId = 69_211_299;
|
||||
public const int StartId = 69_211_201;
|
||||
|
||||
public static OptionItem Vision;
|
||||
public static OptionItem Speed;
|
||||
@@ -23,30 +23,27 @@ internal class Seeker : RoleBase, IHideAndSeekRole
|
||||
|
||||
public override void SetupCustomOption()
|
||||
{
|
||||
new TextOptionItem(StartId, "Seeker", TabGroup.ImpostorRoles)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetHeader(true);
|
||||
|
||||
Vision = new FloatOptionItem(69_211_201, "SeekerVision", new(0.05f, 5f, 0.05f), 0.25f, TabGroup.ImpostorRoles)
|
||||
Vision = new FloatOptionItem(StartId, "SeekerVision", new(0.05f, 5f, 0.05f), 0.25f, TabGroup.GameSettings)
|
||||
.SetHeader(true)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
|
||||
Speed = new FloatOptionItem(69_211_202, "SeekerSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.ImpostorRoles)
|
||||
Speed = new FloatOptionItem(StartId + 1, "SeekerSpeed", new(0.05f, 5f, 0.05f), 1.5f, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Multiplier)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
|
||||
CanVent = new BooleanOptionItem(69_211_204, "CanVent", false, TabGroup.ImpostorRoles)
|
||||
CanVent = new BooleanOptionItem(StartId + 3, "CanVent", false, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
|
||||
BlindTime = new FloatOptionItem(69_211_206, "BlindTime", new(0f, 60f, 1f), 10f, TabGroup.ImpostorRoles)
|
||||
BlindTime = new FloatOptionItem(StartId + 5, "BlindTime", new(0f, 60f, 1f), 10f, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
|
||||
KillCooldown = new IntegerOptionItem(69_211_207, "KillCooldown", new(0, 60, 1), 10, TabGroup.ImpostorRoles)
|
||||
KillCooldown = new IntegerOptionItem(StartId + 6, "KillCooldown", new(0, 60, 1), 10, TabGroup.GameSettings)
|
||||
.SetGameMode(CustomGameMode.HideAndSeek)
|
||||
.SetValueFormat(OptionFormat.Seconds)
|
||||
.SetColor(new(255, 25, 25, byte.MaxValue));
|
||||
|
||||
@@ -91,7 +91,7 @@ public class Poache : CovenBase
|
||||
|
||||
public override void OnReportDeadBody()
|
||||
{
|
||||
KillDelays.ForEach(x => x.GetPlayer()?.Suicide(PlayerState.DeathReason.Poison, realKiller: PoacheId.GetPlayer()));
|
||||
KillDelays?.ForEach(x => x.GetPlayer()?.Suicide(PlayerState.DeathReason.Poison, realKiller: PoacheId.GetPlayer()));
|
||||
KillDelays = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class Prosecutor : RoleBase
|
||||
|
||||
public static bool TrialMsg(PlayerControl pc, string msg, bool isUI = false)
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost || !GameStates.IsInGame || !pc || !pc.Is(CustomRoles.Prosecutor)) return false;
|
||||
if (!AmongUsClient.Instance.AmHost || !GameStates.IsInGame || !pc || !pc.Is(CustomRoles.Prosecutor) || Starspawn.IsDayBreak) return false;
|
||||
|
||||
int operate; // 1:ID 2:Trial
|
||||
msg = msg.ToLower().TrimStart().TrimEnd();
|
||||
|
||||
@@ -92,6 +92,18 @@ internal class Adventurer : RoleBase
|
||||
}
|
||||
}
|
||||
|
||||
private static void RelocateObject(Resource resource, Vector2 newPosition)
|
||||
{
|
||||
for (int objIndex = 0; objIndex < CustomNetObject.AllObjects.Count; objIndex++)
|
||||
{
|
||||
if (CustomNetObject.AllObjects[objIndex] is AdventurerItem item && item.Resource == resource)
|
||||
{
|
||||
item.TP(newPosition);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static OptionItem CreateWeaponEnabledSetting(int id, Weapon weapon)
|
||||
{
|
||||
return new BooleanOptionItem(id, $"AdventurerWeaponEnabled.{weapon}", true, TabGroup.CrewmateRoles).SetParent(Options.CustomRoleSpawnChances[CustomRoles.Adventurer]);
|
||||
@@ -287,16 +299,18 @@ internal class Adventurer : RoleBase
|
||||
|
||||
if (LastRandomResourceTimeStamp + 20 <= now && pc.PlayerId != AdventurerPC.PlayerId && IRandom.Instance.Next(500) == 0)
|
||||
{
|
||||
Vector2 pos = pc.Pos();
|
||||
|
||||
if (ResourceLocations.TryGetValue(Resource.Random, out Vector2 location))
|
||||
{
|
||||
LocateArrow.Remove(AdventurerPC.PlayerId, location);
|
||||
HideObject(Resource.Random);
|
||||
RelocateObject(Resource.Random, pos);
|
||||
}
|
||||
else
|
||||
_ = new AdventurerItem(pos, Resource.Random, AdventurerPC);
|
||||
|
||||
Vector2 pos = pc.Pos();
|
||||
LocateArrow.Add(AdventurerPC.PlayerId, pos);
|
||||
ResourceLocations[Resource.Random] = pos;
|
||||
_ = new AdventurerItem(pos, Resource.Random, AdventurerPC);
|
||||
LastRandomResourceTimeStamp = now;
|
||||
Utils.NotifyRoles(SpecifySeer: AdventurerPC, SpecifyTarget: AdventurerPC);
|
||||
}
|
||||
@@ -323,12 +337,13 @@ internal class Adventurer : RoleBase
|
||||
if (ResourceLocations.TryGetValue(Resource.Grouping, out Vector2 location))
|
||||
{
|
||||
LocateArrow.Remove(AdventurerPC.PlayerId, location);
|
||||
HideObject(Resource.Grouping);
|
||||
RelocateObject(Resource.Grouping, pcPos);
|
||||
}
|
||||
else
|
||||
_ = new AdventurerItem(pcPos, Resource.Grouping, AdventurerPC);
|
||||
|
||||
LocateArrow.Add(AdventurerPC.PlayerId, pcPos);
|
||||
ResourceLocations[Resource.Grouping] = pcPos;
|
||||
_ = new AdventurerItem(pcPos, Resource.Grouping, AdventurerPC);
|
||||
LastGroupingResourceTimeStamp = now;
|
||||
Utils.NotifyRoles(SpecifySeer: AdventurerPC, SpecifyTarget: AdventurerPC);
|
||||
}
|
||||
@@ -377,9 +392,11 @@ internal class Adventurer : RoleBase
|
||||
{
|
||||
if (!AmongUsClient.Instance.AmHost) return;
|
||||
Vector2 pos = shapeshifter.Pos();
|
||||
if (av.ResourceLocations.ContainsKey(Resource.ShapeshiftSkin))
|
||||
RelocateObject(Resource.ShapeshiftSkin, pos);
|
||||
else
|
||||
_ = new AdventurerItem(pos, Resource.ShapeshiftSkin, av.AdventurerPC);
|
||||
av.ResourceLocations[Resource.ShapeshiftSkin] = pos;
|
||||
HideObject(Resource.ShapeshiftSkin);
|
||||
_ = new AdventurerItem(pos, Resource.ShapeshiftSkin, av.AdventurerPC);
|
||||
}
|
||||
|
||||
public static void OnAnyoneDead(PlayerControl target)
|
||||
@@ -389,9 +406,11 @@ internal class Adventurer : RoleBase
|
||||
if (state.Role is Adventurer { IsEnable: true } av)
|
||||
{
|
||||
Vector2 pos = target.Pos();
|
||||
if (av.ResourceLocations.ContainsKey(Resource.DeadBody))
|
||||
RelocateObject(Resource.DeadBody, pos);
|
||||
else
|
||||
_ = new AdventurerItem(pos, Resource.DeadBody, av.AdventurerPC);
|
||||
av.ResourceLocations[Resource.DeadBody] = pos;
|
||||
HideObject(Resource.DeadBody);
|
||||
_ = new AdventurerItem(pos, Resource.DeadBody, av.AdventurerPC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,8 +131,6 @@ internal class TimeMaster : RoleBase
|
||||
|
||||
private static IEnumerator Rewind()
|
||||
{
|
||||
Dictionary<byte, float> originalSpeeds = Main.AllPlayerSpeed.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
try
|
||||
{
|
||||
Rewinding = true;
|
||||
@@ -142,7 +140,6 @@ internal class TimeMaster : RoleBase
|
||||
int length = TimeMasterRewindTimeLength.GetInt();
|
||||
float duration = length * delay + 0.55f;
|
||||
|
||||
Main.AllPlayerSpeed.SetAllValues(Main.MinSpeed);
|
||||
ReportDeadBodyPatch.CanReport.SetAllValues(false);
|
||||
|
||||
string notify = Utils.ColorString(Color.yellow, string.Format(Translator.GetString("TimeMasterRewindStart"), CustomRoles.TimeMaster.ToColoredString()));
|
||||
@@ -204,8 +201,6 @@ internal class TimeMaster : RoleBase
|
||||
finally
|
||||
{
|
||||
Rewinding = false;
|
||||
Main.AllPlayerSpeed.AddRange(originalSpeeds);
|
||||
Utils.MarkEveryoneDirtySettings();
|
||||
ReportDeadBodyPatch.CanReport.SetAllValues(true);
|
||||
}
|
||||
}
|
||||
@@ -220,7 +215,6 @@ internal class TimeMaster : RoleBase
|
||||
if (Rewinding)
|
||||
{
|
||||
Rewinding = false;
|
||||
Main.AllPlayerSpeed.SetAllValues(Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod));
|
||||
ReportDeadBodyPatch.CanReport.SetAllValues(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ public class Penguin : RoleBase
|
||||
private static OptionItem OptionMeetingKill;
|
||||
private static OptionItem OptionSpeedDuringDrag;
|
||||
private static OptionItem OptionVictimCanUseAbilities;
|
||||
private static OptionItem OptionCanVentWhileDragging;
|
||||
|
||||
private Stopwatch AbductTimer;
|
||||
private float AbductTimerLimit;
|
||||
@@ -33,6 +34,7 @@ public class Penguin : RoleBase
|
||||
private float SpeedDuringDrag;
|
||||
|
||||
private bool VictimCanUseAbilities;
|
||||
private bool CanVentWhileDragging;
|
||||
|
||||
public override bool IsEnable => PenguinId != byte.MaxValue;
|
||||
|
||||
@@ -65,6 +67,9 @@ public class Penguin : RoleBase
|
||||
|
||||
OptionVictimCanUseAbilities = new BooleanOptionItem(Id + 14, "PenguinVictimCanUseAbilities", false, TabGroup.ImpostorRoles)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Penguin]);
|
||||
|
||||
OptionCanVentWhileDragging = new BooleanOptionItem(Id + 15, "PenguinCanVentWhileDragging", false, TabGroup.ImpostorRoles)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Penguin]);
|
||||
}
|
||||
|
||||
public override void Init()
|
||||
@@ -83,6 +88,7 @@ public class Penguin : RoleBase
|
||||
MeetingKill = OptionMeetingKill.GetBool();
|
||||
SpeedDuringDrag = OptionSpeedDuringDrag.GetFloat();
|
||||
VictimCanUseAbilities = OptionVictimCanUseAbilities.GetBool();
|
||||
CanVentWhileDragging = OptionCanVentWhileDragging.GetBool();
|
||||
Cooldown = Options.AdjustedDefaultKillCooldown;
|
||||
}
|
||||
else
|
||||
@@ -91,6 +97,7 @@ public class Penguin : RoleBase
|
||||
MeetingKill = false;
|
||||
SpeedDuringDrag = Goose.OptionSpeedDuringDrag.GetFloat();
|
||||
VictimCanUseAbilities = Goose.OptionVictimCanUseAbilities.GetBool();
|
||||
CanVentWhileDragging = false;
|
||||
Cooldown = Goose.Cooldown.GetFloat();
|
||||
}
|
||||
|
||||
@@ -109,7 +116,7 @@ public class Penguin : RoleBase
|
||||
|
||||
public override bool CanUseImpostorVentButton(PlayerControl pc)
|
||||
{
|
||||
return !AbductVictim && !IsGoose;
|
||||
return !IsGoose && (CanVentWhileDragging || AbductTimer == null);
|
||||
}
|
||||
|
||||
public override bool CanUseKillButton(PlayerControl pc)
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace EHR.Roles;
|
||||
|
||||
internal class Trapster : RoleBase
|
||||
{
|
||||
private static List<byte> TrapsterBody = [];
|
||||
public static List<byte> TrapsterBody = [];
|
||||
private static Dictionary<byte, byte> KillerOfTrapsterBody = [];
|
||||
|
||||
public static bool On;
|
||||
@@ -138,8 +138,7 @@ internal class Trapster : RoleBase
|
||||
{
|
||||
Vector2 location = player.Pos();
|
||||
TrapsterBody.Add(player.PlayerId);
|
||||
PlayerControl randomPlayer = Main.EnumerateAlivePlayerControls().Without(player).RandomElement();
|
||||
Utils.RpcCreateDeadBody(location, (byte)randomPlayer.CurrentOutfit.ColorId, randomPlayer);
|
||||
Utils.RpcCreateDeadBody(location, (byte)IRandom.Instance.Next(0, 18), player);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ public class Wiper : RoleBase
|
||||
PlainShipRoom room = pc.GetPlainShipRoom();
|
||||
if (IsInvalidRoom(room)) return;
|
||||
|
||||
Main.EnumerateAlivePlayerControls().Without(pc).DoIf(x => x.IsInRoom(room) && pc.RpcCheckAndMurder(x, true), x => x.Suicide(PlayerState.DeathReason.WipedOut, pc));
|
||||
Main.EnumerateAlivePlayerControls().Without(pc).DoIf(x => (!x.IsImpostor() || KillOtherImpostors.GetBool()) && x.IsInRoom(room) && pc.RpcCheckAndMurder(x, true), x => x.Suicide(PlayerState.DeathReason.WipedOut, pc));
|
||||
}
|
||||
|
||||
public override void OnFixedUpdate(PlayerControl pc)
|
||||
|
||||
@@ -52,8 +52,12 @@ public class Frightener : RoleBase
|
||||
|
||||
public override bool OnShapeshift(PlayerControl shapeshifter, PlayerControl target, bool shapeshifting)
|
||||
{
|
||||
if (shapeshifting && AlarmedPlayers.Add(target.PlayerId))
|
||||
if (!shapeshifting) return true;
|
||||
|
||||
if (shapeshifter.GetAbilityUseLimit() >= 1f && AlarmedPlayers.Add(target.PlayerId))
|
||||
{
|
||||
shapeshifter.RpcRemoveAbilityUse(notify: false);
|
||||
|
||||
LateTask.New(() =>
|
||||
{
|
||||
AlarmedPlayers.Remove(target.PlayerId);
|
||||
|
||||
@@ -37,8 +37,6 @@ public class Gambler : RoleBase
|
||||
private static readonly HashSet<byte> IsShielded = [];
|
||||
private static HashSet<byte> IsVisionChange = [];
|
||||
|
||||
private byte EffectID = byte.MaxValue;
|
||||
|
||||
public override bool IsEnable => PlayerIdList.Count > 0;
|
||||
|
||||
public override void SetupCustomOption()
|
||||
@@ -116,7 +114,6 @@ public class Gambler : RoleBase
|
||||
public override void Init()
|
||||
{
|
||||
PlayerIdList = [];
|
||||
EffectID = byte.MaxValue;
|
||||
WaitingDelayedKills = [];
|
||||
IsVisionChange = [];
|
||||
}
|
||||
@@ -124,7 +121,6 @@ public class Gambler : RoleBase
|
||||
public override void Add(byte playerId)
|
||||
{
|
||||
PlayerIdList.Add(playerId);
|
||||
EffectID = byte.MaxValue;
|
||||
}
|
||||
|
||||
public override void Remove(byte playerId)
|
||||
@@ -148,22 +144,21 @@ public class Gambler : RoleBase
|
||||
|
||||
public override bool OnCheckMurder(PlayerControl killer, PlayerControl target)
|
||||
{
|
||||
if (EffectID != byte.MaxValue) return true;
|
||||
|
||||
var rd = IRandom.Instance;
|
||||
byte effectID;
|
||||
|
||||
if (rd.Next(1, 101) <= PositiveEffectChance.GetInt())
|
||||
{
|
||||
EffectID = (byte)rd.Next(1, 8);
|
||||
effectID = (byte)rd.Next(1, 8);
|
||||
|
||||
switch (EffectID)
|
||||
switch (effectID)
|
||||
{
|
||||
case 1: // Delayed kill
|
||||
killer.Notify(string.Format(GetString("GamblerGet.DelayedKill"), KillDelay.GetInt()));
|
||||
WaitingDelayedKills.TryAdd(target.PlayerId, new CountdownTimer(KillDelay.GetInt(), () =>
|
||||
{
|
||||
WaitingDelayedKills.Remove(target.PlayerId);
|
||||
if (target == null || !target.IsAlive()) return;
|
||||
if (!target || !target.IsAlive()) return;
|
||||
target.Suicide(PlayerState.DeathReason.Poison, killer);
|
||||
}));
|
||||
return false;
|
||||
@@ -218,13 +213,13 @@ public class Gambler : RoleBase
|
||||
killer.Notify(string.Format(GetString("GamblerGet.Speedup"), speedDur, Speed.GetFloat()));
|
||||
_ = new CountdownTimer(speedDur, () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
if (!killer.IsAlive()) return;
|
||||
killer.MarkDirtySettings();
|
||||
}, onCanceled: () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
});
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Speed.GetFloat();
|
||||
@@ -237,9 +232,9 @@ public class Gambler : RoleBase
|
||||
}
|
||||
else
|
||||
{
|
||||
EffectID = (byte)rd.Next(1, 5);
|
||||
effectID = (byte)rd.Next(1, 5);
|
||||
|
||||
switch (EffectID)
|
||||
switch (effectID)
|
||||
{
|
||||
case 1: // BSR
|
||||
float delay = Math.Max(0.15f, BsrDelay.GetFloat());
|
||||
@@ -256,13 +251,13 @@ public class Gambler : RoleBase
|
||||
killer.Notify(string.Format(GetString("GamblerGet.Freeze"), freezeDur));
|
||||
_ = new CountdownTimer(freezeDur, () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
if (!killer.IsAlive()) return;
|
||||
killer.MarkDirtySettings();
|
||||
}, onCanceled: () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
});
|
||||
Main.AllPlayerSpeed[killer.PlayerId] = Main.MinSpeed;
|
||||
@@ -273,13 +268,13 @@ public class Gambler : RoleBase
|
||||
IsVisionChange.Add(killer.PlayerId);
|
||||
_ = new CountdownTimer(LowVisionDur.GetInt(), () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
IsVisionChange.Remove(killer.PlayerId);
|
||||
if (!killer.IsAlive()) return;
|
||||
killer.MarkDirtySettings();
|
||||
}, onCanceled: () =>
|
||||
{
|
||||
if (killer == null) return;
|
||||
if (!killer) return;
|
||||
IsVisionChange.Remove(killer.PlayerId);
|
||||
});
|
||||
killer.MarkDirtySettings();
|
||||
@@ -294,8 +289,6 @@ public class Gambler : RoleBase
|
||||
}
|
||||
}
|
||||
|
||||
EffectID = byte.MaxValue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -306,8 +299,6 @@ public class Gambler : RoleBase
|
||||
|
||||
public override void OnReportDeadBody()
|
||||
{
|
||||
EffectID = byte.MaxValue;
|
||||
|
||||
foreach ((byte playerId, CountdownTimer timer) in WaitingDelayedKills)
|
||||
{
|
||||
timer.Dispose();
|
||||
|
||||
@@ -78,7 +78,7 @@ public class Amogus : RoleBase
|
||||
|
||||
public override bool CanUseKillButton(PlayerControl pc)
|
||||
{
|
||||
return AmogusFormTimer == null;
|
||||
return AmogusFormTimer != null;
|
||||
}
|
||||
|
||||
public override void ApplyGameOptions(IGameOptions opt, byte id)
|
||||
@@ -107,7 +107,7 @@ public class Amogus : RoleBase
|
||||
|
||||
AmogusFormTimer = new CountdownTimer(AbilityDuration.GetInt(), () =>
|
||||
{
|
||||
if (pc == null || !pc.IsAlive()) return;
|
||||
if (!pc || !pc.IsAlive()) return;
|
||||
FormExpired();
|
||||
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
|
||||
}, onCanceled: () => AmogusFormTimer = null);
|
||||
|
||||
@@ -280,6 +280,7 @@ internal class Bargainer : RoleBase
|
||||
List<Item> list = OrderedItems.ToList();
|
||||
SelectedItem = list[(list.IndexOf(SelectedItem) + 1) % list.Count];
|
||||
Utils.SendRPC(CustomRPC.SyncBargainer, pc.PlayerId, 2, (int)SelectedItem);
|
||||
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: pc);
|
||||
}
|
||||
|
||||
public override void OnPet(PlayerControl pc)
|
||||
@@ -344,18 +345,20 @@ internal class Bargainer : RoleBase
|
||||
Money -= cost;
|
||||
Update();
|
||||
|
||||
pc.Notify(string.Format(Translator.GetString("Bargainer.Notify.PurchasedItem"), Translator.GetString($"Bargainer.{SelectedItem}")));
|
||||
|
||||
switch (SelectedItem)
|
||||
{
|
||||
case Item.EnergyDrink:
|
||||
pc.ResetKillCooldown();
|
||||
pc.SyncSettings();
|
||||
if (Main.KillTimers[pc.PlayerId] > ReducedKillCooldown.GetFloat()) pc.SetKillCooldown(ReducedKillCooldown.GetFloat());
|
||||
|
||||
break;
|
||||
goto default;
|
||||
case Item.LensOfTruth:
|
||||
Utils.NotifyRoles(SpecifySeer: pc, SpecifyTarget: Utils.GetPlayerById(target));
|
||||
goto default;
|
||||
case Item.None:
|
||||
break;
|
||||
default:
|
||||
pc.Notify(string.Format(Translator.GetString("Bargainer.Notify.PurchasedItem"), Translator.GetString($"Bargainer.{SelectedItem}")));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ public class SoulCollector : RoleBase
|
||||
{
|
||||
Main.AllPlayerSpeed[x.PlayerId] = Main.RealOptionsData.GetFloat(FloatOptionNames.PlayerSpeedMod);
|
||||
x.RpcSetRoleGlobal(x.GetGhostRoleBasis());
|
||||
Utils.AfterPlayerDeathTasks(x, onMeeting: true);
|
||||
});
|
||||
ToExile = [];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using AmongUs.GameOptions;
|
||||
using EHR.Modules;
|
||||
using Hazel;
|
||||
@@ -79,6 +80,11 @@ public class Auditor : RoleBase
|
||||
opt.SetFloat(FloatOptionNames.ImpostorLightMod, vision);
|
||||
}
|
||||
|
||||
public override void SetKillCooldown(byte id)
|
||||
{
|
||||
Main.AllPlayerKillCooldown[id] = Math.Min(AuditCooldown.GetFloat(), SmokebombCooldown.GetFloat());
|
||||
}
|
||||
|
||||
public override bool OnCheckMurder(PlayerControl killer, PlayerControl target)
|
||||
{
|
||||
switch (Mode)
|
||||
@@ -100,13 +106,15 @@ public class Auditor : RoleBase
|
||||
if (LoweredVisionPlayers.Add(target.PlayerId)) target.MarkDirtySettings();
|
||||
LateTask.New(() =>
|
||||
{
|
||||
if (target == null || !LoweredVisionPlayers.Remove(target.PlayerId) || !GameStates.IsInTask || ExileController.Instance || AntiBlackout.SkipTasks) return;
|
||||
if (!target || !LoweredVisionPlayers.Remove(target.PlayerId) || !GameStates.IsInTask || ExileController.Instance || AntiBlackout.SkipTasks) return;
|
||||
target.MarkDirtySettings();
|
||||
}, LoweredVisionDuration.GetInt());
|
||||
killer.SetKillCooldown(SmokebombCooldown.GetFloat());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
killer.RpcRemoveAbilityUse();
|
||||
|
||||
if (RevealedPlayers.Add(target.PlayerId))
|
||||
{
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
## Create an array of regions you want to add/update. To create this array, go to https://impostor.github.io/Impostor/ and put the Regions array from the server file in here
|
||||
# Setting type: String
|
||||
# Default value: {\"CurrentRegionIdx\":0,\"Regions\":[]}
|
||||
Regions = { \"CurrentRegionIdx\": 0, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-HU\", \"PingServer\": \"https://play-hu.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-hu.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-US\", \"PingServer\": \"https://play-us.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-us.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-NA\", \"PingServer\": \"https://au-us.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-us.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-AS\", \"PingServer\": \"https://au-as.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-as.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"AOU-EU\", \"PingServer\": \"https://eu.allofus.dev\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://eu.allofus.dev\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
|
||||
Regions = { \"CurrentRegionIdx\": 0, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-HU\", \"PingServer\": \"https://play-hu.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-hu.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-US\", \"PingServer\": \"https://play-us.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-us.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"AOU-EU\", \"PingServer\": \"https://eu.allofus.dev\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://eu.allofus.dev\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
|
||||
|
||||
## Comma-seperated list of region names that should be removed.
|
||||
# Setting type: String
|
||||
# Default value:
|
||||
RemoveRegions = Niko233(NA_US),Niko233(NA_US2),Niko233(AS_CN),Niko233(AS_CN2),NikoCat233(US),NikoCat233(CN),Niko233(AS3),Niko233(NA2),Niko233(EU2),Niko233(AS2),Custom,Niko233(NA),Niko233(EU),Niko233(AS),Niko233(CN),Modded SA (MSA),Niko-CN,Niko-EU
|
||||
RemoveRegions = Niko233(NA_US),Niko233(NA_US2),Niko233(AS_CN),Niko233(AS_CN2),NikoCat233(US),NikoCat233(CN),Niko233(AS3),Niko233(NA2),Niko233(EU2),Niko233(AS2),Custom,Niko233(NA),Niko233(EU),Niko233(AS),Niko233(CN),Modded SA (MSA),Niko-CN,Niko-EU,Niko-NA,Niko-AS,Niko_CN,Niko_EU,Niko_NA,Niko_AS
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Il2CppInterop.Common</name>
|
||||
</assembly>
|
||||
<members>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Il2CppInterop.HarmonySupport</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Il2CppInterop.HarmonySupport.Il2CppDetourMethodPatcher.#ctor(System.Reflection.MethodBase)">
|
||||
<summary>
|
||||
Constructs a new instance of <see cref="T:MonoMod.RuntimeDetour.NativeDetour" /> method patcher.
|
||||
</summary>
|
||||
<param name="original"></param>
|
||||
</member>
|
||||
<member name="M:Il2CppInterop.HarmonySupport.Il2CppDetourMethodPatcher.PrepareOriginal">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Il2CppInterop.HarmonySupport.Il2CppDetourMethodPatcher.DetourTo(System.Reflection.MethodBase)">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
<member name="M:Il2CppInterop.HarmonySupport.Il2CppDetourMethodPatcher.CopyOriginal">
|
||||
<inheritdoc />
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
Binary file not shown.
@@ -1,233 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>Il2CppInterop.Runtime</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:Il2CppInterop.Runtime.Attributes.HideFromIl2CppAttribute">
|
||||
<summary>
|
||||
This attribute indicates that the target should not be exposed to IL2CPP in injected classes
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Il2CppInterop.Runtime.Injection.ClassInjector.InjectedTypes">
|
||||
<summary> type.FullName </summary>
|
||||
</member>
|
||||
<member name="F:Il2CppInterop.Runtime.Injection.ClassInjector.InflatedMethodFromContextDictionary">
|
||||
<summary> (method) : (method_inst, method) </summary>
|
||||
</member>
|
||||
<member name="T:Il2CppInterop.Runtime.Injection.Hooks.Class_FromIl2CppType_Hook.Il2CppType">
|
||||
Common version of the Il2CppType, the only thing that changed between unity version are the bitfields values that we don't use
|
||||
</member>
|
||||
<member name="T:Il2CppInterop.Runtime.Injection.Hooks.GenericMethod_GetMethod_Unity6_Hook">
|
||||
Unity 6 (6000.x.x): the 1-param GetMethod(const Il2CppGenericMethod&) is inlined into
|
||||
the 3-param GetMethod(const MethodInfo*, const Il2CppGenericInst*, const Il2CppGenericInst*).
|
||||
We use the hook with 3 param correctly
|
||||
</member>
|
||||
<member name="F:Il2CppInterop.Runtime.Injection.InjectorHelpers.s_ClassNameLookup">
|
||||
<summary> (namespace, class, image) : class </summary>
|
||||
</member>
|
||||
<member name="P:Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppArrayBase.ArrayStartPointer">
|
||||
<summary>
|
||||
The pointer to the first element in the array.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Il2CppInterop.Runtime.Runtime.ClassInjectorBase.FallbackGetGcHandlePtrFromIl2CppDelegateMTarget(System.IntPtr)">
|
||||
<summary>
|
||||
Tries to get the Garbage collector pointer from the m_target object from the m_target of the delegate.
|
||||
Fixes Harmony in Unity 2021.2.x .
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute">
|
||||
<summary>
|
||||
Indicates that an API is experimental and it may change in the future.
|
||||
</summary>
|
||||
<remarks>
|
||||
This attribute allows call sites to be flagged with a diagnostic that indicates that an experimental
|
||||
feature is used. Authors can use this attribute to ship preview features in their assemblies.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes a new instance of the <see cref="T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute"/> class,
|
||||
specifying the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<param name="diagnosticId">The ID that the compiler will use when reporting a use of the API the attribute applies to.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.DiagnosticId">
|
||||
<summary>
|
||||
Gets the ID that the compiler will use when reporting a use of the API the attribute applies to.
|
||||
</summary>
|
||||
<value>The unique diagnostic ID.</value>
|
||||
<remarks>
|
||||
The diagnostic ID is shown in build output for warnings and errors.
|
||||
<para>This property represents the unique ID that can be used to suppress the warnings or errors, if needed.</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.ExperimentalAttribute.UrlFormat">
|
||||
<summary>
|
||||
Gets or sets the URL for corresponding documentation.
|
||||
The API accepts a format string instead of an actual URL, creating a generic URL that includes the diagnostic ID.
|
||||
</summary>
|
||||
<value>The format string that represents a URL to corresponding documentation.</value>
|
||||
<remarks>An example format string is <c>https://contoso.com/obsoletion-warnings/{0}</c>.</remarks>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.SetsRequiredMembersAttribute">
|
||||
<summary>
|
||||
Specifies that this constructor sets all required members for the current type,
|
||||
and callers do not need to set any required members themselves.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute">
|
||||
<summary>
|
||||
Specifies the syntax used in a string.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.
|
||||
</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
</member>
|
||||
<member name="M:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.#ctor(System.String,System.Object[])">
|
||||
<summary>Initializes the <see cref="T:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute"/> with the identifier of the syntax used.</summary>
|
||||
<param name="syntax">The syntax identifier.</param>
|
||||
<param name="arguments">Optional arguments associated with the specific syntax employed.</param>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Syntax">
|
||||
<summary>Gets the identifier of the syntax used.</summary>
|
||||
</member>
|
||||
<member name="P:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Arguments">
|
||||
<summary>Optional arguments associated with the specific syntax employed.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.CompositeFormat">
|
||||
<summary>The syntax identifier for strings containing composite formats for string formatting.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing date format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.DateTimeFormat">
|
||||
<summary>The syntax identifier for strings containing date and time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.EnumFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Enum"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.GuidFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.Guid"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Json">
|
||||
<summary>The syntax identifier for strings containing JavaScript Object Notation (JSON).</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.NumericFormat">
|
||||
<summary>The syntax identifier for strings containing numeric format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Regex">
|
||||
<summary>The syntax identifier for strings containing regular expressions.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeOnlyFormat">
|
||||
<summary>The syntax identifier for strings containing time format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.TimeSpanFormat">
|
||||
<summary>The syntax identifier for strings containing <see cref="T:System.TimeSpan"/> format specifiers.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Uri">
|
||||
<summary>The syntax identifier for strings containing URIs.</summary>
|
||||
</member>
|
||||
<member name="F:System.Diagnostics.CodeAnalysis.StringSyntaxAttribute.Xml">
|
||||
<summary>The syntax identifier for strings containing XML.</summary>
|
||||
</member>
|
||||
<member name="T:System.Diagnostics.CodeAnalysis.UnscopedRefAttribute">
|
||||
<summary>
|
||||
Used to indicate a byref escapes and is not scoped.
|
||||
</summary>
|
||||
<remarks>
|
||||
<para>
|
||||
There are several cases where the C# compiler treats a <see langword="ref"/> as implicitly
|
||||
<see langword="scoped"/> - where the compiler does not allow the <see langword="ref"/> to escape the method.
|
||||
</para>
|
||||
<para>
|
||||
For example:
|
||||
<list type="number">
|
||||
<item><see langword="this"/> for <see langword="struct"/> instance methods.</item>
|
||||
<item><see langword="ref"/> parameters that refer to <see langword="ref"/> <see langword="struct"/> types.</item>
|
||||
<item><see langword="out"/> parameters.</item>
|
||||
</list>
|
||||
</para>
|
||||
<para>
|
||||
This attribute is used in those instances where the <see langword="ref"/> should be allowed to escape.
|
||||
</para>
|
||||
<para>
|
||||
Applying this attribute, in any form, has impact on consumers of the applicable API. It is necessary for
|
||||
API authors to understand the lifetime implications of applying this attribute and how it may impact their users.
|
||||
</para>
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CollectionBuilderAttribute.#ctor(System.Type,System.String)">
|
||||
<summary>
|
||||
Initialize the attribute to refer to the <paramref name="methodName"/> method on the <paramref name="builderType"/> type.
|
||||
</summary>
|
||||
<param name="builderType">The type of the builder to use to construct the collection.</param>
|
||||
<param name="methodName">The name of the method on the builder to use to construct the collection.</param>
|
||||
<remarks>
|
||||
<paramref name="methodName"/> must refer to a static method that accepts a single parameter of
|
||||
type <see cref="T:System.ReadOnlySpan`1"/> and returns an instance of the collection being built containing
|
||||
a copy of the data from that span. In future releases of .NET, additional patterns may be supported.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.BuilderType">
|
||||
<summary>
|
||||
Gets the type of the builder to use to construct the collection.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CollectionBuilderAttribute.MethodName">
|
||||
<summary>
|
||||
Gets the name of the method on the builder to use to construct the collection.
|
||||
</summary>
|
||||
<remarks>
|
||||
This should match the metadata name of the target method.
|
||||
For example, this might be ".ctor" if targeting the type's constructor.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute">
|
||||
<summary>
|
||||
Indicates that compiler support for a particular feature is required for the location where this attribute is applied.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.#ctor(System.String)">
|
||||
<summary>
|
||||
Creates a new instance of the <see cref="T:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute"/> type.
|
||||
</summary>
|
||||
<param name="featureName">The name of the feature to indicate.</param>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName">
|
||||
<summary>
|
||||
The name of the compiler feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.IsOptional">
|
||||
<summary>
|
||||
If true, the compiler can choose to allow access to the location where this attribute is applied if it does not understand <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RefStructs">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the ref structs C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.RequiredMembers">
|
||||
<summary>
|
||||
The <see cref="P:System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute.FeatureName"/> used for the required members C# feature.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiredMemberAttribute">
|
||||
<summary>
|
||||
Specifies that a type has required members or that a member is required.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:System.Runtime.CompilerServices.RequiresLocationAttribute">
|
||||
<summary>
|
||||
Reserved for use by a compiler for tracking metadata.
|
||||
This attribute should not be used by developers in source code.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
@@ -6,10 +6,10 @@
|
||||
## Create an array of regions you want to add/update. To create this array, go to https://impostor.github.io/Impostor/ and put the Regions array from the server file in here
|
||||
# Setting type: String
|
||||
# Default value: {\"CurrentRegionIdx\":0,\"Regions\":[]}
|
||||
Regions = { \"CurrentRegionIdx\": 0, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-HU\", \"PingServer\": \"https://play-hu.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-hu.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-US\", \"PingServer\": \"https://play-us.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-us.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-NA\", \"PingServer\": \"https://au-us.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-us.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Niko-AS\", \"PingServer\": \"https://au-as.niko233.top\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://au-as.niko233.top\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"AOU-EU\", \"PingServer\": \"https://eu.allofus.dev\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://eu.allofus.dev\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
|
||||
Regions = { \"CurrentRegionIdx\": 0, \"Regions\": [ { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded EU (MEU)\", \"PingServer\": \"https://au-eu.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-eu.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded NA (MNA)\", \"PingServer\": \"https://aumods.org\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://aumods.org\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"Modded Asia (MAS)\", \"PingServer\": \"https://au-as.duikbo.at\", \"Servers\": [ { \"Name\": \"Http-1\", \"Ip\": \"https://au-as.duikbo.at\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-HU\", \"PingServer\": \"https://play-hu.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-hu.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"GG-US\", \"PingServer\": \"https://play-us.gurge44.eu\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://play-us.gurge44.eu\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 }, { \"$type\": \"StaticHttpRegionInfo, Assembly-CSharp\", \"Name\": \"AOU-EU\", \"PingServer\": \"https://eu.allofus.dev\", \"Servers\": [ { \"Name\": \"http-1\", \"Ip\": \"https://eu.allofus.dev\", \"Port\": 443, \"UseDtls\": false, \"Players\": 0, \"ConnectionFailures\": 0 } ], \"TargetServer\": null, \"TranslateName\": 1003 } ] }
|
||||
|
||||
## Comma-seperated list of region names that should be removed.
|
||||
# Setting type: String
|
||||
# Default value:
|
||||
RemoveRegions = Niko233(NA_US),Niko233(NA_US2),Niko233(AS_CN),Niko233(AS_CN2),NikoCat233(US),NikoCat233(CN),Niko233(AS3),Niko233(NA2),Niko233(EU2),Niko233(AS2),Custom,Niko233(NA),Niko233(EU),Niko233(AS),Niko233(CN),Modded SA (MSA),Niko-CN,Niko-EU
|
||||
RemoveRegions = Niko233(NA_US),Niko233(NA_US2),Niko233(AS_CN),Niko233(AS_CN2),NikoCat233(US),NikoCat233(CN),Niko233(AS3),Niko233(NA2),Niko233(EU2),Niko233(AS2),Custom,Niko233(NA),Niko233(EU),Niko233(AS),Niko233(CN),Modded SA (MSA),Niko-CN,Niko-EU,Niko-NA,Niko-AS,Niko_CN,Niko_EU,Niko_NA,Niko_AS
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user