Decompiled source of ChaosMod v1.1.0
ChaosMod.dll
Decompiled 7 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using ExitGames.Client.Photon; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using Photon.Realtime; using REPOLib.Commands; using REPOLib.Modules; using TMPro; using UnityEngine; using UnityEngine.AI; using UnityEngine.Events; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("Lego0_77")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0+f6a6317102845e074e9e58d9984c3336c73f45ba")] [assembly: AssemblyProduct("ChaosMod")] [assembly: AssemblyTitle("ChaosMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace ChaosMod { public class AdManager : MonoBehaviour { private TextMeshProUGUI ADText; private Button SkipButton; private TextMeshProUGUI SkipText; private VideoPlayer video; private GameObject playerImage; public List<VideoClip> clips; private bool spawned; private float skipTimer = 6f; private bool skipPressed; private void SetupComponents() { if ((Object)(object)video == (Object)null) { video = ((Component)this).GetComponent<VideoPlayer>(); } Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val in array) { switch (((Object)val).name) { case "Skip Button": SkipButton = ((Component)val).GetComponent<Button>(); break; case "Skip Text": SkipText = ((Component)val).GetComponent<TextMeshProUGUI>(); break; case "Tab Text": ADText = ((Component)val).GetComponent<TextMeshProUGUI>(); break; case "Video": playerImage = ((Component)val).gameObject; break; } } } private void Start() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown SetupComponents(); ((TMP_Text)ADText).text = "AD"; ((UnityEvent)SkipButton.onClick).AddListener((UnityAction)delegate { if (skipTimer <= 0f) { skipPressed = true; } }); playerImage.SetActive(false); ((Component)SkipButton).gameObject.SetActive(false); video.Stop(); } public void SetVideo() { video.Stop(); video.clip = clips[Random.Range(0, clips.Count)]; video.Prepare(); video.Stop(); } public float GetLength() { return (float)video.length; } [ContextMenu("보이기")] public void Show() { ((MonoBehaviour)this).StartCoroutine(InAnimation()); } [ContextMenu("숨기기")] public void Hide() { ((MonoBehaviour)this).StartCoroutine(OutAnimation()); } private IEnumerator InAnimation() { float time = 0f; Func<float, float> ease = delegate(float x) { float num2 = 1.70158f; float num3 = num2 + 1f; return 1f + num3 * Mathf.Pow(x - 1f, 3f) + num2 * Mathf.Pow(x - 1f, 2f); }; float startX = 1230f; float endX = 690f; float ogY = ((Component)this).transform.localPosition.y; while (time < 1f) { float num = ease(time); ((Component)this).transform.localPosition = new Vector3(startX + num * (endX - startX), ogY, 0f); time += Time.deltaTime; yield return null; } ((Component)this).transform.localPosition = new Vector3(endX, ogY, 0f); playerImage.SetActive(true); video.Play(); ((Component)SkipButton).gameObject.SetActive(true); spawned = true; skipTimer = 6f; ((TMP_Text)SkipText).text = "Video Ends\nafter 5 seconds"; skipPressed = false; } private IEnumerator OutAnimation() { float time = 0f; Func<float, float> ease = (float x) => (x != 0f) ? Mathf.Pow(2f, 10f * x - 10f) : 0f; float startX = 690f; float endX = 1230f; float ogY = ((Component)this).transform.localPosition.y; video.Stop(); playerImage.SetActive(false); while (time < 1f) { float num = ease(time); ((Component)this).transform.localPosition = new Vector3(Mathf.Lerp(startX, endX, num), ogY, 0f); time += Time.deltaTime; yield return null; } ((Component)this).transform.localPosition = new Vector3(endX, ogY, 0f); ((Component)SkipButton).gameObject.SetActive(false); spawned = false; } private void Update() { if (spawned) { if (skipTimer > 0f) { skipTimer -= Time.unscaledDeltaTime; } skipTimer = Mathf.Max(skipTimer, 0f); if (skipTimer <= 0f) { ((TMP_Text)SkipText).text = (skipPressed ? "no you cant" : "Skip AD"); } else { ((TMP_Text)SkipText).text = $"Video Ends\nafter {Mathf.FloorToInt(skipTimer)} seconds"; } } } } public class ChaosController : MonoBehaviour { internal PhotonView view; internal List<Modifier> events = new List<Modifier>(); internal float eventTimer; internal float timeScale = 1f; private TextMeshProUGUI DebugText => ChaosMod.Instance.DebugText; private void Start() { view = ((Component)this).GetComponent<PhotonView>(); eventTimer = 20f; } private IEnumerator FindCar() { while ((Object)(object)ChaosMod.Instance.carObject == (Object)null) { ChaosMod.Instance.carObject = GameObject.Find("Killer Joe(Clone)"); yield return null; } AssetBundle car_assets = CarCrash.car_assets; ChaosMod.Instance.car = ChaosMod.Instance.carObject.AddComponent<CrazyCarAIScript>(); ChaosMod.Instance.car.honk = car_assets.LoadAsset<AudioClip>("car honk"); ChaosMod.Instance.car.exp_sprites = car_assets.LoadAssetWithSubAssets<Sprite>("spr_realisticexplosion").ToList(); if (ChaosMod.IsDebug) { ChaosMod.Logger.LogMessage((object)"Car Setup is done!"); } } [PunRPC] private void FindCarRPC() { ((MonoBehaviour)this).StartCoroutine(FindCar()); } [PunRPC] private void StartEventTimerRPC(float time, PhotonMessageInfo info = default(PhotonMessageInfo)) { eventTimer = time; } private void StartTimer(float time) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer()) { view.RPC("StartEventTimerRPC", (RpcTarget)0, new object[1] { time }); } else { StartEventTimerRPC(time); } } [PunRPC] internal void SendEventRPC(int eventIndex, PhotonMessageInfo info = default(PhotonMessageInfo)) { List<Modifier> shopEvents = Modifiers.Events; if (SemiFunc.RunIsShop()) { shopEvents = Modifiers.ShopEvents; } if (eventIndex >= 0 && eventIndex < shopEvents.Count) { Modifier modifier = shopEvents[eventIndex]; Modifier modifier2 = modifier.Clone(); events.Add(modifier2); modifier2.Start(); ChaosMod.Instance.MakeText(modifier2.GetName(), modifier2.timerSelf); } } [PunRPC] private void AddTimeToEventRPC(int eventIndex, float time, PhotonMessageInfo info = default(PhotonMessageInfo)) { if (eventIndex >= 0 && eventIndex < events.Count) { events[eventIndex].timerSelf += time; if ((Object)(object)ChaosMod.Instance.eventTimerBars[eventIndex] != (Object)null) { ChaosMod.Instance.eventTimerBars[eventIndex].SetTime(events[eventIndex].timerSelf); } } } private void RandomEvent() { //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } for (int i = 0; i < 100; i++) { try { int num = 0; Modifier tempMod = null; if (SemiFunc.RunIsLevel()) { num = Random.Range(0, Modifiers.Events.Count); tempMod = Modifiers.Events[num]; } bool flag = Modifiers.CheckExcludes(tempMod.Instance); bool flag2 = Random.Range(0f, 1f) <= Mathf.Clamp01(tempMod.Instance.options.chance); bool flag3 = tempMod.isOnce || tempMod.timerSelf <= 0f; bool multiplayerOnly = tempMod.Instance.options.multiplayerOnly; bool singleplayerOnly = tempMod.Instance.options.singleplayerOnly; bool flag4 = ChaosMod.Instance.Exclude_Modifiers[tempMod.name]; bool flag5 = true; if ((multiplayerOnly && !GameManager.Multiplayer()) || (singleplayerOnly && GameManager.Multiplayer())) { flag5 = false; } if (ChaosMod.IsDebug) { MonoBehaviour.print((object)$"!isExcludedMod: {!flag} && chanceChoosen: {flag2} && hasTimerDoneOrIsOnce: {flag3} && isMultiplayerOnly: {multiplayerOnly} && !excludeOptions: {!flag4}"); } if (!(!flag && flag2 && flag3 && flag5) || flag4) { continue; } if (!tempMod.isOnce) { Modifier modifier = events.Find((Modifier mod) => mod.name == tempMod.name && !mod.isOnce && mod.timerSelf > 0f); if (modifier != null) { if (GameManager.Multiplayer()) { view.RPC("AddTimeToEventRPC", (RpcTarget)0, new object[2] { events.IndexOf(modifier), modifier.GetTime() }); } else { AddTimeToEventRPC(events.IndexOf(modifier), modifier.GetTime()); } return; } } if (GameManager.Multiplayer()) { view.RPC("SendEventRPC", (RpcTarget)0, new object[1] { num }); } else { SendEventRPC(num); } return; } catch (Exception ex) { ChaosMod.Logger.LogError((object)(ex.Message + "\n" + ex.StackTrace)); } } ChaosMod.Logger.LogWarning((object)"적절한 이벤트를 찾지 못했습니다."); } public static Modifier FindModWithName(string name) { Modifier modifier = Modifiers.Events.Find((Modifier m) => m.GetName() == name); if (modifier == null) { if (ChaosMod.IsDebug) { ChaosMod.Logger.LogWarning((object)("이벤트 이름 '" + name + "'은 존재하지 않습니다.")); } return null; } return modifier.Clone(); } [PunRPC] private void OnEventFinishedRPC(string evtName, bool resetText = true, PhotonMessageInfo info = default(PhotonMessageInfo)) { try { Modifier modifier = FindModWithName(evtName); if (modifier != null) { if (ChaosMod.IsDebug) { ChaosMod.Logger.LogMessage((object)("모드 마침: " + modifier.name)); } if (!modifier.isOnce) { modifier.OnFinished(); } if (resetText) { ChaosMod.Instance.ResetText(); } } } catch (Exception ex) { ChaosMod.Logger.LogError((object)(ex.Message + "\n" + ex.StackTrace)); } } private void OnEventFinished(string modName, bool resetText) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMasterClientOrSingleplayer()) { if (GameManager.Multiplayer()) { view.RPC("OnEventFinishedRPC", (RpcTarget)0, new object[2] { modName, resetText }); } else { OnEventFinishedRPC(modName, resetText); } } } private void Update() { if (!ChaosMod.Generated) { if (events.Count > 0) { foreach (Modifier @event in events) { OnEventFinished(@event.GetName(), resetText: false); } events.Clear(); } if (Modifiers.Excludes.Count > 0) { Modifiers.Excludes.Clear(); } if (SemiFunc.IsMasterClientOrSingleplayer() && eventTimer != 20f) { StartTimer(20f); } return; } if (!ChaosMod.DISABLE_TIMER) { if (eventTimer > 0f) { eventTimer = Mathf.Max(0f, eventTimer - Time.unscaledDeltaTime * timeScale); } else if (SemiFunc.IsMasterClientOrSingleplayer()) { StartTimer(20f); RandomEvent(); } } foreach (Modifier event2 in events) { if (event2 == null) { continue; } if (event2.timerSelf > 0f) { event2.timerSelf -= Time.unscaledDeltaTime; } else if (event2.timerSelf > -10f) { event2.timerSelf = -10f; if (!event2.isOnce) { OnEventFinished(event2.GetName(), resetText: true); } bool flag = !event2.isOnce && event2.timerSelf <= 0f; int item = events.IndexOf(event2); if (!ChaosMod.Instance.EventToRemove.Contains(item) && flag) { ChaosMod.Instance.EventToRemove.Add(item); } if (!ChaosMod.Instance.TextToRemove.Contains(item) && flag) { ChaosMod.Instance.TextToRemove.Add(item); } } event2.Update(); } if (ChaosMod.IsDebug) { string text = "디버깅 전용 텍스트"; text += $"\n살아있는 이벤트 개수: {events.Count}"; text += $"\n지울 예정인 이벤트 개수: {ChaosMod.Instance.EventToRemove.Count}"; text += $"\n살아있는 텍스트 개수: {ChaosMod.Instance.texts.Count}"; text += $"\n지울 예정인 텍스트 개수: {ChaosMod.Instance.TextToRemove.Count}"; ((TMP_Text)DebugText).text = text; } if (ChaosMod.Instance.EventToRemove.Count <= 0) { return; } IOrderedEnumerable<int> orderedEnumerable = from i in ChaosMod.Instance.EventToRemove.Distinct() orderby i descending select i; foreach (int item2 in orderedEnumerable) { if (item2 >= 0 && item2 < events.Count) { if (!events[item2].finihshed && !events[item2].isOnce) { OnEventFinished(events[item2].GetName(), resetText: false); } if (ChaosMod.IsDebug) { ChaosMod.Logger.LogMessage((object)("이벤트 삭제됨: " + events[item2].name)); } events.RemoveAt(item2); ChaosMod.Instance.ResetText(); } } ChaosMod.Instance.EventToRemove.Clear(); } } [BepInPlugin("Lego0_77.ChaosMod", "ChaosMod", "1.0")] public class ChaosMod : BaseUnityPlugin { public static readonly bool IsDebug; public static readonly bool DISABLE_TIMER; internal const float MaxEventTimer = 20f; internal Canvas UICanvas; internal RectTransform barRect; internal PhotonView view; internal AudioSource EnemyAS; internal AudioSource RumbleAS; internal PostProcessVolume shaderOverlay; internal ConfigEntry<bool> ConfigKorean; internal ConfigEntry<int> ConfigBarColorR; internal ConfigEntry<int> ConfigBarColorG; internal ConfigEntry<int> ConfigBarColorB; internal ConfigEntry<bool> ConfigDizzyness; internal ConfigEntry<bool> ConfigFamilyFriendly; internal Dictionary<string, bool> Exclude_Modifiers = new Dictionary<string, bool>(); internal List<GameObject> PrefabToAddNetwork = new List<GameObject>(); private float canvasHeight; private float canvasWidth; internal GameObject timeBar; internal RectTransform textGroup; internal AssetBundle assets; internal TextMeshProUGUI creditTxt; internal TextMeshProUGUI DebugText; internal Image barImg; internal bool photonViewInited; internal GameObject carObject; internal CrazyCarAIScript car; internal AdManager adViewer; internal GameObject adObject; internal ChaosController controller; private float text_height = 55f; internal TMP_FontAsset pretendard; internal List<TextLerp> texts = new List<TextLerp>(); internal List<EventTimerBar> eventTimerBars = new List<EventTimerBar>(); internal List<int> EventToRemove = new List<int>(); internal List<int> TextToRemove = new List<int>(); private float startTimer; private bool didReset; internal static ChaosMod Instance { get; private set; } internal static ManualLogSource Logger => Instance._logger; private ManualLogSource _logger => ((BaseUnityPlugin)this).Logger; internal Harmony? Harmony { get; set; } public static bool Generated { get { if (LevelGenerator.Instance.Generated && !SemiFunc.IsMainMenu() && SemiFunc.RunIsLevel()) { return !SemiFunc.RunIsArena(); } return false; } } private void Awake() { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown Instance = this; ((Component)this).gameObject.transform.parent = null; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; Language.Init(); string text = Language.GetText("기본"); ConfigKorean = ((BaseUnityPlugin)this).Config.Bind<bool>(text, "한국어", false, new ConfigDescription("켜져 있으면 한국어를 사용합니다. If it's on, this mod will use korean.", (AcceptableValueBase)null, Array.Empty<object>())); ConfigBarColorR = ((BaseUnityPlugin)this).Config.Bind<int>(text, Language.GetText("게이지 빨간색 차지 비중"), 130, new ConfigDescription("바의 빨간 색입니다. Bar's Red Color.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 255), Array.Empty<object>())); ConfigBarColorG = ((BaseUnityPlugin)this).Config.Bind<int>(text, Language.GetText("게이지 초록색 차지 비중"), 0, new ConfigDescription("바의 초록 색입니다. Bar's Green Color.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 255), Array.Empty<object>())); ConfigBarColorB = ((BaseUnityPlugin)this).Config.Bind<int>(text, Language.GetText("게이지 파란색 차지 비중"), 0, new ConfigDescription("바의 파란 색입니다. Bar's Blue Color.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 255), Array.Empty<object>())); ConfigDizzyness = ((BaseUnityPlugin)this).Config.Bind<bool>(text, Language.GetText("어지러움"), true, new ConfigDescription("꺼져 있으면 어지러운 효과를 낮추거나 비활성화합니다. If it's off, disables some dizzy effect.", (AcceptableValueBase)null, Array.Empty<object>())); ConfigFamilyFriendly = ((BaseUnityPlugin)this).Config.Bind<bool>(text, Language.GetText("가족 친화적"), false, new ConfigDescription("켜져 있으면 비속어를 필터링합니다. (호스트 전용) If it's on, filters some bad words. (Host only)", (AcceptableValueBase)null, Array.Empty<object>())); ConfigBarColorR.SettingChanged += delegate { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)barImg != (Object)null) { ((Graphic)barImg).color = new Color((float)ConfigBarColorR.Value / 255f, ((Graphic)barImg).color.g, ((Graphic)barImg).color.b, 1f); } }; ConfigBarColorG.SettingChanged += delegate { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)barImg != (Object)null) { ((Graphic)barImg).color = new Color(((Graphic)barImg).color.r, (float)ConfigBarColorG.Value / 255f, ((Graphic)barImg).color.b, 1f); } }; ConfigBarColorB.SettingChanged += delegate { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)barImg != (Object)null) { ((Graphic)barImg).color = new Color(((Graphic)barImg).color.r, ((Graphic)barImg).color.g, (float)ConfigBarColorB.Value / 255f, 1f); } }; Patch(); Logger.LogInfo((object)(((BaseUnityPlugin)this).Info.Metadata.Name + " has loaded!")); } internal void Patch() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0025: Expected O, but got Unknown if (Harmony == null) { Harmony val = new Harmony(((BaseUnityPlugin)this).Info.Metadata.GUID); Harmony val2 = val; Harmony = val; } Harmony.PatchAll(); } internal void Unpatch() { Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } } private void Start() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Expected O, but got Unknown //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Expected O, but got Unknown //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Expected O, but got Unknown //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05d1: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Chaos Controller"); UICanvas = val.AddComponent<Canvas>(); UICanvas.sortingOrder = 999; UICanvas.renderMode = (RenderMode)0; CanvasScaler val2 = val.AddComponent<CanvasScaler>(); val2.screenMatchMode = (ScreenMatchMode)0; val.AddComponent<GraphicRaycaster>(); shaderOverlay = val.AddComponent<PostProcessVolume>(); GameObject val3 = new GameObject("Audio Sources"); val3.transform.parent = val.transform; val3.AddComponent<RectTransform>(); GameObject val4 = new GameObject("Enemy Sound Source"); val4.transform.parent = val3.transform; EnemyAS = val4.AddComponent<AudioSource>(); EnemyAS.dopplerLevel = 0f; EnemyAS.volume = 0.75f; EnemyAS.outputAudioMixerGroup = AudioManager.instance.SoundMasterGroup; GameObject val5 = new GameObject("Rumble Sound Source"); val5.transform.parent = val3.transform; RumbleAS = val5.AddComponent<AudioSource>(); RumbleAS.dopplerLevel = 0f; RumbleAS.loop = true; RumbleAS.playOnAwake = false; RumbleAS.outputAudioMixerGroup = AudioManager.instance.SoundMasterGroup; AudioReverbFilter val6 = val4.AddComponent<AudioReverbFilter>(); val6.reverbPreset = (AudioReverbPreset)8; val6.reverbLevel = 1f; val6.decayTime = 0.5f; ((Behaviour)val6).enabled = true; Rect rect = ((RectTransform)val.transform).rect; canvasHeight = ((Rect)(ref rect)).height; rect = ((RectTransform)val.transform).rect; canvasWidth = ((Rect)(ref rect)).width; Object.DontDestroyOnLoad((Object)(object)val); timeBar = new GameObject("Time Bar"); timeBar.transform.parent = val.transform; timeBar.SetActive(false); RectTransform val7 = timeBar.AddComponent<RectTransform>(); val7.anchorMin = Vector2.zero; val7.anchorMax = Vector2.one; val7.offsetMin = Vector2.zero; val7.offsetMax = Vector2.zero; GameObject val8 = new GameObject("BG"); val8.transform.parent = timeBar.transform; GameObject val9 = new GameObject("FG"); val9.transform.parent = timeBar.transform; Image val10 = val8.AddComponent<Image>(); ((Graphic)val10).color = Color.black; ((Graphic)val10).rectTransform.anchorMin = Vector2.zero; ((Graphic)val10).rectTransform.anchorMax = Vector2.one; ((Graphic)val10).rectTransform.offsetMin = new Vector2(0f, canvasHeight - 30f); ((Graphic)val10).rectTransform.offsetMax = Vector2.zero; barImg = val9.AddComponent<Image>(); ((Graphic)barImg).color = new Color((float)ConfigBarColorR.Value / 255f, (float)ConfigBarColorG.Value / 255f, (float)ConfigBarColorB.Value / 255f, 1f); barRect = ((Graphic)barImg).rectTransform; barRect.anchorMin = Vector2.zero; barRect.anchorMax = Vector2.one; barRect.offsetMin = new Vector2(0f, canvasHeight - 25f); barRect.offsetMax = new Vector2(0f, -5f); GameObject val11 = new GameObject("Text Group"); val11.transform.parent = val.transform; textGroup = val11.AddComponent<RectTransform>(); textGroup.anchorMin = Vector2.zero; textGroup.anchorMax = Vector2.one; float num = canvasWidth / 2f; textGroup.offsetMin = new Vector2(num + num / 2f, 0f); textGroup.offsetMax = Vector2.zero; string pluginDirectory = Util.GetPluginDirectory("assets"); Logger.LogInfo((object)("에셋 번들을 '" + pluginDirectory + "'에서 불러옵니다.")); assets = AssetBundle.LoadFromFile(pluginDirectory); if ((Object)(object)assets == (Object)null) { Logger.LogError((object)"에셋 번들 로드에 실패했습니다. 폰트가 깨지거나 몇 개의 에셋이 보이지 않을 수 있습니다."); } else { pretendard = assets.LoadAsset<TMP_FontAsset>("Pretendard-Bold SDF"); if ((Object)(object)pretendard == (Object)null) { Logger.LogError((object)"폰트 로드에 실패했습니다. 폰트가 깨질 수 있습니다."); } } RumbleAS.clip = assets.LoadAsset<AudioClip>("rumble"); RumbleAS.Stop(); SceneManager.sceneLoaded += OnSceneChange; photonViewInited = false; GameObject val12 = new GameObject("Credit Text"); val12.transform.parent = val.transform; RectTransform val13 = val12.AddComponent<RectTransform>(); val13.anchorMin = Vector2.zero; val13.anchorMax = Vector2.one; val13.offsetMin = new Vector2(num + num / 2f, 0f); val13.offsetMax = Vector2.zero; creditTxt = val12.AddComponent<TextMeshProUGUI>(); ((TMP_Text)creditTxt).font = pretendard; ((TMP_Text)creditTxt).alignment = (TextAlignmentOptions)514; if (IsDebug) { TextMeshProUGUI obj = creditTxt; ((TMP_Text)obj).text = ((TMP_Text)obj).text + "\n<size=30>디버그 모드 활성화됨</size>"; } val12.SetActive(false); if (IsDebug) { GameObject val14 = new GameObject("Debug Text"); val14.transform.parent = val.transform; Vector2 val15 = Vector2.one * 100f; val13 = val14.AddComponent<RectTransform>(); val13.anchorMin = Vector2.zero; val13.anchorMax = Vector2.one; val13.offsetMin = val15; val13.offsetMax = val15 * -1f; DebugText = val14.AddComponent<TextMeshProUGUI>(); ((TMP_Text)DebugText).font = pretendard; ((TMP_Text)DebugText).text = ""; ((TMP_Text)DebugText).fontSize = 20f; } Exclude_Modifiers.Clear(); Modifiers.Init(delegate(Modifier mod) { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown ConfigEntry<bool> config = ((BaseUnityPlugin)this).Config.Bind<bool>(Language.GetText("레벨 이벤트"), mod.GetName(), true, new ConfigDescription(mod.description, (AcceptableValueBase)null, Array.Empty<object>())); config.SettingChanged += delegate { OnEventSettingChanged(config, mod); }; OnEventSettingChanged(config, mod); }); if (IsDebug) { Logger.LogInfo((object)"프리팹을 풀에 추가하는 중..."); } foreach (GameObject item in PrefabToAddNetwork) { NetworkPrefabs.RegisterNetworkPrefab(item); if (IsDebug) { Logger.LogMessage((object)("프리팹 추가됨: " + ((Object)item).name)); } } Logger.LogMessage((object)"Done. '-' here have a clover's face"); } private void OnEventSettingChanged(ConfigEntry<bool> config, Modifier mod) { if (Exclude_Modifiers.ContainsKey(((ConfigEntryBase)config).Definition.Key)) { Exclude_Modifiers[mod.name] = !config.Value; } else { Exclude_Modifiers.Add(mod.name, !config.Value); } if (IsDebug) { Logger.LogInfo((object)$"이벤트 상태 변경: {mod.name} => {config.Value}"); } } private void OnSceneChange(Scene scene, LoadSceneMode mode) { photonViewInited = false; } internal bool InitPhotonView() { NetworkManager val = Object.FindAnyObjectByType<NetworkManager>(); if ((Object)(object)val == (Object)null) { return false; } if ((Object)(object)controller == (Object)null) { if (!((Component)val).gameObject.TryGetComponent<ChaosController>(ref controller)) { controller = ((Component)val).gameObject.AddComponent<ChaosController>(); } if (!GameManager.Multiplayer()) { view = null; photonViewInited = false; return false; } } if (!GameManager.Multiplayer()) { return false; } if ((Object)(object)view == (Object)null) { view = ((Component)val).GetComponent<PhotonView>(); if (IsDebug) { Logger.LogMessage((object)("PhotonView ID: " + view.ViewID)); } photonViewInited = (Object)(object)view != (Object)null; } return photonViewInited; } public TextMeshProUGUI MakeText(string text, float time) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(text.ToLower().Trim()); val.transform.parent = (Transform)(object)textGroup; RectTransform val2 = val.AddComponent<RectTransform>(); val2.anchorMin = new Vector2(0f, 0.5f); val2.anchorMax = new Vector2(1f, 0.5f); val2.offsetMin = new Vector2(0f, (0f - text_height) / 2f); val2.offsetMax = new Vector2(0f, text_height / 2f); TextLerp textLerp = val.AddComponent<TextLerp>(); ((TMP_Text)textLerp).text = text; ((TMP_Text)textLerp).font = pretendard; ((TMP_Text)textLerp).fontSize = 30f; ((TMP_Text)textLerp).rectTransform.anchoredPosition = Vector2.zero; ((Vector2)(ref textLerp.targetPosition)).Set(0f, 0f); ((TMP_Text)textLerp).horizontalAlignment = (HorizontalAlignmentOptions)1; ((TMP_Text)textLerp).verticalAlignment = (VerticalAlignmentOptions)512; texts.Add(textLerp); if (Mathf.Max(0f, time) > 0f) { GameObject val3 = new GameObject("Time Text"); val3.transform.parent = val.transform; RectTransform val4 = val3.AddComponent<RectTransform>(); EventTimerBar eventTimerBar = val3.AddComponent<EventTimerBar>(); val4.anchoredPosition = Vector2.zero; ((Vector2)(ref eventTimerBar.targetPosition)).Set(100f, 0f); eventTimerBar.SetTime(time); ((TMP_Text)eventTimerBar).font = pretendard; ((TMP_Text)eventTimerBar).fontSize = 30f; ((TMP_Text)eventTimerBar).horizontalAlignment = (HorizontalAlignmentOptions)1; ((TMP_Text)eventTimerBar).verticalAlignment = (VerticalAlignmentOptions)512; eventTimerBars.Add(eventTimerBar); } else { eventTimerBars.Add(null); } ResetText(); return (TextMeshProUGUI)(object)textLerp; } public void ResetText() { //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) try { int num = 0; for (int i = 0; i < texts.Count; i++) { float num2 = 0f; bool flag = true; if (i >= 0 && i < controller.events.Count && controller.events[i] != null) { num2 = controller.events[i].timerSelf; flag = num2 <= 0f && !controller.events[i].isOnce; } if (!flag) { num++; } } int num3 = 0; for (int num4 = texts.Count - 1; num4 >= 0; num4--) { if (!EventToRemove.Contains(num4)) { TextLerp textLerp = texts[num4]; EventTimerBar eventTimerBar = eventTimerBars[num4]; float num5 = text_height * (float)num3; if (num5 >= 375f) { EventToRemove.Add(num4); TextToRemove.Add(num4); } else { textLerp.targetPosition = new Vector2(textLerp.targetPosition.x, num5); } num3++; } } } catch (Exception ex) { Logger.LogError((object)("텍스트의 위치를 리셋하던 중 오류가 발생했습니다: " + ex.Message + "\n" + ex.StackTrace)); } } public bool RemoveText(TextLerp text) { int num = texts.IndexOf(text); if (num == -1) { if (IsDebug) { Logger.LogWarning((object)("텍스트 \"" + ((TMP_Text)text).text + "\"의 인덱스를 찾지 못했습니다.")); } return false; } return RemoveText(num); } public bool RemoveText(int index) { if (index >= 0 && index < texts.Count) { TextLerp textLerp = texts[index]; Object.Destroy((Object)(object)((Component)textLerp).gameObject); EventTimerBar eventTimerBar = eventTimerBars[index]; if ((Object)(object)eventTimerBar != (Object)null) { Object.Destroy((Object)(object)((Component)eventTimerBar).gameObject); } texts.RemoveAt(index); eventTimerBars.RemoveAt(index); return true; } return false; } private void Update() { //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) if (timeBar.activeSelf != Generated) { timeBar.SetActive(Generated); } if (!Generated) { if (texts.Count > 0) { for (int j = 0; j < texts.Count; j++) { Object.Destroy((Object)(object)texts[j]); } texts.Clear(); } if (eventTimerBars.Count > 0) { for (int k = 0; k < eventTimerBars.Count; k++) { Object.Destroy((Object)(object)eventTimerBars[k]); } eventTimerBars.Clear(); } photonViewInited = false; startTimer = 0f; if (((Component)creditTxt).gameObject.activeSelf) { ((Component)creditTxt).gameObject.SetActive(false); } if (IsDebug) { ((TMP_Text)DebugText).text = ""; } if (didReset) { return; } didReset = true; foreach (Modifier @event in Modifiers.Events) { @event.options.chance = 1f; } ModVars.Reset(); return; } if (didReset) { didReset = false; } if ((Object)(object)view == (Object)null || (Object)(object)controller == (Object)null) { photonViewInited = InitPhotonView(); } if ((Object)(object)carObject == (Object)null) { AssetBundle car_assets = CarCrash.car_assets; if (!GameManager.Multiplayer()) { carObject = Object.Instantiate<GameObject>(car_assets.LoadAsset<GameObject>("Killer Joe"), Vector3.zero, Quaternion.identity); car = carObject.AddComponent<CrazyCarAIScript>(); car.honk = car_assets.LoadAsset<AudioClip>("car honk"); car.exp_sprites = car_assets.LoadAssetWithSubAssets<Sprite>("spr_realisticexplosion").ToList(); } else if ((Object)(object)controller != (Object)null && (Object)(object)controller.view != (Object)null && SemiFunc.IsMasterClient()) { carObject = PhotonNetwork.Instantiate("Killer Joe", Vector3.zero, Quaternion.identity, (byte)0, (object[])null); controller.view.RPC("FindCarRPC", (RpcTarget)0, Array.Empty<object>()); } } if (startTimer < 5f) { startTimer += Time.unscaledDeltaTime; if (!((Component)creditTxt).gameObject.activeSelf) { ((Component)creditTxt).gameObject.SetActive(true); } } else if (((Component)creditTxt).gameObject.activeSelf) { ((Component)creditTxt).gameObject.SetActive(false); } barRect.offsetMax = new Vector2(SemiFunc.Remap(0f, 20f, 0f, 0f - canvasWidth, controller.eventTimer), barRect.offsetMax.y); if (TextToRemove.Count <= 0) { return; } IOrderedEnumerable<int> orderedEnumerable = from i in TextToRemove.Distinct() orderby i descending select i; foreach (int item in orderedEnumerable) { if (item >= 0 && item < texts.Count) { RemoveText(item); } } TextToRemove.Clear(); } } public static class Commands { private static ChaosController cont => ChaosMod.Instance.controller; [CommandExecution("Revive", "Revive All Players", true, true)] [CommandAlias("reviveall")] [CommandAlias("ra")] public static void ReviveAllPlayers(string args) { if (ChaosMod.IsDebug) { int num = Modifiers.Events.IndexOf(Modifiers.Events.Find((Modifier mod) => mod is ReviveAllPlayers)); if (num != -1) { cont.view.RPC("SendEventRPC", (RpcTarget)0, new object[1] { num }); } else { ChaosMod.Logger.LogError((object)"evtIndex is Null!"); } } } [CommandExecution("Spawn Car", "Spawns a car", true, true)] [CommandAlias("spawncar")] [CommandAlias("sc")] public static void SpawnCar(string args) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) if (!ChaosMod.IsDebug) { return; } int num = Modifiers.Events.IndexOf(Modifiers.Events.Find((Modifier mod) => mod is CarCrash)); if (num != -1) { if (GameManager.Multiplayer()) { cont.view.RPC("SendEventRPC", (RpcTarget)0, new object[1] { num }); } else { cont.SendEventRPC(num); } } else { ChaosMod.Logger.LogError((object)"evtIndex is Null!"); } } [CommandExecution("Low Pitch", "Lows the pitch of voices", true, true)] [CommandAlias("lowpitch")] [CommandAlias("lp")] public static void LowPitch(string args) { if (ChaosMod.IsDebug) { int num = Modifiers.Events.IndexOf(Modifiers.Events.Find((Modifier mod) => mod is VoicePitch && ((VoicePitch)mod).pitch < 1f)); if (num != -1) { cont.view.RPC("SendEventRPC", (RpcTarget)0, new object[1] { num }); } else { ChaosMod.Logger.LogError((object)"evtIndex is Null!"); } } } [CommandExecution("High Pitch", "Highs the pitch of voices", true, true)] [CommandAlias("highpitch")] [CommandAlias("hp")] public static void HighPitch(string args) { if (ChaosMod.IsDebug) { int num = Modifiers.Events.IndexOf(Modifiers.Events.Find((Modifier mod) => mod is VoicePitch && ((VoicePitch)mod).pitch > 1f)); if (num != -1) { cont.view.RPC("SendEventRPC", (RpcTarget)0, new object[1] { num }); } else { ChaosMod.Logger.LogError((object)"evtIndex is Null!"); } } } [CommandExecution("Show AD", "Shows the AD", true, true)] [CommandAlias("sa")] [CommandAlias("showad")] public static void ShowAD(string args) { } } public class CrazyCarAIScript : MonoBehaviour, IOnEventCallback { public PhotonView photonView; public List<Vector3> waypoints = new List<Vector3>(); public List<Sprite> exp_sprites = new List<Sprite>(); public float exp_anim_frame = 0.05f; public AudioClip honk; private MapCustom mapCustom; private AudioSource src; private AudioSource exp_src; private SpriteRenderer exp_rend; private List<Transform> FrontWheels = new List<Transform>(); private List<Transform> BackWheels = new List<Transform>(); private List<Light> frontLights = new List<Light>(); private List<Light> backLights = new List<Light>(); private List<Light> allLights = new List<Light>(); private NavMeshAgent agent; private ParticleSystem spawnParticles; private Transform root; private Vector3 startPos; private Vector3 startEuler; private HurtCollider hurt; private string[] hitMessages = new string[16] { "Wow, great driving.", "Nice driving, really.", "You're a real pro driver?", "Wow, did you get your license from a cereal box?", "10 out of 10 driving skills.", "Nice driving, genius.", "Wow, great driving.", "Did you get your license in a lucky draw?", "Ever heard of a turn signal?", "Call an Ambulance!", "This driver must be the reason for those warning signs.", "Was that a human driving or a blindfolded chimp?", "That’s supposed to be a human driving? A dog could’ve done a better job.", "That driver must be the reason for those warning signs.", "YOU DRIVE LIKE YOU'RE PLAYING GRAND THEFT AUTO.", "git gud" }; private string[,] startMessages = new string[6, 2] { { "Ah shit, here we go again.", "Ah shoot, here we go again." }, { "That car i fucking hate.", "I hate that car so much." }, { "Not again?", "Not again??" }, { "Great, now we are going to have bad time.", "Great, now we are going to have bad time." }, { "ourple", "ourple" }, { "IT ALWAYS COME BACK.", "IT ALWAYS COME BACK." } }; private string[,] deadMessages = new string[3, 2] { { "Finally, that stupid bitch is gone.", "Finally, some peace." }, { "WAHOOOO", "WAHOOOO" }, { "Finally, some peace.", "Okay, That car is gone for now." } }; private bool yapping; private UnityEvent chat_callback; internal bool isSpawned; private float rotateTimer; private float lastYRotation; private float rotationSpeed; private float lastAgentSpeed; private float curSpeedDelta; private int curAnimFrame; private float curAnimTime; private bool playAnimation; private bool needsToDestroy; private float honkTimer; private Vector3 targetPos; private void SetupComponents() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Expected O, but got Unknown if ((Object)(object)agent == (Object)null) { agent = ((Component)this).GetComponent<NavMeshAgent>(); } if ((Object)(object)agent == (Object)null) { ChaosMod.Logger.LogError((object)"NavMeshAgent가 없습니다."); return; } if ((Object)(object)src == (Object)null) { src = ((Component)this).GetComponent<AudioSource>(); } if ((Object)(object)src == (Object)null) { ChaosMod.Logger.LogError((object)"AudioSource가 없습니다."); return; } src.outputAudioMixerGroup = AudioManager.instance.SoundMasterGroup; if ((Object)(object)photonView == (Object)null) { photonView = ((Component)this).GetComponent<PhotonView>(); } if ((Object)(object)photonView == (Object)null) { ChaosMod.Logger.LogError((object)"PhotonView가 없습니다."); return; } if (chat_callback == null) { chat_callback = new UnityEvent(); chat_callback.AddListener((UnityAction)delegate { yapping = false; }); } if ((Object)(object)hurt == (Object)null) { hurt = ((Component)this).GetComponent<HurtCollider>(); hurt.onImpactPlayer.AddListener((UnityAction)delegate { //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (GameManager.Multiplayer() && !yapping) { yapping = true; ChatManager.instance.PossessChatScheduleStart(int.MaxValue); ChatManager.instance.PossessChat((PossessChatID)2, hitMessages[Random.Range(0, hitMessages.Length)], 4f, Color.red, 0f, false, 0, chat_callback); ChatManager.instance.PossessChatScheduleEnd(); } }); } if ((Object)(object)mapCustom == (Object)null) { mapCustom = ((Component)this).GetComponent<MapCustom>(); } if ((Object)(object)mapCustom == (Object)null) { ChaosMod.Logger.LogError((object)"MapCustom가 없습니다."); return; } Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(); Transform[] array = componentsInChildren; foreach (Transform val in array) { if (((Object)val).name.Contains("Front Wheel")) { FrontWheels.Add(val); } else if (((Object)val).name.Contains("Back Wheel")) { BackWheels.Add(val); } else if (((Object)val).name.Contains("Front Light")) { Light component = ((Component)val).GetComponent<Light>(); frontLights.Add(component); allLights.Add(component); } else if (((Object)val).name.Contains("Back Light")) { Light component2 = ((Component)val).GetComponent<Light>(); backLights.Add(component2); allLights.Add(component2); } else if (((Object)val).name == "root") { root = val; } else if (((Object)val).name.Contains("Spawn")) { spawnParticles = ((Component)val).GetComponent<ParticleSystem>(); } else if (((Object)val).name.Contains("Explosion")) { exp_src = ((Component)val).GetComponent<AudioSource>(); exp_src.outputAudioMixerGroup = AudioManager.instance.SoundMasterGroup; exp_rend = ((Component)val).GetComponent<SpriteRenderer>(); } } } private void Start() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) SetupComponents(); if (SemiFunc.IsMasterClientOrSingleplayer()) { LevelPoint[] array = Object.FindObjectsByType<LevelPoint>((FindObjectsSortMode)0); foreach (LevelPoint val in array) { waypoints.Add(((Component)val).transform.position); } } ((Collider)((Component)this).GetComponent<BoxCollider>()).enabled = false; ((Behaviour)hurt).enabled = false; isSpawned = false; agent.isStopped = false; ((Component)root).gameObject.SetActive(false); ((Behaviour)agent).enabled = SemiFunc.IsMasterClientOrSingleplayer(); if (SemiFunc.IsMultiplayer() && PhotonNetwork.IsMasterClient) { photonView.TransferOwnership(PhotonNetwork.LocalPlayer); } MonoBehaviour.print((object)("agent.enabled: " + ((Behaviour)agent).enabled + ", Transform View: " + (object)((Component)this).GetComponent<PhotonTransformView>())); } [PunRPC] private void SpawnRPC() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) if (GameManager.Multiplayer()) { int num = (ChaosMod.Instance.ConfigFamilyFriendly.Value ? 1 : 0); } exp_src.Stop(); playAnimation = false; exp_rend.sprite = null; curAnimFrame = 0; isSpawned = true; src.Play(); startPos = ((Component)this).transform.position; startEuler = ((Component)this).transform.eulerAngles; spawnParticles.Play(); ((Component)root).gameObject.SetActive(true); if (SemiFunc.IsMasterClientOrSingleplayer()) { agent.isStopped = false; } ((Collider)((Component)this).GetComponent<BoxCollider>()).enabled = true; ((Behaviour)hurt).enabled = true; GoToNextPoint(); PhotonNetwork.AddCallbackTarget((object)this); } public void Spawn() { if (SemiFunc.IsMasterClientOrSingleplayer()) { if (GameManager.Multiplayer()) { photonView.RPC("SpawnRPC", (RpcTarget)0, Array.Empty<object>()); } else { SpawnRPC(); } } } [PunRPC] private void DespawnRPC(bool slient = false) { if (!slient) { exp_src.Play(); curAnimTime = 0f; playAnimation = true; } else { PhotonNetwork.RemoveCallbackTarget((object)this); } ((Behaviour)hurt).enabled = false; isSpawned = false; } public void Despawn(bool slient = false) { if (SemiFunc.IsMasterClientOrSingleplayer()) { if (GameManager.Multiplayer()) { photonView.RPC("DespawnRPC", (RpcTarget)0, new object[1] { slient }); } else { DespawnRPC(slient); } } } [PunRPC] private void HonkRPC() { if (isSpawned || !(honkTimer > 0f)) { honkTimer = 1f; exp_src.PlayOneShot(honk, 0.4f); } } private void Honk() { if (SemiFunc.IsMasterClientOrSingleplayer()) { if (GameManager.Multiplayer()) { photonView.RPC("HonkRPC", (RpcTarget)0, Array.Empty<object>()); } else { HonkRPC(); } } } public void GoToNextPoint() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) if ((waypoints.Count != 0 || isSpawned) && SemiFunc.IsMasterClientOrSingleplayer()) { SetDestination(waypoints[Random.Range(0, waypoints.Count)]); } } private void Hide() { src.Stop(); ((Component)root).gameObject.SetActive(false); if (SemiFunc.IsMasterClientOrSingleplayer()) { agent.isStopped = true; } ((Collider)((Component)this).GetComponent<BoxCollider>()).enabled = false; } private void OnDestroy() { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameManager.Multiplayer() || SemiFunc.IsMasterClient()) { int num = (ChaosMod.Instance.ConfigFamilyFriendly.Value ? 1 : 0); ChatManager.instance.PossessChatScheduleStart(int.MaxValue); ChatManager.instance.PossessChat((PossessChatID)0, deadMessages[Random.Range(0, deadMessages.GetLength(0)), num], 4f, Color.red, 0f, false, 0, (UnityEvent)null); ChatManager.instance.PossessChatScheduleEnd(); PhotonNetwork.RemoveCallbackTarget((object)this); } } [PunRPC] private void SetDestinationRPC(float x, float y, float z) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMasterClientOrSingleplayer()) { agent.destination = new Vector3(x, y, z); } lastYRotation = ((Component)this).transform.eulerAngles.y; } private void SetDestination(Vector3 pos) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) if (SemiFunc.IsMasterClientOrSingleplayer()) { if (GameManager.Multiplayer()) { photonView.RPC("SetDestinationRPC", (RpcTarget)0, new object[3] { pos.x, pos.y, pos.z }); } else { SetDestinationRPC(pos.x, pos.y, pos.z); } } } private void Update() { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) if (honkTimer > 0f) { honkTimer -= Time.deltaTime; } if ((Object)(object)exp_rend == (Object)null) { SetupComponents(); } ((Component)exp_rend).transform.LookAt(((Component)Camera.main).transform, Vector3.up); if (spawnParticles.isPlaying) { ((Component)spawnParticles).transform.position = startPos; ((Component)spawnParticles).transform.eulerAngles = startEuler; } if (SemiFunc.IsMasterClientOrSingleplayer() && agent.isOnNavMesh && !agent.pathPending && agent.remainingDistance < 5f && isSpawned) { GoToNextPoint(); } if (playAnimation) { if (curAnimTime > 0f) { curAnimTime -= Time.unscaledDeltaTime; } else { curAnimTime = exp_anim_frame; exp_rend.sprite = exp_sprites[curAnimFrame]; if (curAnimFrame == 5) { Hide(); } curAnimFrame = Mathf.Clamp(curAnimFrame + 1, 0, exp_sprites.Count - 1); } } if (!isSpawned && (Object)(object)mapCustom != (Object)null) { mapCustom.Hide(); } Vector3 velocity = agent.velocity; float num = ((Vector3)(ref velocity)).magnitude * 4f; float num2 = num - lastAgentSpeed; lastAgentSpeed = num; curSpeedDelta = Mathf.Floor(num2 * 100f) / 100f; if (Mathf.Abs(curSpeedDelta) <= 0.01f) { curSpeedDelta = 0f; } src.pitch = num / agent.speed + 1f; float num3 = Mathf.Sign(curSpeedDelta); foreach (Light backLight in backLights) { if (num3 >= 0f) { backLight.intensity = 0.5f; } else if (num3 < 0f) { backLight.intensity = 1f; } } float y = ((Component)this).transform.eulerAngles.y; float num4 = Mathf.DeltaAngle(lastYRotation, y); rotationSpeed = num4 / Time.deltaTime; lastYRotation = y; rotateTimer += Time.deltaTime * num; float num5 = ((Component)this).transform.eulerAngles.y - 90f; foreach (Transform frontWheel in FrontWheels) { frontWheel.eulerAngles = new Vector3(frontWheel.eulerAngles.x, num5 + Mathf.Clamp(rotationSpeed / agent.angularSpeed * 45f, -45f, 45f), 0f - rotateTimer); } foreach (Transform backWheel in BackWheels) { backWheel.eulerAngles = new Vector3(backWheel.eulerAngles.x, backWheel.eulerAngles.y, 0f - rotateTimer); } } private Transform GetParentTransformByNameContains(Transform start, string name) { Transform parent = ((Component)start).transform.parent; while (!((Object)parent).name.Contains(name) && (Object)(object)parent.parent != (Object)null) { parent = parent.parent; } return parent; } private void FixedUpdate() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) if (!SemiFunc.IsMasterClientOrSingleplayer() || !isSpawned) { return; } Vector3 val = ((Component)this).transform.position + ((Component)this).transform.forward * 7.5f + Vector3.up * 3f; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(1.25f, 1.25f, 0.5f); Vector3 forward = ((Component)this).transform.forward; float num = 20f; RaycastHit val3 = default(RaycastHit); if (Physics.BoxCast(val, val2, forward, ref val3, ((Component)this).transform.rotation, num)) { Transform parentTransformByNameContains = GetParentTransformByNameContains(((RaycastHit)(ref val3)).transform, "Player"); if (((Object)parentTransformByNameContains).name.Contains("Player")) { SetDestination(((RaycastHit)(ref val3)).transform.position); if (honkTimer <= 0f) { Honk(); } } } PhotonNetwork.RaiseEvent((byte)1, (object)((Component)agent).transform.position, new RaiseEventOptions { Receivers = (ReceiverGroup)0 }, SendOptions.SendUnreliable); } public void OnEvent(EventData photonEvent) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) if (photonEvent.Code == 1) { targetPos = (Vector3)photonEvent.CustomData; } } } public class SpawnMonster : Modifier { private string monsterPrefabPath = "enemies"; private GameObject[] monsters; public int count = 1; public SpawnMonster(int count) : base("몬스터 스폰", "몬스터를 스폰합니다.") { this.count = count; isOnce = true; name = $"몬스터 {count}마리 소환"; monsters = Resources.LoadAll<GameObject>(monsterPrefabPath); } public override void Start() { //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) base.Start(); if (ChaosMod.IsDebug) { ChaosMod.Logger.LogInfo((object)("Spawn " + count + " enemys")); } if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } LevelPoint[] array = Object.FindObjectsByType<LevelPoint>((FindObjectsSortMode)0); foreach (Modifier @event in Modifiers.Events) { if (@event is SpawnMonster && !Modifiers.Excludes.Contains(@event.Instance)) { Modifiers.Excludes.Add(@event.Instance); } } int num = 0; List<EnemySetup> enemiesDifficulty = EnemyDirector.instance.enemiesDifficulty1; List<EnemySetup> enemiesDifficulty2 = EnemyDirector.instance.enemiesDifficulty2; List<EnemySetup> enemiesDifficulty3 = EnemyDirector.instance.enemiesDifficulty3; List<EnemySetup> list = new List<EnemySetup>(enemiesDifficulty.Count + enemiesDifficulty2.Count + enemiesDifficulty3.Count); list.AddRange(enemiesDifficulty); list.AddRange(enemiesDifficulty2); list.AddRange(enemiesDifficulty3); List<EnemySetup> list2 = list; foreach (EnemySetup item in list2) { if (num >= count) { break; } if (!(Random.Range(0f, 1f) <= 0.6f)) { Enemies.SpawnEnemy(item, ((Component)array[Random.Range(0, array.Length)]).transform.position, Quaternion.identity, true); ChaosMod.Logger.LogInfo((object)("적 스폰됨: " + ((Object)item).name)); num++; } } } public override Modifier Clone() { return new SpawnMonster(count) { isClone = true, Instance = this }; } } public class Tumble : Modifier { public Tumble() : base("넘어지기", "강제로 넘어집니다.") { isOnce = true; } public override void Start() { base.Start(); if (SemiFunc.IsMasterClientOrSingleplayer()) { PlayerTumble[] array = Object.FindObjectsByType<PlayerTumble>((FindObjectsSortMode)0); foreach (PlayerTumble val in array) { val.TumbleSet(true, false); val.TumbleOverrideTime(Random.Range(2f, 3f)); } } } public override Modifier Clone() { return new Tumble { isClone = true, Instance = this }; } } public class GameSpeed : Modifier { public float mult = 1f; public GameSpeed(float mult, string name) : base("게임 속도", "게임 속도를 늦추거나 빠르게 합니다.") { base.name = name; minTimer = 20f; maxTimer = 25f; this.mult = mult; } public override void Start() { base.Start(); foreach (Modifier @event in Modifiers.Events) { if (@event is GameSpeed) { Modifiers.Excludes.Add(@event.Instance); } } Time.timeScale = mult; } public override void OnFinished() { base.OnFinished(); foreach (Modifier @event in Modifiers.Events) { if (@event is GameSpeed) { Modifiers.Excludes.Remove(@event.Instance); } } while (Time.timeScale != 1f) { Time.timeScale = 1f; } } public override Modifier Clone() { return new GameSpeed(mult, name) { isClone = true, Instance = this }; } } public class KillAllMonsters : Modifier { public KillAllMonsters() : base("모든 몬스터 죽이기", "강제로 모든 몬스터를 죽입니다.") { isOnce = true; } public override void Start() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) base.Start(); EnemyHealth[] array = Object.FindObjectsByType<EnemyHealth>((FindObjectsSortMode)0); foreach (EnemyHealth val in array) { val.Hurt(int.MaxValue, Vector3.zero); } } public override Modifier Clone() { return new KillAllMonsters { isClone = true, Instance = this }; } } public class QuakeFOV : Modifier { public QuakeFOV() : base("넓은 시야각", "시야각을 강제로 넓힙니다.") { minTimer = 20f; maxTimer = 30f; } public override void Update() { base.Update(); CameraZoom.Instance.OverrideZoomSet(ChaosMod.Instance.ConfigDizzyness.Value ? 150f : 90f, 0.5f, 0.5f, 1f, ((Component)ChaosMod.Instance).gameObject, 10); } public override Modifier Clone() { return new QuakeFOV { isClone = true, Instance = this }; } } public class BrokeAllDoor : Modifier { public BrokeAllDoor() : base("모든 미닫이문 부수기", "모든 출입문, 서랍문 등이 부숴집니다.") { isOnce = true; } public override void Start() { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) base.Start(); if (ModVars.brokeAllDoor_didRun) { HingeJoint[] array = Object.FindObjectsByType<HingeJoint>((FindObjectsSortMode)0); foreach (HingeJoint val in array) { ((Component)val).GetComponent<PhysGrabObjectImpactDetector>().BreakHeavy(Vector3.zero, true, 0f); } return; } ModVars.brokeAllDoor_didRun = true; HingeJoint[] array2 = Object.FindObjectsByType<HingeJoint>((FindObjectsSortMode)0); foreach (HingeJoint val2 in array2) { Rigidbody component = ((Component)val2).GetComponent<Rigidbody>(); component.AddForce(Vector3.forward * 5000f, (ForceMode)1); } } public override Modifier Clone() { BrokeAllDoor brokeAllDoor = new BrokeAllDoor(); if (ModVars.brokeAllDoor_didRun) { base.Instance.name = "문 확인사살"; base.Instance.options.oncePerLevel = true; } brokeAllDoor.isClone = true; brokeAllDoor.Instance = this; return brokeAllDoor; } } public class MonsterSound : Modifier { public string aud_name; public string modName; public int length; public List<AudioClip> sounds; public MonsterSound(string modName, string name, int length) : base("환청", "진짜일까요? 아니면 그냥 망상이였을까요?") { aud_name = name; this.length = length; this.modName = modName; base.name = modName; isOnce = true; sounds = new List<AudioClip>(); if (length <= 1) { sounds.Add(ChaosMod.Instance.assets.LoadAsset<AudioClip>(name)); return; } for (int i = 0; i < length; i++) { sounds.Add(ChaosMod.Instance.assets.LoadAsset<AudioClip>($"{name}{i}")); } } public override string GetName() { return Language.GetText("환청"); } public override void Start() { base.Start(); ((MonsterSound)base.Instance).options.chance -= 0.05f; if (length > 1) { ChaosMod.Instance.EnemyAS.PlayOneShot(sounds[Random.Range(1, length)], 0.5f); } else { ChaosMod.Instance.EnemyAS.PlayOneShot(sounds[0], 0.5f); } } public override Modifier Clone() { return new MonsterSound(name, aud_name, length) { isClone = true, Instance = this }; } } public class AddHealth : Modifier { public int amount; public AddHealth(int amount) : base("체력 추가", "플레이어를 힐하거나 딜합니다") { this.amount = amount; name = ((amount > 0) ? "+" : "") + $"{amount} HP"; isOnce = true; options.oncePerLevel = true; } public override void Start() { base.Start(); if (amount == 0) { return; } if (SemiFunc.IsMasterClientOrSingleplayer()) { PlayerHealth[] array = Object.FindObjectsByType<PlayerHealth>((FindObjectsSortMode)0); foreach (PlayerHealth val in array) { if (Mathf.Sign((float)amount) < 0f) { val.Hurt(Mathf.Abs(amount), true, -1); } else { val.Heal(Mathf.Abs(amount), true); } } } foreach (Modifier @event in Modifiers.Events) { if (@event is AddHealth) { Modifiers.Excludes.Add(@event); } } } public override Modifier Clone() { return new AddHealth(amount) { isClone = true, Instance = this }; } } public class HideHealthUI : Modifier { public HideHealthUI() : base("체력 숨기기", "체력 UI를 숨깁니다.") { minTimer = 20f; maxTimer = 35f; } public override void Update() { base.Update(); HealthUI instance = HealthUI.instance; ((SemiUI)instance).Hide(); } public override void OnFinished() { base.OnFinished(); HealthUI instance = HealthUI.instance; ((SemiUI)instance).Show(); } public override Modifier Clone() { return new HideHealthUI { isClone = true, Instance = this }; } } public class HideSprintUI : Modifier { public HideSprintUI() : base("기력 숨기기", "에너지 UI를 숨깁니다.") { minTimer = 20f; maxTimer = 35f; } public override void Update() { base.Update(); EnergyUI instance = EnergyUI.instance; ((SemiUI)instance).Hide(); } public override void OnFinished() { base.OnFinished(); HealthUI instance = HealthUI.instance; ((SemiUI)instance).Show(); } public override Modifier Clone() { return new HideSprintUI { isClone = true, Instance = this }; } } public class DisablePostProcessing : Modifier { public static GameObject post; public DisablePostProcessing() : base("화면 효과 비활성화", "화면에 적용된 효과를 제거합니다.") { minTimer = 30f; maxTimer = 60f; } public override void Start() { base.Start(); if ((Object)(object)post == (Object)null) { post = ((Component)((Component)Object.FindAnyObjectByType<PostProcessing>()).transform.parent).gameObject; } post.SetActive(false); } public override Modifier Clone() { return new DisablePostProcessing { isClone = true, Instance = this }; } public override void OnFinished() { base.OnFinished(); post.SetActive(true); } } public class JointAreDoors : Modifier { public JointAreDoors() : base("모든 서랍 문을 지도에 표시", "서랍 문, 냉장고 문 등을 지도에 표시합니다.") { isOnce = true; options.oncePerLevel = true; } public override void Start() { base.Start(); DirtFinderMapDoorTarget val = Object.FindAnyObjectByType<DirtFinderMapDoorTarget>(); if ((Object)(object)val == (Object)null) { if (ChaosMod.IsDebug) { ChaosMod.Logger.LogWarning((object)"DirtFinderMapDoorTarget을 찾지 못하였습니다."); } return; } HingeJoint[] array = Object.FindObjectsByType<HingeJoint>((FindObjectsSortMode)0); DirtFinderMapDoor val3 = default(DirtFinderMapDoor); foreach (HingeJoint val2 in array) { if (!((Component)val2).TryGetComponent<DirtFinderMapDoor>(ref val3)) { DirtFinderMapDoor val4 = ((Component)val2).gameObject.AddComponent<DirtFinderMapDoor>(); val4.DoorPrefab = ((Component)val).gameObject; } } } public override Modifier Clone() { return new JointAreDoors { isClone = true, Instance = this }; } } public class DuckMadness : Modifier { private string rubberDuckPath = "items/Item Rubber Duck"; private float chanceBefore; private GameObject rubberDuckPrefab; public List<ItemRubberDuck> ducks = new List<ItemRubberDuck>(); public DuckMadness() : base("축지법 쓰는 오리", "고무 오리가 축지법을 씁니다.") { minTimer = 25f; maxTimer = 30f; rubberDuckPrefab = Resources.Load<GameObject>(rubberDuckPath); if ((Object)(object)rubberDuckPrefab == (Object)null) { ChaosMod.Logger.LogError((object)"rubberDuckPrefab이 존재하지 않습니다!"); } } public override void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) base.Start(); if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } chanceBefore = ((DuckMadness)base.Instance).options.chance; ((DuckMadness)base.Instance).options.chance = 0f; List<PlayerAvatar> list = SemiFunc.PlayerGetAll(); foreach (PlayerAvatar item in list) { Vector3 val = ((Component)item).transform.position + Vector3.up; Quaternion rotation = ((Component)item).transform.rotation; for (int i = 0; i < 9 - list.Count; i++) { GameObject val2 = null; val2 = ((!GameManager.Multiplayer()) ? Object.Instantiate<GameObject>(rubberDuckPrefab, val, rotation) : PhotonNetwork.Instantiate(rubberDuckPath, val, rotation, (byte)0, (object[])null)); Rigidbody component = val2.GetComponent<Rigidbody>(); component.isKinematic = false; component.AddForce(val2.transform.forward * 100f); val2.GetComponent<ItemBattery>().autoDrain = false; val2.GetComponent<ItemBattery>().batteryActive = false; ItemRubberDuck component2 = val2.GetComponent<ItemRubberDuck>(); ((DuckMadness)base.Instance).ducks.Add(component2); } } } public override void Update() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) base.Update(); if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (ItemRubberDuck duck in ((DuckMadness)base.Instance).ducks) { PhysGrabObject component = ((Component)duck).GetComponent<PhysGrabObject>(); Rigidbody component2 = ((Component)duck).GetComponent<Rigidbody>(); component2.AddForce(((Component)duck).transform.forward * 100f); Vector3 velocity = component2.velocity; if (((Vector3)(ref velocity)).magnitude > 500f) { velocity = component2.velocity; component2.velocity = ((Vector3)(ref velocity)).normalized * 500f; } if (component.playerGrabbing.Count <= 0 || !SemiFunc.IsMasterClientOrSingleplayer()) { continue; } foreach (PhysGrabber item in component.playerGrabbing) { if (!((Object)(object)item == (Object)null)) { if (!GameManager.Multiplayer()) { item.ReleaseObject(0.1f); continue; } item.photonView.RPC("ReleaseObjectRPC", (RpcTarget)0, new object[2] { false, 0.1f }); } } } } public override void OnFinished() { base.OnFinished(); if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } for (int i = 0; i < ((DuckMadness)base.Instance).ducks.Count; i++) { GameObject gameObject = ((Component)((DuckMadness)base.Instance).ducks[i]).gameObject; if (!((Object)(object)gameObject == (Object)null)) { if (GameManager.Multiplayer()) { PhotonNetwork.Destroy(gameObject); } else { Object.Destroy((Object)(object)gameObject); } } } ((DuckMadness)base.Instance).ducks.Clear(); } public override Modifier Clone() { return new DuckMadness { isClone = true, Instance = this }; } } public class JumpJumpJump : Modifier { private float jumpTimer = 1f; public JumpJumpJump() : base("점핑! 예!", "플레이어가 1초마다 점프합니다.") { minTimer = 20f; maxTimer = 25f; } public override Modifier Clone() { return new JumpJumpJump { isClone = true, Instance = this }; } public override void Update() { base.Update(); if (jumpTimer > 0f) { jumpTimer -= Time.deltaTime; return; } jumpTimer = 1f; List<PlayerAvatar> list = SemiFunc.PlayerGetAll(); foreach (PlayerAvatar item in list) { item.Jump(true); } CameraJump.instance.Jump(); } } public class SayRandomThnings : Modifier { public static string[] tries = new string[34] { "What the fuck did you just fucking say about me, you little bitch?", "You're suck at this game.", "git gud", "goo goo ga ga.", "AAAAAAAAAAAAAAAAAAAAAAAA", "OOOOOOOOOOOOOOOOOO", "I love you.", "I hate you.", "go fuck yourself.", "That monster I fucking hate", "That robot I fucking hate", "I love this game.", "You are an idiot.", "Do you have one digit IQ?", "son of a bitch.", "jaundice", "goo goo ga ga?", "I have nothing to say.", "I ran out of ideas.", "I LOOOVEEEE", "75000 DOLLARS?? OH MY GOSH", "I feel so REPO!", "Tung Tung Tung Tung Tung Tung Tung Tung Tung Sahur", "Brr Brr Patapim", "adorable", "I hate everything.", "The cake is a lie.", "This is Certified hood classic.", "This is the part where he kills you.", "skill issue", "CHICKEN JOCKEY", "skibidi", "I. AM. STEVE.", "THanks for playing my mod!" }; public static string[] familyfriendly = new string[25] { "You're doing great!", "You're good at this game.", "goo goo ga ga.", "AAAAAAAAAAAAAAAAAAAAAAAA", "OOOOOOOOOOOOOOOOOO", "I love you.", "I hate that monster.", "I love this game.", "jaundice", "goo goo ga ga?", "I have nothing to say.", "I ran out of ideas.", "I LOOOVEEEE", "75000 DOLLARS?? OH MY GOSH", "I feel so REPO!", "Tung Tung Tung Tung Tung Tung Tung Tung Tung Sahur", "Brr Brr Patapim", "adorable", "The cake is a lie.", "This is Certified hood classic.", "This is the part where he kills you!", "CHICKEN JOCKEY", "skibidi", "I. AM. STEVE.", "Thanks for playing my mod!" }; public SayRandomThnings() : base("무작위 대사 말하기", "무작위 대사를 말합니다. (멀티플레이어 전용)") { isOnce = true; options.multiplayerOnly = true; } public override void Start() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) base.Start(); ChatManager instance = ChatManager.instance; string text = tries[Random.Range(0, tries.Length)]; if (ChaosMod.Instance.ConfigFamilyFriendly.Value) { string[] array = new string[6] { "fuck", "fucking", "suck", "bitch", "idiot", "kill" }; string[] array2 = array; foreach (string text2 in array2) { if (text.Contains(text2)) { text = text.Replace(text2, "(REDACTED)"); } } } instance.PossessChatScheduleStart(4); instance.PossessChat((PossessChatID)0, text, 1.75f, Color.Lerp(Color.yellow, new Color(0f, 0.5f, 1f), Random.Range(0f, 1f)), 0f, false, 0, (UnityEvent)null); instance.PossessChatScheduleEnd(); } public override Modifier Clone() { return new SayRandomThnings { isClone = true, Instance = this }; } } public class ShakeScreen : Modifier { public ShakeScreen() : base("지진", "강도 5.5의 지진") { minTimer = 15f; maxTimer = 20f; } public override Modifier Clone() { return new ShakeScreen { isClone = true, Instance = this }; } public override void Start() { base.Start(); if (ChaosMod.Instance.ConfigDizzyness.Value) { ChaosMod.Instance.RumbleAS.volume = 1f; ChaosMod.Instance.RumbleAS.Play(); } } public override void Update() { base.Update(); if (ChaosMod.Instance.ConfigDizzyness.Value) { GameDirector.instance.CameraShake.Shake(2f, 0.5f); GameDirector.instance.CameraImpact.Shake(2f, 0.5f); } } public override void OnFinished() { base.OnFinished(); if (ChaosMod.Instance.ConfigDizzyness.Value) { ((MonoBehaviour)ChaosMod.Instance).StartCoroutine(AudioFadeOut()); } } private IEnumerator AudioFadeIn() { AudioSource src = ChaosMod.Instance.RumbleAS; src.volume = 0f; src.Play(); Func<float, float> ease = (float t) => Mathf.Pow(t, 3.322f); float step = 0f; while (step < 1f) { src.volume = ease(step); step += Time.unscaledDeltaTime; yield return (object)new WaitForEndOfFrame(); } src.volume = 1f; } private IEnumerator AudioFadeOut() { AudioSource src = ChaosMod.Instance.RumbleAS; src.volume = 1f; Func<float, float> ease = (float t) => Mathf.Pow(0f - t, 3.322f) + 1f; float step = 0f; while (step < 1f) { src.volume = ease(step); step += Time.unscaledDeltaTime; yield return (object)new WaitForEndOfFrame(); } src.volume = 0f; src.Stop(); } } public class IncreaseValuableWorth : Modifier { public float mult = 1f; public IncreaseValuableWorth(float mult, string name) : base("귀중품 가격 상승", "모든 귀중품의 가격을 올리거나 내립니다.") { isOnce = true; this.mult = mult; base.name = name; } public override Modifier Clone() { return new IncreaseValuableWorth(mult, name) { isClone = true, Instance = this }; } public override void Start() { base.Start(); List<ValuableObject> valuableList = ValuableDirector.instance.valuableList; if (valuableList == null || valuableList.Count == 0) { if (ChaosMod.IsDebug) { Debug.LogWarning((object)"귀중품을 찾지 못했습니다. 가격 상승은 없습니다."); } return; } foreach (ValuableObject item in valuableList) { if ((Object)(object)item == (Object)null) { if (ChaosMod.IsDebug) { ChaosMod.Logger.LogWarning((object)"아이템 하나를 찾지 못하였습니다. 다음 아이템으로 스킵합니다."); } continue; } FieldInfo internalVar = Util.GetInternalVar(item, "dollarValueCurrent"); FieldInfo internalVar2 = Util.GetInternalVar(item, "dollarValueOriginal"); float num = (float)internalVar.GetValue(item); num *= mult; internalVar.SetValue(item, Mathf.RoundToInt(num)); internalVar2.SetValue(item, Mathf.Max(num, (float)internalVar2.GetValue(item))); } foreach (Modifier @event in Modifiers.Events) { if (@event is IncreaseValuableWorth) { Modifiers.Excludes.Add(@event); } } } } public class SpinEternally : Modifier { private List<EnemyRigidbody> rbList; public SpinEternally() : base("회전회오리이이이", "몬스터 베이블레이드") { minTimer = 20f; maxTimer = 40f; } public override Modifier Clone() { return new SpinEternally { isClone = true, Instance = this }; } public override void Start() { base.Start(); rbList = Object.FindObjectsByType<EnemyRigidbody>((FindObjectsSortMode)0).ToList(); foreach (EnemyRigidbody rb in rbList) { if (!((Object)(object)rb == (Object)null)) { ((Component)rb.enemy).GetComponent<EnemyStateStunned>().Set(timerSelf + 5f); } } } public override void Update() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) base.Update(); foreach (EnemyRigidbody rb in rbList) { if (!((Object)(object)rb == (Object)null)) { Rigidbody component = ((Component)rb).GetComponent<Rigidbody>(); Vector3 angularVelocity = component.angularVelocity; if (((Vector3)(ref angularVelocity)).magnitude <= 1500f) { component.AddTorque(((Component)rb).transform.forward * 500f, (ForceMode)1); } } } } } public class FriendlyMonsters : Modifier { public FriendlyMonsters() : base("친화적인 몬스터", "몬스터가 공격하지 않습니다.") { minTimer = 60f; maxTimer = 120f; } public override Modifier Clone() { FriendlyMonsters friendlyMonsters = new FriendlyMonsters(); friendlyMonsters.isClone = true; friendlyMonsters.Instance = this; friendlyMonsters.options.chance = options.chance; return friendlyMonsters; } public override void Start() { base.Start(); if (!Modifiers.Excludes.Contains(base.Instance)) { Modifiers.Excludes.Add(base.Instance); } Util.GetInternalVar(EnemyDirector.instance, "debugNoVision").SetValue(EnemyDirector.instance, true); } public override void OnFinished() { base.OnFinished(); if (Modifiers.Excludes.Contains(base.Instance)) { Modifiers.Excludes.Remove(base.Instance); } Util.GetInternalVar(EnemyDirector.instance, "debugNoVision").SetValue(EnemyDirector.instance, false); } } public class NoJumpAndSprint : Modifier { public NoJumpAndSprint() : base("점프 & 달리기 없음", "말 그대로.") { minTimer = 20f; maxTimer = 40f; } public override void Update() { base.Update(); PlayerController.instance.EnergyCurrent = 0f; PlayerController.instance.OverrideJumpCooldown(timerSelf); } public override void OnFinished() { base.OnFinished(); PlayerController.instance.EnergyCurrent = PlayerController.instance.EnergyStart; PlayerController.instance.OverrideJumpCooldown(0f); } public override Modifier Clone() { return new NoJumpAndSprint { isClone = true, Instance = this }; } } public class VoicePitch : Modifier { public float pitch; public float timeShit; public VoicePitch(float pitch, string name) : base("목소리 음조절", "목소리의 음을 조절합니다.") { minTimer = 30f; maxTimer = 60f; base.name = name; options.multiplayerOnly = true; this.pitch = pitch; } public override Modifier Clone() { return new VoicePitch(pitch, name) { isClone = true, Instance = this }; } public override void Update() { base.Update(); if (timeShit > 0f) { timeShit -= Time.unscaledDeltaTime; return; } timeShit = 0.5f; foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { PlayerVoiceChat internalVar = Util.GetInternalVar<PlayerVoiceChat>(item, "voiceChat"); internalVar.OverridePitch(pitch, 1f, 1f, 0.5f, 0f, 0f); } } } public class InvincibleOrb : Modifier { public InvincibleOrb() : base("티타늄 오브", "오브가 절대로 깨지지 않습니다.") { minTimer = 40f; maxTimer = 70f; } public override void Update() { base.Update(); EnemyValuable[] array = Object.FindObjectsByType<EnemyValuable>((FindObjectsSortMode)0); foreach (EnemyValuable val in array) { ((Component)val).GetComponent<PhysGrabObjectImpactDetector>().destroyDisable = true; } } public override Modifier Clone() { return new InvincibleOrb { isClone = true, Instance = this }; } } public class EyeBig : Modifier { public EyeBig() : base("동공 확장", "눈이 커집니다.") { minTimer = 30f; maxTimer = 42.5f; options.multiplayerOnly = true; } public override void Update() { base.Update(); if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { item.OverridePupilSize(2f, 10, 1f, 1f, 5f, 0.5f, 0.1f); } } public override Modifier Clone() { return new EyeBig { isClone = true, Instance = this }; } } public class ReviveAllPlayers : Modifier { public ReviveAllPlayers() : base("죽은 플레이어 소생", "모든 죽은 플레이어를 살립니다.") { isOnce = true; } public override void Start() { base.Start(); if (!SemiFunc.IsMasterClientOrSingleplayer()) { return; } foreach (PlayerAvatar item in SemiFunc.PlayerGetAll()) { if (Util.GetInternalVar<bool>(item, "deadSet")) { item.Revive(false); item.playerHealth.Heal(1, true); } } } public override Modifier Clone() { return new ReviveAllPlayers { isClone = true, Instance = this }; } } public class SpawnValuables : Modifier { public SpawnValuables() : base("귀중품 소환", "무작위 귀중품을 아무 곳에 소환합니다.") { isOnce = true; options.oncePerLevel = true; } public override void Start() { base.Start(); } public override Modifier Clone() { return new SpawnValuables { isClone = true, Instance = this }; } } public class DisableLighting : Modifier { public AmbientMode ogAmbientMode; public Color ogAmbientLight; public DisableLighting() : base("전역 조명 비활성화", "게임 내 전체 조명 효과를 비활성화 합니다.") { minTimer = 20f; maxTimer = 40f; } public override void Start() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) base.Start(); DisableLighting disableLighting = (DisableLighting)base.Instance; disableLighting.ogAmbientMode = RenderSettings.ambientMode; disableLighting.ogAmbientLight = RenderSettings.ambientLight; base.Instance.options.chance = 0f; } public override void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) base.Update(); RenderSettings.ambientMode = (AmbientMode)3; RenderSettings.ambientLight = Color.white; RenderSettings.fog = false; } public override void OnFinished() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) base.OnFinished(); DisableLighting disableLighting = (DisableLighting)base.Instance; RenderSettings.ambientMode = disableLighting.ogAmbientMode; RenderSettings.ambientLight = disableLighting.ogAmbientLight; RenderSettings.fog = true; base.Instance.options.chance = 1f; } public override Modifier Clone() { return new DisableLighting(); } } public class CarCrash : Modifier { public static AssetBundle car_assets; public CarCrash(bool isClone) : base("올해의 운전사", "반어법입니다.") { base.isClone = isClone; options.singleplayerOnly = true; minTimer = 120f; maxTimer = 180f; if ((Object)(object)car_assets == (Object)null) { car_assets = AssetBundle.LoadFromFile(Util.GetPluginDirectory("car_assets")); ChaosMod.Instance.PrefabToAddNetwork.Add(car_assets.LoadAsset<GameObject>("Killer Joe")); } } public override void Start() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) base.Start(); ((Component)ChaosMod.Instance.car).transform.position = Vector3.zero; ((Component)ChaosMod.Instance.car).transform.rotation = Quaternion.identity; ChaosMod.Instance.car.Spawn(); Modifiers.Excludes.Add(base.Instance); } public override void OnFinished() { base.OnFinished(); ChaosMod.Instance.car.Despawn(); Modifiers.Excludes.Remove(base.Instance); } public override Modifier Clone() { return new CarCrash(isClone: true) { isClone = true, Instance = this }; } } public class NoGravity : Modifier { public NoGravity() : base("달 중력", "...") { minTimer = 60f; maxTimer = 120f; } public override void Update() { base.Update(); PlayerController.instance.AntiGravity(0.1f); } public override Modifier Clone() { return new NoGravity { isClone = true, Instance = this }; } } public class ShowAD : Modifier { public ShowAD() : base("광고 시청", "개발자도 먹고 살아야죠...") { } public override float GetTime() { return ChaosMod.Instance.adViewer.GetLength(); } public override void Start() { ChaosMod.Instance.adViewer.SetVideo(); ChaosMod.Instance.adViewer.Show(); base.Start(); } public override void OnFinished() { base.OnFinished(); ChaosMod.Instance.adViewer.Hide(); } public override Modifier Clone() { return new ShowAD { isClone = true, Instance = this }; } } internal class EventTimerBar : TextMeshProUGUI { private float timeLeft; private float ogTimeLeft; public Color noTimeColor = Color.red; public Color enoughTimeColor = Color.green; public Vector2 targetPosition = Vector2.zero; public void SetTime(float time) { timeLeft = time; ogTimeLeft = time; } private void Update() { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) if (timeLeft > 0f) { timeLeft -= Time.unscaledDeltaTime; } int num = Mathf.FloorToInt(timeLeft % 60f); int num2 = Mathf.FloorToInt(timeLeft / 60f % 60f); int num3 = num / 3600; string text = ""; text = ((num3 <= 0) ? (text + $"{num2:D2}:{num:D2}") : (text + $"{num3}:{num2:D2}:{num:D2}")); ((TMP_Text)this).text = "(" + text + ")"; ((Graphic)this).color = Color.Lerp(noTimeColor, enoughTimeColor, timeLeft / ogTimeLeft); ((TMP_Text)this).rectTransform.anchoredPosition = Vector2.Lerp(((TMP_Text)this).rectTransform.anchoredPosition, targetPosition, 1f - Mathf.Exp((0f - Time.unscaledDeltaTime) * MathF.PI)); } } public class Language { public static Dictionary<string, string> KoreanToEnglish = new Dictionary<string, string>(); public static void Init() { Dictionary<string, string> dictionary = new Dictionary<string, string> { { "무효", "Nothing" }, { "넘어지기", "Tumble" }, { "모든 몬스터 죽이기", "Kill all monsters" }, { "넓은 시야각", "Wide FOV" }, { "게임 속도 x2", "Game Speed x2" }, { "모든 미닫이문 부수기", "Break All Hinges" }, { "환청", "Auditory Hallucination" }, { "체력 숨기기", "Hide Health" }, { "기력 숨기기", "Hide Energy" }, { "모든 서랍 문을 지도에 표시", "Mark All Drawers on Map" }, { "축지법 쓰는 오리", "Crazy Duck" }, { "무작위 대사 말하기", "Speak random thing" }, { "지진", "Earthquake" }, { "귀중품 가격 두배", "Double Valuables Price" }, { "귀중품 가격 -10%", "Valuables -10% Price" }, { "회전회오리이이이", "SPINNNNN!!!" }, { "친화적인 몬스터", "Friendly monsters" }, { "높은음 목소리", "High-pitched Voice" }, { "낮은음 목소리", "Low-pitched Voice" }, { "화면 효과 비활성화", "Disable Screen Effects" }, { "티타늄 오브", "Titanium Orb" }, { "죽은 플레이어 소생", "Revive all players" }, { "점프 & 달리기 없음", "No Sprint & Jump" }, { "가족 친화적", "Family Friendly" }, { "기본", "General" }, { "레벨 이벤트", "Level Events" }, { "어지러움", "Dizziness" }, { "한국어", "Korean" }, { "게이지 빨간색 차지 비중", "Gauge Color Red" }, { "게이지 초록색 차지 비중", "Gauge Color Green" }, { "게이지 파란색 차지 비중", "Gauge Color Blue" }, { "동공 확장", "Pupil Dilation" }, { "올해의 운전사", "Driver of the year" }, { "전체 조명 비활성화", "Disable All Lighting" }, { "몬스터 2마리 소환", "Spawn 2 monsters" }, { "몬스터 4마리 소환", "Spawn 4 monsters" }, { "달 중력", "Moon Gravity" } }; KoreanToEnglish.Clear(); foreach (KeyValuePair<string, string> item in dictionary) { KoreanToEnglish.Add(item.Key, item.Value); } } public static string GetText(string key) { bool flag = false; if (ChaosMod.Instance.ConfigKorean != null) { flag = ChaosMod.Instance.ConfigKorean.Value; } if (!KoreanToEnglish.ContainsKey(key) || flag) { return key; } return KoreanToEnglish[key]; } } public class Modifiers { public static readonly List<Modifier> Events = new List<Modifier>(); public static readonly List<Modifier> ShopEvents = new List<Modifier>(); public static readonly List<Modifier> Excludes = new List<Modifier>(); public static void