Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of GambaMod v1.1.0
froyo4u.GambaMod.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; 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.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.InputSystem; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("froyo4u.GambaMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.0.0")] [assembly: AssemblyInformationalVersion("1.1.0")] [assembly: AssemblyProduct("GambaMod")] [assembly: AssemblyTitle("froyo4u.GambaMod")] [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 GambaMod { [BepInPlugin("froyo4u.GambaMod", "GambaMod", "1.1.0")] public class GambaMod : BaseUnityPlugin { private static Harmony? Harmony { get; set; } public static GambaMod Instance { get; private set; } private static ManualLogSource mls { get; set; } private void Awake() { mls = ((BaseUnityPlugin)this).Logger; Instance = this; Patch(); mls.LogInfo((object)"Gamba mod up and awake"); } private static void Patch() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("froyo4u.GambaMod"); } mls.LogDebug((object)"Patching..."); Harmony.PatchAll(); mls.LogDebug((object)"Finished patching!"); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "froyo4u.GambaMod"; public const string PLUGIN_NAME = "GambaMod"; public const string PLUGIN_VERSION = "1.1.0"; } } namespace GambaMod.Patches { [HarmonyPatch(typeof(Terminal))] internal class TerminalPatch { private static char[,] symbols = new char[2, 3] { { 'O', 'X', '#' }, { '*', '?', '@' } }; private static Random random = new Random(); private static char[,] globalSlots = GetSlots(); private static TerminalNode spinNode = ScriptableObject.CreateInstance<TerminalNode>(); private static TerminalNode savedNode = ScriptableObject.CreateInstance<TerminalNode>(); private static int betAmount; private static bool homeModified; private static bool leaving; private static readonly Dictionary<char, int> SymbolMultipliers = new Dictionary<char, int> { { 'O', 2 }, { 'X', 3 }, { '#', 4 }, { '*', 8 }, { '?', 10 }, { '@', 20 } }; private static char[,] GetSlots() { char[,] array = new char[5, 5]; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { array[i, j] = GetRandomSymbol(); } } return array; } private static char[,] SpinSlots(char[,] slots) { for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { slots[i, j] = GetRandomSymbol(); } } return slots; } private static char GetRandomSymbol() { int num = random.Next(1, 101); int num2 = 40; int num3 = 25; int num4 = 20; int num5 = 5; int num6 = 3; if (num <= num2) { return symbols[0, 0]; } if (num <= num2 + num3) { return symbols[0, 1]; } if (num <= num2 + num3 + num4) { return symbols[0, 2]; } if (num <= num2 + num3 + num4 + num5) { return symbols[1, 0]; } if (num <= num2 + num3 + num4 + num5 + num6) { return symbols[1, 1]; } return symbols[1, 2]; } private static int CalculateWinnings(char[,] slots, int gambleAmount) { int num = 0; for (int i = 0; i < 5; i++) { if (CheckLine(slots[i, 0], slots[i, 1], slots[i, 2], slots[i, 3], slots[i, 4])) { num += CalculateLineWinnings(slots[i, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[0, i], slots[1, i], slots[2, i], slots[3, i], slots[4, i])) { num += CalculateLineWinnings(slots[0, i], SymbolMultipliers, gambleAmount); } } bool flag = CheckLine(slots[0, 0], slots[1, 1], slots[2, 2], slots[3, 3], slots[4, 4]); bool flag2 = CheckLine(slots[0, 4], slots[1, 3], slots[2, 2], slots[3, 1], slots[4, 0]); if (flag) { num += CalculateLineWinnings(slots[0, 0], SymbolMultipliers, gambleAmount); } if (flag2) { num += CalculateLineWinnings(slots[0, 4], SymbolMultipliers, gambleAmount); } if (flag && flag2) { num += CalculateLineWinnings(slots[0, 4], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[0, 0], slots[1, 1], slots[2, 2], slots[1, 3], slots[0, 4])) { num += CalculateLineWinnings(slots[0, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[0, 0], slots[1, 1], slots[1, 2], slots[1, 3], slots[0, 4])) { num += CalculateLineWinnings(slots[0, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[4, 0], slots[3, 1], slots[2, 2], slots[3, 3], slots[4, 4])) { num += CalculateLineWinnings(slots[4, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[4, 0], slots[3, 1], slots[3, 2], slots[3, 3], slots[4, 4])) { num += CalculateLineWinnings(slots[4, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[2, 0], slots[1, 1], slots[0, 2], slots[1, 3], slots[2, 4])) { num += CalculateLineWinnings(slots[2, 0], SymbolMultipliers, gambleAmount); } if (CheckLine(slots[2, 0], slots[3, 1], slots[4, 2], slots[3, 3], slots[2, 4])) { num += CalculateLineWinnings(slots[2, 0], SymbolMultipliers, gambleAmount); } return num; } private static bool CheckLine(params char[] localSymbols) { char[] localSymbols2 = localSymbols; return localSymbols2.All((char symbol) => symbol == localSymbols2[0]); } private static int CalculateLineWinnings(char symbol, Dictionary<char, int> symbolMultipliers, int localBetAmount) { int valueOrDefault = symbolMultipliers.GetValueOrDefault(symbol, 1); return localBetAmount * valueOrDefault; } private static string updateScreen(char[,] slots, int localBetAmount) { return "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + slots[0, 0] + " | " + slots[0, 1] + " | " + slots[0, 2] + " | " + slots[0, 3] + " | " + slots[0, 4] + " \n | | | | \n " + slots[1, 0] + " | " + slots[1, 1] + " | " + slots[1, 2] + " | " + slots[1, 3] + " | " + slots[1, 4] + " \n | | | | \n " + slots[2, 0] + " | " + slots[2, 1] + " | " + slots[2, 2] + " | " + slots[2, 3] + " | " + slots[2, 4] + " \n | | | | \n " + slots[3, 0] + " | " + slots[3, 1] + " | " + slots[3, 2] + " | " + slots[3, 3] + " | " + slots[3, 4] + " \n | | | | \n " + slots[4, 0] + " | " + slots[4, 1] + " | " + slots[4, 2] + " | " + slots[4, 3] + " | " + slots[4, 4] + " \n\n\n---------------------------------------------------\n" + $"Spinning with {localBetAmount} credits... no luck!\n"; } private static string emptyScreen(char[,] slots) { return "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + slots[0, 0] + " | " + slots[0, 1] + " | " + slots[0, 2] + " | " + slots[0, 3] + " | " + slots[0, 4] + " \n | | | | \n " + slots[1, 0] + " | " + slots[1, 1] + " | " + slots[1, 2] + " | " + slots[1, 3] + " | " + slots[1, 4] + " \n | | | | \n " + slots[2, 0] + " | " + slots[2, 1] + " | " + slots[2, 2] + " | " + slots[2, 3] + " | " + slots[2, 4] + " \n | | | | \n " + slots[3, 0] + " | " + slots[3, 1] + " | " + slots[3, 2] + " | " + slots[3, 3] + " | " + slots[3, 4] + " \n | | | | \n " + slots[4, 0] + " | " + slots[4, 1] + " | " + slots[4, 2] + " | " + slots[4, 3] + " | " + slots[4, 4] + " \n\n\n---------------------------------------------------\nOut of credits!\n"; } private static string updateSlotScreen(char[,] slots) { return "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + slots[0, 0] + " | " + slots[0, 1] + " | " + slots[0, 2] + " | " + slots[0, 3] + " | " + slots[0, 4] + " \n | | | | \n " + slots[1, 0] + " | " + slots[1, 1] + " | " + slots[1, 2] + " | " + slots[1, 3] + " | " + slots[1, 4] + " \n | | | | \n " + slots[2, 0] + " | " + slots[2, 1] + " | " + slots[2, 2] + " | " + slots[2, 3] + " | " + slots[2, 4] + " \n | | | | \n " + slots[3, 0] + " | " + slots[3, 1] + " | " + slots[3, 2] + " | " + slots[3, 3] + " | " + slots[3, 4] + " \n | | | | \n " + slots[4, 0] + " | " + slots[4, 1] + " | " + slots[4, 2] + " | " + slots[4, 3] + " | " + slots[4, 4] + " \n\n\n---------------------------------------------------\nPlease enter how much you would like to gamble\n(bet [amount]): "; } private static string winScreen(char[,] slots, int winnings) { return "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + slots[0, 0] + " | " + slots[0, 1] + " | " + slots[0, 2] + " | " + slots[0, 3] + " | " + slots[0, 4] + " \n | | | | \n " + slots[1, 0] + " | " + slots[1, 1] + " | " + slots[1, 2] + " | " + slots[1, 3] + " | " + slots[1, 4] + " \n | | | | \n " + slots[2, 0] + " | " + slots[2, 1] + " | " + slots[2, 2] + " | " + slots[2, 3] + " | " + slots[2, 4] + " \n | | | | \n " + slots[3, 0] + " | " + slots[3, 1] + " | " + slots[3, 2] + " | " + slots[3, 3] + " | " + slots[3, 4] + " \n | | | | \n " + slots[4, 0] + " | " + slots[4, 1] + " | " + slots[4, 2] + " | " + slots[4, 3] + " | " + slots[4, 4] + " \n\n\n---------------------------------------------------\n" + $"Won {winnings} credits!\n"; } private static bool TryParseBetAmount(string input, out int localBetAmount) { string[] array = input.Split(new char[1] { ' ' }); if (array.Length == 2 && int.TryParse(array[1], out localBetAmount)) { return true; } localBetAmount = 0; return false; } [HarmonyPatch("ParsePlayerSentence")] [HarmonyPrefix] private static void stringCheck(ref Terminal __instance) { string text = __instance.screenText.text; int textAdded = __instance.textAdded; int length = text.Length; int num = length - textAdded; string text2 = text.Substring(num, length - num); if (text2.StartsWith("bet")) { if (TryParseBetAmount(text2, out betAmount)) { savedNode = __instance.terminalNodes.specialNodes[11]; __instance.terminalNodes.specialNodes[11] = spinNode; } else { __instance.terminalNodes.specialNodes[11] = savedNode; } } } [HarmonyPatch("PressESC")] [HarmonyPrefix] private static void CheckEsc(ref CallbackContext context) { if (((CallbackContext)(ref context)).action.name == "OpenMenu") { leaving = true; } } [HarmonyPatch("BeginUsingTerminal")] [HarmonyPrefix] private static void resetEsc() { leaving = false; } [HarmonyPatch("OnSubmit")] [HarmonyPrefix] private static void resubmitBet(ref Terminal __instance) { if (__instance.textAdded == 0 && __instance.currentNode.terminalEvent == "spinGamba" && !leaving) { __instance.LoadNewNode(__instance.currentNode); } } [HarmonyPatch("LoadNewNode")] [HarmonyPrefix] private static void spinGamba(ref TerminalNode node, ref Terminal __instance) { string terminalEvent = node.terminalEvent; if (!(terminalEvent == "spinGamba")) { if (terminalEvent == "gamba") { node.displayText = updateSlotScreen(SpinSlots(globalSlots)); } return; } __instance.terminalNodes.specialNodes[11] = savedNode; if (__instance.groupCredits - betAmount >= 0 && betAmount > 0) { Terminal val = __instance; val.groupCredits -= betAmount; node.displayText = updateScreen(SpinSlots(globalSlots), betAmount); int num = CalculateWinnings(globalSlots, betAmount); if (num > 0) { node.displayText = winScreen(globalSlots, num); __instance.PlayTerminalAudioServerRpc(0); __instance.PlayTerminalAudioServerRpc(3); } else { __instance.PlayTerminalAudioServerRpc(1); } Terminal val2 = __instance; val2.groupCredits += num; __instance.SyncGroupCreditsServerRpc(__instance.groupCredits, __instance.numberOfItemsInDropship); } else { node.displayText = emptyScreen(SpinSlots(globalSlots)); } } [HarmonyPatch("Start")] [HarmonyPostfix] private static void addGamba(ref Terminal __instance) { TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>(); val.displayText = "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + globalSlots[0, 0] + " | " + globalSlots[0, 1] + " | " + globalSlots[0, 2] + " | " + globalSlots[0, 3] + " | " + globalSlots[0, 4] + " \n | | | | \n " + globalSlots[1, 0] + " | " + globalSlots[1, 1] + " | " + globalSlots[1, 2] + " | " + globalSlots[1, 3] + " | " + globalSlots[1, 4] + " \n | | | | \n " + globalSlots[2, 0] + " | " + globalSlots[2, 1] + " | " + globalSlots[2, 2] + " | " + globalSlots[2, 3] + " | " + globalSlots[2, 4] + " \n | | | | \n " + globalSlots[3, 0] + " | " + globalSlots[3, 1] + " | " + globalSlots[3, 2] + " | " + globalSlots[3, 3] + " | " + globalSlots[3, 4] + " \n | | | | \n " + globalSlots[4, 0] + " | " + globalSlots[4, 1] + " | " + globalSlots[4, 2] + " | " + globalSlots[4, 3] + " | " + globalSlots[4, 4] + " \n\n\n---------------------------------------------------\nPlease enter how much you would like to gamble\n(bet [amount]): "; val.clearPreviousText = true; val.terminalEvent = "gamba"; TerminalKeyword val2 = ScriptableObject.CreateInstance<TerminalKeyword>(); val2.word = "slots"; val2.isVerb = false; val2.specialKeywordResult = val; globalSlots = SpinSlots(globalSlots); spinNode.displayText = "Welcome to the Company slot machine\n---------------------------------------------------\n\n\n " + globalSlots[0, 0] + " | " + globalSlots[0, 1] + " | " + globalSlots[0, 2] + " | " + globalSlots[0, 3] + " | " + globalSlots[0, 4] + " \n | | | | \n " + globalSlots[1, 0] + " | " + globalSlots[1, 1] + " | " + globalSlots[1, 2] + " | " + globalSlots[1, 3] + " | " + globalSlots[1, 4] + " \n | | | | \n " + globalSlots[2, 0] + " | " + globalSlots[2, 1] + " | " + globalSlots[2, 2] + " | " + globalSlots[2, 3] + " | " + globalSlots[2, 4] + " \n | | | | \n " + globalSlots[3, 0] + " | " + globalSlots[3, 1] + " | " + globalSlots[3, 2] + " | " + globalSlots[3, 3] + " | " + globalSlots[3, 4] + " \n | | | | \n " + globalSlots[4, 0] + " | " + globalSlots[4, 1] + " | " + globalSlots[4, 2] + " | " + globalSlots[4, 3] + " | " + globalSlots[4, 4] + " \n\n\n---------------------------------------------------\nSpinning....\n"; spinNode.clearPreviousText = true; spinNode.terminalEvent = "spinGamba"; TerminalKeyword val3 = ScriptableObject.CreateInstance<TerminalKeyword>(); val3.word = "bet"; val3.isVerb = false; val3.specialKeywordResult = spinNode; __instance.terminalNodes.allKeywords = CollectionExtensions.AddToArray<TerminalKeyword>(__instance.terminalNodes.allKeywords, val2); __instance.terminalNodes.allKeywords = CollectionExtensions.AddToArray<TerminalKeyword>(__instance.terminalNodes.allKeywords, val3); if (!homeModified) { string displayText = __instance.terminalNodes.specialNodes[1].displayText; TerminalNode obj = __instance.terminalNodes.specialNodes[1]; string text = displayText; obj.displayText = text.Substring(0, text.Length - 2) + "[Gamba Mod]\nType \"slots\" to begin your gambling career!\n"; homeModified = true; } TerminalKeyword[] allKeywords = __instance.terminalNodes.allKeywords; TerminalKeyword[] array = allKeywords; foreach (TerminalKeyword val4 in array) { Console.WriteLine(val4.specialKeywordResult.displayText); if (val4.word.Equals("other")) { int num = val4.specialKeywordResult.displayText.IndexOf("t.", StringComparison.Ordinal); string displayText2 = val4.specialKeywordResult.displayText; val4.specialKeywordResult.displayText = displayText2.Substring(0, num + 2) + "\n\n>SLOTS\nGamble company credits in the slot machine.\n"; } } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }