using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using LethalTerminalExtender.Patches;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AmbieMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A mod created by Fins and Bearky for Amber's Birthday")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AmbieMod")]
[assembly: AssemblyTitle("AmbieMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.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.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace AmbieMod
{
internal class AmbieCommands
{
public void addNormalShotCommand()
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
val.clearPreviousText = true;
val.terminalEvent = "easyshot";
val.displayText = "";
TerminalKeyword val2 = ScriptableObject.CreateInstance<TerminalKeyword>();
val2.word = "easyshot";
val2.specialKeywordResult = val;
Action<Terminal, TerminalNode> callback = delegate
{
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: 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)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
Random random = new Random();
Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position;
TerminalExtenderUtils.writeToTerminal("Everyone takes a shot! Enjoy your scrap!\n\n", false);
GameObject val4 = Object.Instantiate<GameObject>(StartOfRound.Instance.allItemsList.itemsList[random.Next(17, 67)].spawnPrefab, position, Quaternion.identity);
val4.GetComponent<GrabbableObject>().fallTime = 0f;
val4.AddComponent<ScanNodeProperties>().scrapValue = 100;
val4.GetComponent<GrabbableObject>().SetScrapValue(100);
val4.GetComponent<NetworkObject>().Spawn(false);
};
TerminalCustomCommand val3 = default(TerminalCustomCommand);
val3.keyword = val2;
val3.node = val;
val3.callback = callback;
TerminalExtenderUtils.addCustomCommand(val3);
}
public void addHardShotCommand()
{
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
val.clearPreviousText = true;
val.terminalEvent = "hardshot";
val.displayText = "";
TerminalKeyword val2 = ScriptableObject.CreateInstance<TerminalKeyword>();
val2.word = "hardshot";
val2.specialKeywordResult = val;
Action<Terminal, TerminalNode> callback = delegate
{
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: 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)
Random random = new Random();
Random random2 = new Random();
int scrapValue = random2.Next(50, 200);
Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position;
TerminalExtenderUtils.writeToTerminal("Everyone takes TWO shots! Hope the gambling was worth it...\n\n", false);
GameObject val4 = Object.Instantiate<GameObject>(StartOfRound.Instance.allItemsList.itemsList[random.Next(17, 67)].spawnPrefab, position, Quaternion.identity);
val4.GetComponent<GrabbableObject>().fallTime = 0f;
val4.AddComponent<ScanNodeProperties>().scrapValue = scrapValue;
val4.GetComponent<GrabbableObject>().SetScrapValue(scrapValue);
val4.GetComponent<NetworkObject>().Spawn(false);
};
TerminalCustomCommand val3 = default(TerminalCustomCommand);
val3.keyword = val2;
val3.node = val;
val3.callback = callback;
TerminalExtenderUtils.addCustomCommand(val3);
}
public void addSavageShotCommand()
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
Random random = new Random();
Random randomValue = new Random();
Random dice = new Random();
TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
val.clearPreviousText = true;
val.terminalEvent = "savageshot";
val.displayText = "";
TerminalKeyword val2 = ScriptableObject.CreateInstance<TerminalKeyword>();
val2.word = "savageshot";
val2.specialKeywordResult = val;
Action<Terminal, TerminalNode> callback = delegate
{
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: 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)
int num = randomValue.Next(50, 200);
int num2 = dice.Next(1, 6);
TerminalExtenderUtils.writeToTerminal("SPIN THE WHEEL!!! EVERYONE TAKES " + num2 + " SHOTS!!!\n\n", false);
int scrapValue = num * num2;
Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position;
GameObject val4 = Object.Instantiate<GameObject>(StartOfRound.Instance.allItemsList.itemsList[random.Next(17, 67)].spawnPrefab, position, Quaternion.identity);
val4.GetComponent<GrabbableObject>().fallTime = 0f;
val4.AddComponent<ScanNodeProperties>().scrapValue = scrapValue;
val4.GetComponent<GrabbableObject>().SetScrapValue(scrapValue);
val4.GetComponent<NetworkObject>().Spawn(false);
};
TerminalCustomCommand val3 = default(TerminalCustomCommand);
val3.keyword = val2;
val3.node = val;
val3.callback = callback;
TerminalExtenderUtils.addCustomCommand(val3);
}
}
[BepInPlugin("AmbieMod", "AmbieMod", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin AmbieMod is loaded!");
AmbieCommands ambieCommands = new AmbieCommands();
ambieCommands.addNormalShotCommand();
ambieCommands.addHardShotCommand();
ambieCommands.addSavageShotCommand();
TerminalExtenderUtils.addQuickCommand("birthday", "HAPPY BIRTHDAY BAB FROM FINS AND BEARKY WE LOVE YOU VERY MUCHHHHHHHHHHHHHHHHHHH\n\n", true, (Action<Terminal, TerminalNode>)delegate
{
});
TerminalExtenderUtils.addQuickCommand("22", "Fins has a colossal massive penis like it's unreal hey ladies hit him up PLEASE I'M BEGGING YOU I'M ON MY KNEES I'LL DO ANYTHING at twitch.tv/Fins_Plays or twitter.com/Fins_Plays thank you! :)\n\n", true, (Action<Terminal, TerminalNode>)delegate
{
});
}
}
public static class PluginInfo
{
public const string PLUGIN_GUID = "AmbieMod";
public const string PLUGIN_NAME = "AmbieMod";
public const string PLUGIN_VERSION = "1.0.0";
}
}