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.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using EntityStates;
using HG.Reflection;
using On.RoR2;
using R2API;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Projectile;
using ShaderSwapper;
using Snowtime.Content;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyCompany("SnowtimeStages")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+21e0a62bd418e2a7c68c9b5245f9f59d3e2a70b9")]
[assembly: AssemblyProduct("SnowtimeStages")]
[assembly: AssemblyTitle("SnowtimeStages")]
[assembly: OptIn]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EntityStates.Snowtime_Error
{
internal class FireMissingProjectile : BaseState
{
public static GameObject projectilePrefab;
public static GameObject effectPrefab;
public static float baseDuration = 1f;
public static float damageCoefficient = 1f;
public static float force = 20f;
public static string attackString;
private float duration;
private static int FireMissingProjectileStateHash = Animator.StringToHash("FireMissingProjectile");
private static int FireMissingProjectileParamHash = Animator.StringToHash("FireMissingProjectile.playbackRate");
public override void OnEnter()
{
//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_0057: 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_0063: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
duration = baseDuration / base.attackSpeedStat;
Ray aimRay = ((BaseState)this).GetAimRay();
string text = "MuzzleMouth";
if (Object.op_Implicit((Object)(object)effectPrefab))
{
EffectManager.SimpleMuzzleFlash(effectPrefab, ((EntityState)this).gameObject, text, false);
}
if (((EntityState)this).isAuthority)
{
ProjectileManager.instance.FireProjectileWithoutDamageType(projectilePrefab, ((Ray)(ref aimRay)).origin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, -1f);
}
}
public override void OnExit()
{
((EntityState)this).OnExit();
}
public override void FixedUpdate()
{
((EntityState)this).FixedUpdate();
if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return (InterruptPriority)1;
}
}
}
namespace Snowtime
{
internal static class Log
{
private static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
[BepInPlugin("SnowySnowtime.SnowtimeStage", "SnowtimeStage", "0.9.5")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class SnowtimeStage : BaseUnityPlugin
{
public const string Author = "SnowySnowtime";
public const string Name = "SnowtimeStage";
public const string Version = "0.9.5";
public const string GUID = "SnowySnowtime.SnowtimeStage";
public static SnowtimeStage instance;
public static DifficultyDef SnowtimeLegendaryDiffDef;
public static DifficultyIndex SnowtimeLegendaryDiffIndex;
public static bool Legendary;
private int defMonsterCap;
public static ConfigEntry<bool> ToggleBloodGulch { get; set; }
public static ConfigEntry<bool> ToggleSidewinder { get; set; }
public static ConfigEntry<bool> ToggleDeathIsland { get; set; }
public static ConfigEntry<bool> ToggleIceFields { get; set; }
public static ConfigEntry<bool> ToggleGephyrophobia { get; set; }
public static ConfigEntry<bool> ToggleSandtrap { get; set; }
public static ConfigEntry<bool> ToggleHalo { get; set; }
public static ConfigEntry<bool> ToggleHalo2 { get; set; }
public static ConfigEntry<bool> ToggleNMB { get; set; }
public static ConfigEntry<bool> ToggleGMC { get; set; }
public static ConfigEntry<bool> ToggleDHalo { get; set; }
public static ConfigEntry<bool> ToggleFLAT { get; set; }
public static ConfigEntry<bool> ToggleHC { get; set; }
public static ConfigEntry<bool> ToggleBig { get; set; }
public static ConfigEntry<bool> ToggleHightower { get; set; }
public void Awake()
{
//IL_0204: Unknown result type (might be due to invalid IL or missing references)
//IL_020e: Expected O, but got Unknown
instance = this;
Log.Init(((BaseUnityPlugin)this).Logger);
ToggleBloodGulch = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 1 Toggles", "Blood Gulch", true, "If true, Blood Gulch is added to the loop, otherwise it shall not appear");
ToggleSidewinder = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 1 Toggles", "Sidewinder", true, "If true, Sidewinder is added to the loop, otherwise it shall not appear");
ToggleGMC = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 1 Toggles", "gm_construct", true, "If true, gm_construct is added to the loop, otherwise it shall not appear");
ToggleDeathIsland = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 2 Toggles", "Death Island", true, "If true, Death Island is added to the loop, otherwise it shall not appear");
ToggleIceFields = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 2 Toggles", "Ice Fields", true, "If true, Ice Fields is added to the loop, otherwise it shall not appear");
ToggleDHalo = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 2 Toggles", "Delta Halo", true, "If true, Delta Halo is added to the loop, otherwise it shall not appear");
ToggleGephyrophobia = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 3 Toggles", "Gephyrophobia", true, "If true, Gephyrophobia is added to the loop, otherwise it shall not appear");
ToggleSandtrap = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 4 Toggles", "Sandtrap", true, "If true, Sandtrap is added to the loop, otherwise it shall not appear");
ToggleHalo = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 5 Toggles", "Halo", true, "If true, Halo is added to the loop, otherwise it shall not appear");
ToggleHalo2 = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 5 Toggles", "Halo(Alt)", true, "If true, Halo(Alt) is added to the loop, otherwise it shall not appear");
ToggleNMB = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 3 Toggles", "New Mombasa Bridge", true, "If true, New Mombasa Bridge is added to the loop, otherwise it shall not appear");
ToggleFLAT = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 5 Toggles", "gm_flatgrass", true, "If true, gm_flatgrass is added to the loop, otherwise it shall not appear");
ToggleHC = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 4 Toggles", "High Charity", true, "If true, High Charity is added to the loop, otherwise it shall not appear");
ToggleBig = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 4 (Bazaar Only) Toggles", "gm_bigcity", true, "If true, gm_bigcity is hidden in the bazaar, otherwise it shall not appear");
ToggleHightower = ((BaseUnityPlugin)this).Config.Bind<bool>("Stage 2 Toggles", "plr_hightower", true, "If true, plr_hightower is added to the loop, otherwise it shall not appear");
RegisterHooks();
AddDifficulty();
ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(GiveToRoR2OurContentPackProviders);
Language.collectLanguageRootFolders += CollectLanguageRootFolders;
Run.onRunStartGlobal += delegate(Run run)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
Legendary = false;
if (run.selectedDifficulty == SnowtimeLegendaryDiffIndex)
{
Legendary = true;
CharacterMaster.onStartGlobal += CharacterMaster_OnStartGlobal;
}
};
Run.onRunDestroyGlobal += delegate
{
Legendary = false;
CharacterMaster.onStartGlobal -= CharacterMaster_OnStartGlobal;
};
}
private void CharacterMaster_OnStartGlobal(CharacterMaster obj)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Invalid comparison between Unknown and I4
if ((int)obj.teamIndex != 1)
{
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.AlienHead, 1);
}
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.BoostAttackSpeed, 3);
}
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.BoostHp, 4);
}
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.PersonalShield, 5);
}
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.BoostDamage, 10);
}
if (Object.op_Implicit((Object)(object)obj.inventory))
{
obj.inventory.GiveItem(Items.Knurl, 1);
}
}
}
private void OnLegendaryStart(Run run)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
CombatDirector.Awake += new hook_Awake(CombatDirector_Awake);
}
private void OnLegendaryEnd(Run run)
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
CombatDirector.Awake -= new hook_Awake(CombatDirector_Awake);
}
private void CombatDirector_Awake(orig_Awake orig, CombatDirector self)
{
TeamDef teamDef = TeamCatalog.GetTeamDef((TeamIndex)2);
teamDef.softCharacterLimit *= 2;
TeamDef teamDef2 = TeamCatalog.GetTeamDef((TeamIndex)4);
teamDef2.softCharacterLimit *= 2;
TeamDef teamDef3 = TeamCatalog.GetTeamDef((TeamIndex)3);
teamDef3.softCharacterLimit *= 2;
orig.Invoke(self);
}
private void RegisterHooks()
{
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Expected O, but got Unknown
MusicController.StartIntroMusic += new hook_StartIntroMusic(MusicController_StartIntroMusic);
}
private void MusicController_StartIntroMusic(orig_StartIntroMusic orig, MusicController self)
{
orig.Invoke(self);
AkSoundEngine.PostEvent("Play_Music_SystemST", ((Component)self).gameObject);
}
private void Destroy()
{
Language.collectLanguageRootFolders -= CollectLanguageRootFolders;
}
private void GiveToRoR2OurContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
{
addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentProvider());
}
public void AddDifficulty()
{
//IL_0025: 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_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Expected O, but got Unknown
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
SnowtimeLegendaryDiffDef = new DifficultyDef(3.5f, "SNOWTIME_LEGENDARY_NAME", "SNOWTIME_LEGENDARY_ICON", "SNOWTIME_LEGENDARY_DESC", Color32.op_Implicit(new Color32((byte)100, (byte)170, byte.MaxValue, byte.MaxValue)), "stLeg", false);
SnowtimeLegendaryDiffDef.foundIconSprite = true;
SnowtimeLegendaryDiffIndex = DifficultyAPI.AddDifficulty(SnowtimeLegendaryDiffDef);
}
public void CollectLanguageRootFolders(List<string> folders)
{
folders.Add(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Language"));
}
}
}
namespace Snowtime.Content
{
public class ContentProvider : IContentPackProvider
{
private readonly ContentPack _contentPack = new ContentPack();
public static string assetDirectory;
public string identifier => "SnowySnowtime.SnowtimeStage.ContentProvider";
public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
{
_contentPack.identifier = identifier;
string assetsFolderFullPath = (assetDirectory = Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "assetbundles"));
SnowtimeContent.LoadSoundBanks(Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "audio"));
AssetBundle scenesAssetBundle = null;
yield return LoadAssetBundle(Path.Combine(assetsFolderFullPath, "snowtimestages"), args.progressReceiver, delegate(AssetBundle assetBundle)
{
scenesAssetBundle = assetBundle;
});
AssetBundle assetsAssetBundle = null;
yield return LoadAssetBundle(Path.Combine(assetsFolderFullPath, "snowtimeassets"), args.progressReceiver, delegate(AssetBundle assetBundle)
{
assetsAssetBundle = assetBundle;
});
yield return SnowtimeContent.LoadAssetBundlesAsync(scenesAssetBundle, assetsAssetBundle, args.progressReceiver, _contentPack);
}
private IEnumerator LoadAssetBundle(string assetBundleFullPath, IProgress<float> progress, Action<AssetBundle> onAssetBundleLoaded)
{
AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.LoadFromFileAsync(assetBundleFullPath);
while (!((AsyncOperation)assetBundleCreateRequest).isDone)
{
progress.Report(((AsyncOperation)assetBundleCreateRequest).progress);
yield return null;
}
onAssetBundleLoaded(assetBundleCreateRequest.assetBundle);
}
public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
{
ContentPack.Copy(_contentPack, args.output);
args.ReportProgress(1f);
yield break;
}
public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
{
args.ReportProgress(1f);
yield break;
}
}
public static class SnowtimeContent
{
internal const string ScenesAssetBundleFileName = "snowtimestages";
internal const string AssetsAssetBundleFileName = "snowtimeassets";
internal const string MusicSoundBankFileName = "SnowtimeStagesMusic.bnk";
internal const string SndSoundBankFileName = "SnowtimeStagesSounds.bnk";
internal const string InitSoundBankFileName = "SnowtimeStagesInit.bnk";
public static AssetBundle _stscenesAssetBundle;
public static AssetBundle _stassetsAssetBundle;
internal static UnlockableDef[] UnlockableDefs;
internal static SceneDef[] SceneDefs;
internal static ExpansionDef[] expansionDefs;
internal static GameObject[] gameObjects;
internal static EntityStateConfiguration[] EntityStateConfigurations;
public static List<EntityStateConfiguration> stentStateConfig = new List<EntityStateConfiguration>();
public static List<SceneDef> stSceneDefList = new List<SceneDef>();
public static List<Material> SwappedMaterials = new List<Material>();
public static List<GameObject> stbodyList = new List<GameObject>();
public static List<GameObject> stmasterList = new List<GameObject>();
public static List<GameObject> stprojectileList = new List<GameObject>();
public static List<GameObject> stnwobjList = new List<GameObject>();
public static List<GameObject> stghostList = new List<GameObject>();
public static List<EffectDef> steffectList = new List<EffectDef>();
public static List<EliteDef> steliteList = new List<EliteDef>();
public static List<EquipmentDef> stequipList = new List<EquipmentDef>();
public static List<BuffDef> stbuffList = new List<BuffDef>();
internal static ExpansionDef ExpansionDefSTHalo;
internal static ExpansionDef ExpansionDefSTSource;
public static Sprite SnowtimeLegendaryIcon;
internal static SceneDef STSceneDef;
internal static Sprite STSceneDefPreviewSprite;
internal static Material STBazaarSeer;
internal static SceneDef STIFSceneDef;
internal static Sprite STIFSceneDefPreviewSprite;
internal static Material STIFBazaarSeer;
internal static SceneDef STBGSceneDef;
internal static Sprite STBGSceneDefPreviewSprite;
internal static Material STBGBazaarSeer;
internal static SceneDef STGPHSceneDef;
internal static Sprite STGPHSceneDefPreviewSprite;
internal static Material STGPHBazaarSeer;
internal static SceneDef STHSceneDef;
internal static Sprite STHSceneDefPreviewSprite;
internal static Material STHBazaarSeer;
internal static SceneDef STH2SceneDef;
internal static Sprite STH2SceneDefPreviewSprite;
internal static Material STH2BazaarSeer;
internal static SceneDef STShrineSceneDef;
internal static Sprite STShrineSceneDefPreviewSprite;
internal static Material STShrineBazaarSeer;
internal static SceneDef STSWSceneDef;
internal static Sprite STSWSceneDefPreviewSprite;
internal static Material STSWBazaarSeer;
internal static SceneDef STNMBSceneDef;
internal static Sprite STNMBSceneDefPreviewSprite;
internal static Material STNMBBazaarSeer;
internal static SceneDef STGMCSceneDef;
internal static Sprite STGMCSceneDefPreviewSprite;
internal static Material STGMCBazaarSeer;
internal static SceneDef STDHSceneDef;
internal static Sprite STDHSceneDefPreviewSprite;
internal static Material STDHBazaarSeer;
internal static SceneDef STFlatSceneDef;
internal static Sprite STFlatSceneDefPreviewSprite;
internal static Material STFlatBazaarSeer;
internal static SceneDef STHCSceneDef;
internal static Sprite STHCSceneDefPreviewSprite;
internal static Material STHCBazaarSeer;
internal static SceneDef STCitySceneDef;
internal static Sprite STCitySceneDefPreviewSprite;
internal static Material STCityBazaarSeer;
internal static SceneDef STHightowerSceneDef;
internal static Sprite STHightowerSceneDefPreviewSprite;
internal static Material STHightowerBazaarSeer;
internal static GameObject CovenantCruiser;
internal static GameObject CovenantCruiserLunar;
internal static GameObject PurchaseLockCovenant;
internal static GameObject PlatChest;
internal static GameObject GoldChest_Scaling;
internal static GameObject LemurianErrorBody;
internal static GameObject LemurianErrorMaster;
internal static GameObject MissingBall;
internal static GameObject MissingHit;
internal static GameObject MissingFlash;
internal static GameObject MissingExplFX;
internal static GameObject MissingGhost;
internal static InteractableSpawnCard PlatinumChestCard;
internal static EntityStateConfiguration LemurianErrorEsc;
internal static IEnumerator LoadAssetBundlesAsync(AssetBundle scenesAssetBundle, AssetBundle assetsAssetBundle, IProgress<float> progress, ContentPack contentPack)
{
_stscenesAssetBundle = scenesAssetBundle;
_stassetsAssetBundle = assetsAssetBundle;
Log.Debug("Snowtime Stages found. Loading asset bundles...");
IEnumerator upgradeStubbedShaders = ShaderSwapper.UpgradeStubbedShadersAsync(_stassetsAssetBundle);
while (upgradeStubbedShaders.MoveNext())
{
yield return upgradeStubbedShaders.Current;
}
yield return LoadAllAssetsAsync<UnlockableDef>(_stassetsAssetBundle, progress, (Action<UnlockableDef[]>)delegate(UnlockableDef[] assets)
{
UnlockableDefs = assets;
contentPack.unlockableDefs.Add(assets);
});
yield return LoadAllAssetsAsync<GameObject>(_stassetsAssetBundle, progress, (Action<GameObject[]>)delegate(GameObject[] assets)
{
//IL_027a: Unknown result type (might be due to invalid IL or missing references)
//IL_0284: Expected O, but got Unknown
//IL_028e: Unknown result type (might be due to invalid IL or missing references)
//IL_0298: Expected O, but got Unknown
//IL_02a2: Unknown result type (might be due to invalid IL or missing references)
//IL_02ac: Expected O, but got Unknown
CovenantCruiser = assets.First((GameObject a) => ((Object)a).name == "CovenantCruiserTeleporter");
PurchaseLockCovenant = assets.First((GameObject a) => ((Object)a).name == "PurchaseLockCovenant");
CovenantCruiserLunar = assets.First((GameObject a) => ((Object)a).name == "CovenantCruiserTeleporterLunar");
PlatChest = assets.First((GameObject a) => ((Object)a).name == "PlatChest");
GoldChest_Scaling = assets.First((GameObject a) => ((Object)a).name == "GoldChest_Scaling");
LemurianErrorBody = assets.First((GameObject a) => ((Object)a).name == "LemurianErrorBody");
LemurianErrorMaster = assets.First((GameObject a) => ((Object)a).name == "LemurianErrorMaster");
MissingBall = assets.First((GameObject a) => ((Object)a).name == "MissingBall");
MissingFlash = assets.First((GameObject a) => ((Object)a).name == "MissingFlash");
MissingExplFX = assets.First((GameObject a) => ((Object)a).name == "OmniExplosionVFXQuickMissing");
MissingHit = assets.First((GameObject a) => ((Object)a).name == "MissingHit");
MissingGhost = assets.First((GameObject a) => ((Object)a).name == "MissingGhost");
stnwobjList.Add(CovenantCruiser);
stnwobjList.Add(PurchaseLockCovenant);
stnwobjList.Add(CovenantCruiserLunar);
stnwobjList.Add(PlatChest);
stnwobjList.Add(GoldChest_Scaling);
stbodyList.Add(LemurianErrorBody);
stmasterList.Add(LemurianErrorMaster);
stprojectileList.Add(MissingBall);
steffectList.Add(new EffectDef(MissingFlash));
steffectList.Add(new EffectDef(MissingExplFX));
steffectList.Add(new EffectDef(MissingHit));
contentPack.networkedObjectPrefabs.Add(stnwobjList.ToArray());
contentPack.bodyPrefabs.Add(stbodyList.ToArray());
contentPack.masterPrefabs.Add(stmasterList.ToArray());
contentPack.projectilePrefabs.Add(stprojectileList.ToArray());
contentPack.effectDefs.Add(steffectList.ToArray());
contentPack.entityStateTypes.Add((from type in typeof(SnowtimeStage).Assembly.GetTypes()
where typeof(EntityState).IsAssignableFrom(type)
select type).ToArray());
});
yield return LoadAllAssetsAsync<EntityStateConfiguration>(_stassetsAssetBundle, progress, (Action<EntityStateConfiguration[]>)delegate(EntityStateConfiguration[] assets)
{
LemurianErrorEsc = assets.First((EntityStateConfiguration a) => ((Object)a).name == "escFireMissingProjectile");
stentStateConfig.Add(LemurianErrorEsc);
contentPack.entityStateConfigurations.Add(stentStateConfig.ToArray());
});
yield return LoadAllAssetsAsync<ExpansionDef>(_stassetsAssetBundle, progress, (Action<ExpansionDef[]>)delegate(ExpansionDef[] assets)
{
ExpansionDefSTHalo = assets.First((ExpansionDef a) => ((Object)a).name == "snowtimestageshalo_expdef");
ExpansionDefSTSource = assets.First((ExpansionDef a) => ((Object)a).name == "snowtimestagessource_expdef");
Log.Debug("SnowtimeStages:Halo Expansion Definition Added");
Log.Debug("SnowtimeStages:Source Expansion Definition Added");
contentPack.expansionDefs.Add(assets);
});
yield return LoadAllAssetsAsync<Sprite>(_stassetsAssetBundle, progress, (Action<Sprite[]>)delegate(Sprite[] assets)
{
STSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTScenePreview");
STIFSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTIFScenePreview");
STBGSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTBGScenePreview");
STGPHSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTGPHScenePreview");
STHSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTHaloScenePreview");
STH2SceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTHaloScenePreview");
STShrineSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTShrineScenePreview");
STSWSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTSWScenePreview");
STNMBSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTNMBScenePreview");
STGMCSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTGMCScenePreview");
STDHSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTDHaloScenePreview");
STFlatSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTFlatScenePreview");
STHCSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTHCScenePreview");
STCitySceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTCityScenePreview");
STHightowerSceneDefPreviewSprite = assets.First((Sprite a) => ((Object)a).name == "texSTHightowerScenePreview");
SnowtimeLegendaryIcon = assets.First((Sprite a) => ((Object)a).name == "texSnowtimeLegendaryPLNK");
});
yield return LoadAllAssetsAsync<SceneDef>(_stassetsAssetBundle, progress, (Action<SceneDef[]>)delegate(SceneDef[] assets)
{
Log.Debug("Adding enabled SceneDefs for SnowtimeStages");
if (SnowtimeStage.ToggleBloodGulch.Value)
{
STBGSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_bloodgulch");
stSceneDefList.Add(STBGSceneDef);
Log.Debug("Added Blood Gulch SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleBloodGulch.Value)
{
Log.Debug("Skipped Blood Gulch SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleSidewinder.Value)
{
STSWSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_sidewinder");
stSceneDefList.Add(STSWSceneDef);
Log.Debug("Added Sidewinder SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleSidewinder.Value)
{
Log.Debug("Skipped Sidewinder SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleDeathIsland.Value)
{
STSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_deathisland");
stSceneDefList.Add(STSceneDef);
Log.Debug("Added Death Island SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleDeathIsland.Value)
{
Log.Debug("Skipped Death Island SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleIceFields.Value)
{
STIFSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_icefields");
stSceneDefList.Add(STIFSceneDef);
Log.Debug("Added Ice Fields SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleIceFields.Value)
{
Log.Debug("Skipped Ice Fields SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleGephyrophobia.Value)
{
STGPHSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_gephyrophobia");
stSceneDefList.Add(STGPHSceneDef);
Log.Debug("Added Gephyrophobia SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleGephyrophobia.Value)
{
Log.Debug("Skipped Gephyrophobia SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleSandtrap.Value)
{
STShrineSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_sandtrap");
stSceneDefList.Add(STShrineSceneDef);
Log.Debug("Added Sandtrap SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleSandtrap.Value)
{
Log.Debug("Skipped Sandtrap SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleHalo.Value)
{
STHSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_halo");
stSceneDefList.Add(STHSceneDef);
Log.Debug("Added Halo SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleHalo.Value)
{
Log.Debug("Skipped Halo SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleHalo2.Value)
{
STH2SceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_halo2");
stSceneDefList.Add(STH2SceneDef);
Log.Debug("Added Halo(Alt) SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleHalo2.Value)
{
Log.Debug("Skipped Halo(Alt) SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleNMB.Value)
{
STNMBSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_newmombasabridge");
stSceneDefList.Add(STNMBSceneDef);
Log.Debug("Added New Mombasa Bridge SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleNMB.Value)
{
Log.Debug("Skipped New Mombasa Bridge SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleGMC.Value)
{
STGMCSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_gmconstruct");
stSceneDefList.Add(STGMCSceneDef);
Log.Debug("Added gm_construct SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleGMC.Value)
{
Log.Debug("Skipped gm_construct SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleDHalo.Value)
{
STDHSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_deltahalo");
stSceneDefList.Add(STDHSceneDef);
Log.Debug("Added Delta Halo SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleDHalo.Value)
{
Log.Debug("Skipped Delta Halo SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleFLAT.Value)
{
STFlatSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_gmflatgrass");
stSceneDefList.Add(STFlatSceneDef);
Log.Debug("Added gm_flatgrass SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleFLAT.Value)
{
Log.Debug("Skipped gm_flatgrass SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleHC.Value)
{
STHCSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_highcharity");
stSceneDefList.Add(STHCSceneDef);
Log.Debug("Added High Charity SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleHC.Value)
{
Log.Debug("Skipped High Charity SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleBig.Value)
{
STCitySceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_gmbigcity");
stSceneDefList.Add(STCitySceneDef);
Log.Debug("Added gm_bigcity SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleBig.Value)
{
Log.Debug("Skipped gm_bigcity SceneDef (Config Off)");
}
if (SnowtimeStage.ToggleHightower.Value)
{
STHightowerSceneDef = assets.First((SceneDef sd) => sd.cachedName == "snowtime_plrhightower");
stSceneDefList.Add(STHightowerSceneDef);
Log.Debug("Added plr_hightower SceneDef (Config On)");
}
if (!SnowtimeStage.ToggleHightower.Value)
{
Log.Debug("Skipped plr_hightower SceneDef (Config Off)");
}
contentPack.sceneDefs.Add(stSceneDefList.ToArray());
Log.Debug("Finished adding enabled SceneDefs for SnowtimeStages");
});
yield return LoadAllAssetsAsync<MusicTrackDef>(_stassetsAssetBundle, progress, (Action<MusicTrackDef[]>)delegate(MusicTrackDef[] assets)
{
contentPack.musicTrackDefs.Add(assets);
Log.Debug("Loaded musicDefs for SnowtimeStages");
});
Log.Debug("Adding Stages to the Loop + Bazaar Seer Materials");
Log.Debug("Blood Gulch Config Status?");
Log.Debug(SnowtimeStage.ToggleBloodGulch.Value);
if (SnowtimeStage.ToggleBloodGulch.Value)
{
STBGBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STBGSceneDefPreviewSprite.texture);
STBGSceneDef.previewTexture = (Texture)(object)STBGSceneDefPreviewSprite.texture;
STBGSceneDef.portalMaterial = STBGBazaarSeer;
Log.Debug("Blood Gulch Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STBGSceneDef, 1f, true, true);
Log.Debug("Added Blood Gulch to loop");
Log.Debug(STBGSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleBloodGulch.Value)
{
Log.Debug("Skipped adding Blood Gulch to the loop");
}
Log.Debug("Sidewinder Config Status?");
Log.Debug(SnowtimeStage.ToggleSidewinder.Value);
if (SnowtimeStage.ToggleSidewinder.Value)
{
STSWBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STSWSceneDefPreviewSprite.texture);
STSWSceneDef.previewTexture = (Texture)(object)STSWSceneDefPreviewSprite.texture;
STSWSceneDef.portalMaterial = STSWBazaarSeer;
Log.Debug("Sidewinder Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STSWSceneDef, 1f, true, true);
Log.Debug("Added Sidewinder to the loop");
Log.Debug(STSWSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleSidewinder.Value)
{
Log.Debug("Skipped adding Sidewinder to the loop");
}
Log.Debug("Death Island Config Status?");
Log.Debug(SnowtimeStage.ToggleDeathIsland.Value);
if (SnowtimeStage.ToggleDeathIsland.Value)
{
STBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STSceneDefPreviewSprite.texture);
STSceneDef.previewTexture = (Texture)(object)STSceneDefPreviewSprite.texture;
STSceneDef.portalMaterial = STBazaarSeer;
Log.Debug("Death Island Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STSceneDef, 1f, true, true);
Log.Debug("Added Death Island to the loop");
Log.Debug(STSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleDeathIsland.Value)
{
Log.Debug("Skipped adding Death Island to the loop");
}
Log.Debug("Ice Fields Config Status?");
Log.Debug(SnowtimeStage.ToggleIceFields.Value);
if (SnowtimeStage.ToggleIceFields.Value)
{
STIFBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STIFSceneDefPreviewSprite.texture);
STIFSceneDef.previewTexture = (Texture)(object)STIFSceneDefPreviewSprite.texture;
STIFSceneDef.portalMaterial = STIFBazaarSeer;
Log.Debug("Ice Fields Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STIFSceneDef, 1f, true, true);
Log.Debug("Added Ice Fields to the loop");
Log.Debug(STIFSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleIceFields.Value)
{
Log.Debug("Skipped adding Ice Fields to the loop");
}
Log.Debug("Gephyrophobia Config Status?");
Log.Debug(SnowtimeStage.ToggleGephyrophobia.Value);
if (SnowtimeStage.ToggleGephyrophobia.Value)
{
STGPHBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STGPHSceneDefPreviewSprite.texture);
STGPHSceneDef.previewTexture = (Texture)(object)STGPHSceneDefPreviewSprite.texture;
STGPHSceneDef.portalMaterial = STGPHBazaarSeer;
Log.Debug("Gephyrophobia Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STGPHSceneDef, 1f, true, true);
Log.Debug("Added Gephyrophobia to the loop");
Log.Debug(STGPHSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleGephyrophobia.Value)
{
Log.Debug("Skipped adding Gephyrophobia to the loop");
}
Log.Debug("Sandtrap Config Status?");
Log.Debug(SnowtimeStage.ToggleSandtrap.Value);
if (SnowtimeStage.ToggleSandtrap.Value)
{
STShrineBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STShrineSceneDefPreviewSprite.texture);
STShrineSceneDef.previewTexture = (Texture)(object)STShrineSceneDefPreviewSprite.texture;
STShrineSceneDef.portalMaterial = STShrineBazaarSeer;
Log.Debug("Sandtrap Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STShrineSceneDef, 1f, true, true);
Log.Debug("Added Sandtrap to the loop");
Log.Debug(STShrineSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleSandtrap.Value)
{
Log.Debug("Skipped adding Sandtrap to the loop");
}
Log.Debug("Halo Config Status?");
Log.Debug(SnowtimeStage.ToggleHalo.Value);
if (SnowtimeStage.ToggleHalo.Value)
{
STHBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STHSceneDefPreviewSprite.texture);
STHSceneDef.previewTexture = (Texture)(object)STHSceneDefPreviewSprite.texture;
STHSceneDef.portalMaterial = STHBazaarSeer;
Log.Debug("Halo Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STHSceneDef, 1f, true, true);
Log.Debug("Added Halo to the loop");
Log.Debug(STHSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleHalo.Value)
{
Log.Debug("Skipped adding Halo to the loop");
}
Log.Debug("Halo Config Status?");
Log.Debug(SnowtimeStage.ToggleHalo2.Value);
if (SnowtimeStage.ToggleHalo2.Value)
{
STH2BazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STH2SceneDefPreviewSprite.texture);
STH2SceneDef.previewTexture = (Texture)(object)STH2SceneDefPreviewSprite.texture;
STH2SceneDef.portalMaterial = STH2BazaarSeer;
Log.Debug("Halo(Alt) Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STH2SceneDef, 1f, true, true);
Log.Debug("Added Halo(Alt) to the loop");
Log.Debug(STH2SceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleHalo2.Value)
{
Log.Debug("Skipped adding Halo(Alt) to the loop");
}
Log.Debug("New Mombasa Bridge Config Status?");
Log.Debug(SnowtimeStage.ToggleNMB.Value);
if (SnowtimeStage.ToggleNMB.Value)
{
STNMBBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STNMBSceneDefPreviewSprite.texture);
STNMBSceneDef.previewTexture = (Texture)(object)STNMBSceneDefPreviewSprite.texture;
STNMBSceneDef.portalMaterial = STNMBBazaarSeer;
Log.Debug("New Mombasa Bridge Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STNMBSceneDef, 1f, true, true);
Log.Debug("Added New Mombasa Bridge to the loop");
Log.Debug(STNMBSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleNMB.Value)
{
Log.Debug("Skipped adding New Mombasa Bridge to the loop");
}
Log.Debug("gm_construct Config Status?");
Log.Debug(SnowtimeStage.ToggleGMC.Value);
if (SnowtimeStage.ToggleGMC.Value)
{
STGMCBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STGMCSceneDefPreviewSprite.texture);
STGMCSceneDef.previewTexture = (Texture)(object)STGMCSceneDefPreviewSprite.texture;
STGMCSceneDef.portalMaterial = STGMCBazaarSeer;
Log.Debug("gm_construct Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STGMCSceneDef, 1f, true, true);
Log.Debug("Added gm_construct to the loop");
Log.Debug(STGMCSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleGMC.Value)
{
Log.Debug("Skipped adding gm_construct to the loop");
}
Log.Debug("Delta Halo Config Status?");
Log.Debug(SnowtimeStage.ToggleDHalo.Value);
if (SnowtimeStage.ToggleDHalo.Value)
{
STDHBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STDHSceneDefPreviewSprite.texture);
STDHSceneDef.previewTexture = (Texture)(object)STDHSceneDefPreviewSprite.texture;
STDHSceneDef.portalMaterial = STDHBazaarSeer;
Log.Debug("Delta Halo Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STDHSceneDef, 1f, true, true);
Log.Debug("Added Delta Halo to the loop");
Log.Debug(STDHSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleDHalo.Value)
{
Log.Debug("Skipped adding Delta Halo to the loop");
}
Log.Debug("gm_flatgrass Config Status?");
Log.Debug(SnowtimeStage.ToggleFLAT.Value);
if (SnowtimeStage.ToggleFLAT.Value)
{
STFlatBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STFlatSceneDefPreviewSprite.texture);
STFlatSceneDef.previewTexture = (Texture)(object)STFlatSceneDefPreviewSprite.texture;
STFlatSceneDef.portalMaterial = STFlatBazaarSeer;
Log.Debug("gm_flatgrass Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STFlatSceneDef, 1f, true, true);
Log.Debug("Added gm_flatgrass to the loop");
Log.Debug(STFlatSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleFLAT.Value)
{
Log.Debug("Skipped adding gm_flatgrass to the loop");
}
Log.Debug("High Charity Config Status?");
Log.Debug(SnowtimeStage.ToggleHC.Value);
if (SnowtimeStage.ToggleHC.Value)
{
STHCBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STHCSceneDefPreviewSprite.texture);
STHCSceneDef.previewTexture = (Texture)(object)STHCSceneDefPreviewSprite.texture;
STHCSceneDef.portalMaterial = STHCBazaarSeer;
Log.Debug("High Charity Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STHCSceneDef, 1f, true, true);
Log.Debug("Added High Charity to the loop");
Log.Debug(STHCSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleHC.Value)
{
Log.Debug("Skipped adding High Charity to the loop");
}
if (SnowtimeStage.ToggleBig.Value)
{
STCityBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STCitySceneDefPreviewSprite.texture);
STCitySceneDef.previewTexture = (Texture)(object)STCitySceneDefPreviewSprite.texture;
STCitySceneDef.portalMaterial = STCityBazaarSeer;
Log.Debug("gm_bigcity Bazaar Seer Material Complete");
Log.Debug("Hid gm_bigcity on stage 4's Bazaar");
}
if (!SnowtimeStage.ToggleBig.Value)
{
Log.Debug("Skipped hiding gm_bigcity in the bazaar");
}
Log.Debug("plr_hightower Config Status?");
Log.Debug(SnowtimeStage.ToggleHightower.Value);
if (SnowtimeStage.ToggleHightower.Value)
{
STHightowerBazaarSeer = StageRegistration.MakeBazaarSeerMaterial(STHightowerSceneDefPreviewSprite.texture);
STHightowerSceneDef.previewTexture = (Texture)(object)STHightowerSceneDefPreviewSprite.texture;
STHightowerSceneDef.portalMaterial = STHightowerBazaarSeer;
Log.Debug("Death Island Bazaar Seer Material Complete");
StageRegistration.RegisterSceneDefToNormalProgression(STHightowerSceneDef, 1f, true, true);
Log.Debug("Added Death Island to the loop");
Log.Debug(STHightowerSceneDef.destinationsGroup);
}
if (!SnowtimeStage.ToggleHightower.Value)
{
Log.Debug("Skipped adding Death Island to the loop");
}
SnowtimeStage.SnowtimeLegendaryDiffDef.iconSprite = SnowtimeLegendaryIcon;
SnowtimeStage.SnowtimeLegendaryDiffDef.foundIconSprite = true;
}
private static IEnumerator LoadAllAssetsAsync<T>(AssetBundle assetBundle, IProgress<float> progress, Action<T[]> onAssetsLoaded) where T : Object
{
AssetBundleRequest sceneDefsRequest = assetBundle.LoadAllAssetsAsync<T>();
while (!((AsyncOperation)sceneDefsRequest).isDone)
{
progress.Report(((AsyncOperation)sceneDefsRequest).progress);
yield return null;
}
onAssetsLoaded(sceneDefsRequest.allAssets.Cast<T>().ToArray());
}
internal static void LoadSoundBanks(string soundbanksFolderPath)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0007: Unknown result type (might be due to invalid IL or missing references)
//IL_0009: Invalid comparison between Unknown and I4
//IL_002d: 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_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0051: Invalid comparison between Unknown and I4
//IL_0069: 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)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_008d: Invalid comparison between Unknown and I4
//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Invalid comparison between Unknown and I4
//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
AKRESULT val = AkSoundEngine.AddBasePath(soundbanksFolderPath);
if ((int)val == 1)
{
Log.Info("Added bank base path : " + soundbanksFolderPath);
}
else
{
Log.Error("Error adding base path : " + soundbanksFolderPath + " " + $"Error code : {val}");
}
uint num = default(uint);
val = AkSoundEngine.LoadBank("SnowtimeStagesInit.bnk", ref num);
if ((int)val == 1)
{
Log.Info("Added bank : SnowtimeStagesInit.bnk");
}
else
{
Log.Error("Error loading bank : SnowtimeStagesInit.bnk " + $"Error code : {val}");
}
val = AkSoundEngine.LoadBank("SnowtimeStagesMusic.bnk", ref num);
if ((int)val == 1)
{
Log.Info("Added bank : SnowtimeStagesMusic.bnk");
}
else
{
Log.Error("Error loading bank : SnowtimeStagesMusic.bnk " + $"Error code : {val}");
}
val = AkSoundEngine.LoadBank("SnowtimeStagesSounds.bnk", ref num);
if ((int)val == 1)
{
Log.Info("Added bank : SnowtimeStagesSounds.bnk");
}
else
{
Log.Error("Error loading bank : SnowtimeStagesSounds.bnk " + $"Error code : {val}");
}
}
}
}