Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Runtime/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# '2.3.1' - AC Update

* Updated to game version 1.4.1

# '2.3.0' - Memory Optimization

* Updated to game version 1.3.9
Expand Down
15 changes: 8 additions & 7 deletions Runtime/Code/Loaders/VAPIContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using UnityEngine;
using UnityEngine.AddressableAssets;
using VAPI.Modules;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;

namespace VAPI
{
public class VAPIContent : IContentPackProvider
Expand All @@ -21,11 +23,11 @@ public class VAPIContent : IContentPackProvider

internal static ContentPack contentPack { get; } = new ContentPack();

internal static ParallelCoroutine _parallelPreLoadDispatchers = new ParallelCoroutine();
internal static HG.Coroutines.ParallelCoroutine _parallelPreLoadDispatchers = new();

private static Func<IEnumerator>[] _loadDispatchers;

internal static ParallelCoroutine _parallelPostLoadDispatchers = new ParallelCoroutine();
internal static HG.Coroutines.ParallelCoroutine _parallelPostLoadDispatchers = new();

private static Action[] _fieldAssignDispatchers;

Expand All @@ -37,7 +39,7 @@ public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
yield return null;
}

while (!_parallelPreLoadDispatchers.isDone)
while (!_parallelPreLoadDispatchers.IsDone())
yield return null;

for (int i = 0; i < _loadDispatchers.Length; i++)
Expand All @@ -48,7 +50,7 @@ public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
while (enumerator?.MoveNext() ?? false) yield return null; //await
}

while (!_parallelPostLoadDispatchers.isDone)
while (!_parallelPostLoadDispatchers.IsDone())
yield return null;

for(int i = 0; i < _fieldAssignDispatchers.Length; i++)
Expand Down Expand Up @@ -100,11 +102,10 @@ IEnumerator LoadEmptySkillDef()

IEnumerator LoadLockedIconAndAssignToExpansionDef()
{
ParallelCoroutine coroutine = new ParallelCoroutine();

var request = VAPIAssets.LoadAssetAsync<ExpansionDef>("VarianceExpansion");
var iconRequest = Addressables.LoadAssetAsync<Sprite>("RoR2/Base/Common/MiscIcons/texUnlockIcon.png");
var iconRequest = Addressables.LoadAssetAsync<Sprite>(RoR2_Base_Common_MiscIcons.texUnlockIcon_png);

var coroutine = new HG.Coroutines.ParallelCoroutine();
coroutine.Add(request);
coroutine.Add(iconRequest);

Expand Down
11 changes: 6 additions & 5 deletions Runtime/Code/Modules/InfiniteTower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.UI;
using RoR2BepInExPack.GameAssetPaths.Version_1_39_0;

namespace VAPI.Modules
{
Expand Down Expand Up @@ -55,13 +56,13 @@ internal static IEnumerator Init()
{
VAPILog.Info($"Initializing infinite tower support");
_init = true;

var commonWaveCategoryRequest = Addressables.LoadAssetAsync<InfiniteTowerWaveCategory>("RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveCategories/CommonWaveCategory.asset");
var overlayEntryRequest = Addressables.LoadAssetAsync<GameObject>("RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerCurrentArtifactWispOnDeathUI.prefab");
var commonWaveCategoryRequest = Addressables.LoadAssetAsync<InfiniteTowerWaveCategory>(RoR2_DLC1_GameModes_InfiniteTowerRun_ITAssets_ITWaveCategories.CommonWaveCategory_asset);
var overlayEntryRequest = Addressables.LoadAssetAsync<GameObject>(RoR2_DLC1_GameModes_InfiniteTowerRun_ITAssets.InfiniteTowerCurrentArtifactWispOnDeathUI_prefab);
var assetCollectionRequest = VAPIAssets.LoadAssetAsync<AssetCollection>("acInfiniteTower");
var wispWave = Addressables.LoadAssetAsync<GameObject>("RoR2/DLC1/GameModes/InfiniteTowerRun/InfiniteTowerAssets/InfiniteTowerWaveArtifactWispOnDeath.prefab");
var wispWave = Addressables.LoadAssetAsync<GameObject>(RoR2_DLC1_GameModes_InfiniteTowerRun_ITAssets.InfiniteTowerWaveArtifactWispOnDeath_prefab);

ParallelCoroutine coroutine = new ParallelCoroutine();
var coroutine = new HG.Coroutines.ParallelCoroutine();
coroutine.Add(commonWaveCategoryRequest);
coroutine.Add(overlayEntryRequest);
coroutine.Add(assetCollectionRequest);
Expand Down
2 changes: 1 addition & 1 deletion Runtime/Code/VAPIMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class VAPIMain : BaseUnityPlugin
/// <summary>
/// VAPI's Version
/// </summary>
public const string VERSION = "2.3.0";
public const string VERSION = "2.3.1";

/// <summary>
/// The instancee class of the Main class
Expand Down
3 changes: 2 additions & 1 deletion Runtime/Code/VarianceAPI.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"UnityEngine.UI.dll",
"Unity.TextMeshPro.dll",
"R2API.Prefab.dll",
"R2API.Addressables.dll"
"R2API.Addressables.dll",
"RoR2BepInExPack.dll"
],
"autoReferenced": true,
"defineConstraints": [
Expand Down
2 changes: 1 addition & 1 deletion Runtime/VAPI-Manifest.asset
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ MonoBehaviour:
Name: VarianceAPI
Description: VarianceAPI allows you to create Variants for CharacterBodies, Variants
can have different textures, lights, skills, and more.
Version: 2.3.0
Version: 2.3.1
Dependencies:
- {fileID: 11400000, guid: 5ceb1d8ed3af40d4d806e9756b403649, type: 2}
- {fileID: 11400000, guid: 613d4ca030e90a832defdb35afe5393b, type: 2}
Expand Down