using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EasterIsland;
using EasterIsland.NetcodePatcher;
using HarmonyLib;
using LethalConfig.ConfigItems;
using LethalConfig.ConfigItems.Options;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
[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("bcs4313")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adds a new moon, items, and enemies.")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+3b3e1e922d7c22c546a6d96b9ca63cd526c30cf9")]
[assembly: AssemblyProduct("LegendOfTheMoai")]
[assembly: AssemblyTitle("EasterIsland")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
static <Module>()
{
}
}
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;
}
}
}
public class MeteorScript : MonoBehaviour
{
private AudioSource src;
public ParticleSystem part;
public List<ParticleCollisionEvent> collisionEvents;
private void Start()
{
src = ((Component)this).GetComponent<AudioSource>();
part = ((Component)this).GetComponent<ParticleSystem>();
collisionEvents = new List<ParticleCollisionEvent>();
}
private void Update()
{
}
private void OnParticleCollision(GameObject other)
{
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: 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)
int num = ParticlePhysicsExtensions.GetCollisionEvents(part, other, collisionEvents);
for (int i = 0; i < num; i++)
{
ParticleCollisionEvent val = collisionEvents[i];
Vector3 intersection = ((ParticleCollisionEvent)(ref val)).intersection;
spawnExplosionClientRpc(intersection);
}
}
[ClientRpc]
private async void spawnExplosionClientRpc(Vector3 position)
{
//IL_0019: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
Landmine.SpawnExplosion(position + Vector3.up, true, 18f, 22f, 50, 0f, (GameObject)null);
GameObject gSource = new GameObject();
gSource.transform.position = position;
AudioSource source = gSource.AddComponent<AudioSource>();
source.clip = src.clip;
source.priority = src.priority;
source.bypassReverbZones = src.bypassReverbZones;
source.bypassEffects = src.bypassEffects;
source.loop = src.loop;
source.playOnAwake = src.playOnAwake;
source.spatialBlend = src.spatialBlend;
source.volume = src.volume;
source.minDistance = src.minDistance;
source.maxDistance = src.maxDistance;
source.rolloffMode = src.rolloffMode;
source.outputAudioMixerGroup = src.outputAudioMixerGroup;
source.Play();
await Task.Delay(8000);
Object.Destroy((Object)(object)gSource);
}
}
public class GoldMoaiSpawn : EnemyAI
{
private bool awaitSpawn = true;
[Space(5f)]
public GameObject hivePrefab;
public NoisemakerProp hive;
public override void Start()
{
((EnemyAI)this).Start();
if (((NetworkBehaviour)this).IsServer)
{
SpawnHiveNearEnemy();
}
}
private async void SpawnHiveNearEnemy()
{
if (!((NetworkBehaviour)this).IsServer)
{
return;
}
while (awaitSpawn)
{
GameObject[] nodes = RoundManager.Instance.outsideAINodes;
if (nodes == null || nodes.Length == 0)
{
Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - 1...");
await Task.Delay(1000);
continue;
}
Vector3 originPos = nodes[new Random().Next(0, nodes.Length)].transform.position;
Vector3 randomNavMeshPositionInBoxPredictable = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(originPos, 3f, RoundManager.Instance.navHit, new Random(), -5);
if (randomNavMeshPositionInBoxPredictable == originPos)
{
Debug.Log((object)"Moai Enemy: Awaiting to spawn gold moai - 2...");
await Task.Delay(1000);
continue;
}
Debug.Log((object)$"Moai Enemy: Set gold moai random position: {randomNavMeshPositionInBoxPredictable}");
awaitSpawn = false;
GameObject gameObject = Object.Instantiate<GameObject>(hivePrefab, randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer);
gameObject.SetActive(true);
gameObject.GetComponent<NetworkObject>().Spawn(false);
((GrabbableObject)gameObject.GetComponent<NoisemakerProp>()).targetFloorPosition = randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f;
SpawnHiveClientRpc(NetworkObjectReference.op_Implicit(gameObject.GetComponent<NetworkObject>()), randomNavMeshPositionInBoxPredictable + Vector3.up * 0.5f);
}
}
[ClientRpc]
public void SpawnHiveClientRpc(NetworkObjectReference hiveObject, Vector3 hivePosition)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Invalid comparison between Unknown and I4
//IL_005f: 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_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_010d: 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)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1194196039u, val, (RpcDelivery)0);
((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref hiveObject, default(ForNetworkSerializable));
((FastBufferWriter)(ref val2)).WriteValueSafe(ref hivePosition);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1194196039u, val, (RpcDelivery)0);
}
if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
{
return;
}
NetworkObject val3 = default(NetworkObject);
if (((NetworkObjectReference)(ref hiveObject)).TryGet(ref val3, (NetworkManager)null))
{
hive = ((Component)val3).gameObject.GetComponent<NoisemakerProp>();
((GrabbableObject)hive).targetFloorPosition = hivePosition;
int num = new Random().Next(50, 501);
((GrabbableObject)hive).scrapValue = num;
ScanNodeProperties componentInChildren = ((Component)hive).GetComponentInChildren<ScanNodeProperties>();
if ((Object)(object)componentInChildren != (Object)null)
{
componentInChildren.scrapValue = num;
componentInChildren.headerText = "Golden Moai Head";
componentInChildren.subText = $"VALUE: ${num}";
}
RoundManager instance = RoundManager.Instance;
instance.totalScrapValueInLevel += (float)((GrabbableObject)hive).scrapValue;
}
else
{
Debug.LogError((object)"Moai Enemy: Error! gold moai could not be accessed from network object reference");
}
Object.Destroy((Object)(object)((Component)this).gameObject);
}
protected override void __initializeVariables()
{
((EnemyAI)this).__initializeVariables();
}
[RuntimeInitializeOnLoadMethod]
internal static void InitializeRPCS_GoldMoaiSpawn()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
NetworkManager.__rpc_func_table.Add(1194196039u, new RpcReceiveHandler(__rpc_handler_1194196039));
}
private static void __rpc_handler_1194196039(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_002f: 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_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: 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_006f: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
NetworkObjectReference hiveObject = default(NetworkObjectReference);
((FastBufferReader)(ref reader)).ReadValueSafe<NetworkObjectReference>(ref hiveObject, default(ForNetworkSerializable));
Vector3 hivePosition = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref hivePosition);
target.__rpc_exec_stage = (__RpcExecStage)2;
((GoldMoaiSpawn)(object)target).SpawnHiveClientRpc(hiveObject, hivePosition);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "GoldMoaiSpawn";
}
}
public class SceneItemInitializer : MonoBehaviour
{
private void Start()
{
}
private void Update()
{
}
}
public class Spewer : NetworkBehaviour
{
private int eruptHour;
private int currentHour = -1;
private bool noErupt;
private void Start()
{
GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject;
gameObject.GetComponent<ParticleSystem>().Stop();
if (((NetworkBehaviour)RoundManager.Instance).IsHost)
{
if ((double)Random.Range(0f, 1f) < 0.5)
{
eruptHour = getHour() + 999;
noErupt = true;
}
else
{
eruptHour = getHour() + Random.Range(2, 17);
noErupt = false;
}
fogTick();
}
}
private void fogTick()
{
//IL_0045: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: 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_00c9: 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_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
if (!((NetworkBehaviour)RoundManager.Instance).IsHost)
{
return;
}
int num = eruptHour - getHour();
if (noErupt || num < 0)
{
setFogColorClientRpc(new Color(0f, 1f, 0.80784315f));
return;
}
switch (num)
{
case 0:
setFogColorClientRpc(new Color(1f, 47f / 85f, 0f));
break;
case 1:
setFogColorClientRpc(new Color(1f, 47f / 85f, 0f));
break;
case 2:
setFogColorClientRpc(new Color(1f, 0f, 0f));
break;
case 3:
setFogColorClientRpc(new Color(0f, 1f, 0f));
break;
case 4:
setFogColorClientRpc(new Color(0.9372549f, 1f, 0f));
break;
default:
setFogColorClientRpc(new Color(0.5294118f, 0f, 1f));
break;
}
}
private int getHour()
{
return TimeOfDay.Instance.hour;
}
private void Update()
{
if (((NetworkBehaviour)RoundManager.Instance).IsHost && currentHour != getHour())
{
currentHour = getHour();
fogTick();
GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject;
if (getHour() == eruptHour)
{
uint seed = (uint)Random.Range(0, 255000);
playParticleSystemClientRpc(seed);
}
else
{
stopParticleSystemClientRpc();
}
}
}
[ClientRpc]
private void setFogColorClientRpc(Color color)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_0089: Unknown result type (might be due to invalid IL or missing references)
//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Expected O, but got Unknown
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager == null || !networkManager.IsListening)
{
return;
}
if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3595457311u, val, (RpcDelivery)0);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref color);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3595457311u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
{
return;
}
Debug.Log((object)"MOAI: setFogColorClientRpc Called");
Transform transform = GameObject.Find("VolcanoMeters").transform;
foreach (Transform item in transform)
{
Transform val3 = item;
if (((Object)val3).name.Contains("Fog"))
{
LocalVolumetricFog component = ((Component)val3).GetComponent<LocalVolumetricFog>();
component.parameters.albedo = color;
}
}
}
[ClientRpc]
private void playParticleSystemClientRpc(uint seed)
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00a3: Invalid comparison between Unknown and I4
//IL_005f: 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_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(151241951u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, seed);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 151241951u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
{
Debug.Log((object)"MOAI: playParticleSystemClientRpc Called");
GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject;
ParticleSystem component = gameObject.GetComponent<ParticleSystem>();
component.randomSeed = seed;
((Component)component).GetComponent<ParticleSystem>().Play();
}
}
}
[ClientRpc]
private void stopParticleSystemClientRpc()
{
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Invalid comparison between Unknown and I4
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Invalid comparison between Unknown and I4
//IL_005f: 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_007c: Unknown result type (might be due to invalid IL or missing references)
NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
{
ClientRpcParams val = default(ClientRpcParams);
FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(361439863u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 361439863u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
{
Debug.Log((object)"MOAI: stopParticleSystemClientRpc Called");
GameObject gameObject = ((Component)((Component)this).transform.Find("meteors")).gameObject;
ParticleSystem component = gameObject.GetComponent<ParticleSystem>();
component.Stop();
}
}
}
protected override void __initializeVariables()
{
((NetworkBehaviour)this).__initializeVariables();
}
[RuntimeInitializeOnLoadMethod]
internal static void InitializeRPCS_Spewer()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
//IL_002c: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: Expected O, but got Unknown
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
NetworkManager.__rpc_func_table.Add(3595457311u, new RpcReceiveHandler(__rpc_handler_3595457311));
NetworkManager.__rpc_func_table.Add(151241951u, new RpcReceiveHandler(__rpc_handler_151241951));
NetworkManager.__rpc_func_table.Add(361439863u, new RpcReceiveHandler(__rpc_handler_361439863));
}
private static void __rpc_handler_3595457311(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0036: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
Color fogColorClientRpc = default(Color);
((FastBufferReader)(ref reader)).ReadValueSafe(ref fogColorClientRpc);
target.__rpc_exec_stage = (__RpcExecStage)2;
((Spewer)(object)target).setFogColorClientRpc(fogColorClientRpc);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_151241951(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0036: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
uint seed = default(uint);
ByteUnpacker.ReadValueBitPacked(reader, ref seed);
target.__rpc_exec_stage = (__RpcExecStage)2;
((Spewer)(object)target).playParticleSystemClientRpc(seed);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_361439863(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
{
//IL_0029: 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)
NetworkManager networkManager = target.NetworkManager;
if (networkManager != null && networkManager.IsListening)
{
target.__rpc_exec_stage = (__RpcExecStage)2;
((Spewer)(object)target).stopParticleSystemClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
protected internal override string __getTypeName()
{
return "Spewer";
}
}
public class SpewerSpawner : MonoBehaviour
{
private void Start()
{
//IL_001b: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
if (((NetworkBehaviour)RoundManager.Instance).IsHost)
{
GameObject val = Object.Instantiate<GameObject>(Plugin.EruptionController, ((Component)this).transform.position, Quaternion.Euler(Vector3.zero));
val.SetActive(true);
val.GetComponent<NetworkObject>().Spawn(false);
}
}
}
namespace EasterIsland
{
internal class ConfigModel
{
public static ConfigEntry<float> moaiGlobalSize;
public static ConfigEntry<float> moaiGlobalMusicVol;
public static ConfigEntry<float> moaiGlobalRarity;
public static ConfigEntry<float> moaiGlobalSpeed;
public static void setupConfig()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Expected O, but got Unknown
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0022: Expected O, but got Unknown
//IL_0028: Expected O, but got Unknown
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Expected O, but got Unknown
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Expected O, but got Unknown
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_0050: Expected O, but got Unknown
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Expected O, but got Unknown
//IL_0056: 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_0066: Expected O, but got Unknown
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Expected O, but got Unknown
//IL_0078: Expected O, but got Unknown
//IL_0073: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0083: Unknown result type (might be due to invalid IL or missing references)
//IL_008e: Expected O, but got Unknown
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_009a: Expected O, but got Unknown
//IL_00a0: Expected O, but got Unknown
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a1: Expected O, but got Unknown
ConfigEntry<float> obj = moaiGlobalSize;
FloatSliderOptions val = new FloatSliderOptions();
((BaseRangeOptions<float>)val).Min = 0.05f;
((BaseRangeOptions<float>)val).Max = 5f;
FloatSliderConfigItem val2 = new FloatSliderConfigItem(obj, val);
ConfigEntry<float> obj2 = moaiGlobalMusicVol;
FloatSliderOptions val3 = new FloatSliderOptions();
((BaseRangeOptions<float>)val3).Min = 0f;
((BaseRangeOptions<float>)val3).Max = 2f;
FloatSliderConfigItem val4 = new FloatSliderConfigItem(obj2, val3);
ConfigEntry<float> obj3 = moaiGlobalRarity;
FloatSliderOptions val5 = new FloatSliderOptions();
((BaseRangeOptions<float>)val5).Min = 0f;
((BaseRangeOptions<float>)val5).Max = 10f;
FloatSliderConfigItem val6 = new FloatSliderConfigItem(obj3, val5);
ConfigEntry<float> obj4 = moaiGlobalSpeed;
FloatSliderOptions val7 = new FloatSliderOptions();
((BaseRangeOptions<float>)val7).Min = 0f;
((BaseRangeOptions<float>)val7).Max = 5f;
FloatSliderConfigItem val8 = new FloatSliderConfigItem(obj4, val7);
}
}
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("LegendOfTheMoai", "", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
public static Harmony _harmony;
public static EnemyType ExampleEnemy;
public static ManualLogSource Logger;
public static AssetBundle easterislandBundle;
public static GameObject EruptionController;
public static float rawSpawnMultiplier;
public void LogIfDebugBuild(string text)
{
Logger.LogInfo((object)text);
}
private void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
PopulateAssets();
bindVars();
EruptionController = easterislandBundle.LoadAsset<GameObject>("EruptionController");
Debug.Log((object)("EASTER ISLAND ERUPTION CONTROLLER::: " + (object)EruptionController));
Random.InitState((int)DateTime.Now.Ticks);
NetworkPrefabs.RegisterNetworkPrefab(EruptionController);
Logger.LogInfo((object)"Plugin LegendOfTheMoai is loaded!");
Type[] types = Assembly.GetExecutingAssembly().GetTypes();
Type[] array = types;
foreach (Type type in array)
{
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
MethodInfo[] array2 = methods;
foreach (MethodInfo methodInfo in array2)
{
object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
if (customAttributes.Length != 0)
{
methodInfo.Invoke(null, null);
}
}
}
}
public void bindVars()
{
}
public static void PopulateAssets()
{
string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
easterislandBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "eastermoonnetobjects"));
Debug.Log((object)("Easter Bundle::: " + (object)easterislandBundle));
}
}
}
namespace EasterIsland.NetcodePatcher
{
[AttributeUsage(AttributeTargets.Module)]
internal class NetcodePatchedAssemblyAttribute : Attribute
{
}
}