From f56f4d664c7b0d34372635429c4a40b829976a11 Mon Sep 17 00:00:00 2001 From: Codenade Date: Thu, 31 Aug 2023 00:59:19 +0200 Subject: [PATCH 1/2] Update for game version 0.1.4.0 --- ksp2-inputbinder/Inputbinder.cs | 4 ++-- ksp2-inputbinder/ui/BindingUI.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ksp2-inputbinder/Inputbinder.cs b/ksp2-inputbinder/Inputbinder.cs index eef3a45..e75ff59 100644 --- a/ksp2-inputbinder/Inputbinder.cs +++ b/ksp2-inputbinder/Inputbinder.cs @@ -141,7 +141,7 @@ private IEnumerator LoadCatalog() if (operation.Status == AsyncOperationStatus.Failed) GlobalLog.Error(LogFilter.UserMod, $"[{Constants.Name}] Failed to load addressables catalog!"); else - GameManager.Instance.Game.Assets.RegisterResourceLocator(operation.Result); + GameManager.Instance.Assets.RegisterResourceLocator(operation.Result); yield break; } @@ -230,7 +230,7 @@ private void VehicleStateChanged(MessageCenterMessage msg) { _button = AppBarButton.CreateButton($"BTN-{Constants.ID}", Constants.Name, OnAppBarButtonClicked); _button.Destroying += () => _button = null; - Game.Assets.LoadRaw(Constants.AppBarIconAssetKey).Completed += op => + Assets.LoadRaw(Constants.AppBarIconAssetKey).Completed += op => { if (_button is object) _button.Icon = op.Result; diff --git a/ksp2-inputbinder/ui/BindingUI.cs b/ksp2-inputbinder/ui/BindingUI.cs index c46359e..46f98f6 100644 --- a/ksp2-inputbinder/ui/BindingUI.cs +++ b/ksp2-inputbinder/ui/BindingUI.cs @@ -49,7 +49,7 @@ public Vector2 WindowPosition public void Initialize(Transform parent) { IsInitializing = true; - GameManager.Instance.Game.Assets.CreateAsync( + GameManager.Instance.Assets.CreateAsync( (Attribute.GetCustomAttribute(typeof(KSP2UIWindow), typeof(PrefabNameAttribute)) as PrefabNameAttribute).Prefab, parent, (result) => @@ -60,7 +60,7 @@ public void Initialize(Transform parent) foreach (var key in PrefabKeys.AllKeys) { _operationsInProgress++; - GameManager.Instance.Game.Assets.LoadAssetAsync(key) + GameManager.Instance.Assets.LoadAssetAsync(key) .Completed += operation => SinglePrefabLoadFinished(key, operation); } _allPrefabsQueued = true; From 8e023855ef391e27c55cc78d662d310b2f7da621 Mon Sep 17 00:00:00 2001 From: Codenade Date: Thu, 31 Aug 2023 01:03:05 +0200 Subject: [PATCH 2/2] New mod vesion 0.4.2 --- ksp2-inputbinder/Plugin.cs | 2 +- ksp2-inputbinder/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ksp2-inputbinder/Plugin.cs b/ksp2-inputbinder/Plugin.cs index 51ee694..9ecaf40 100644 --- a/ksp2-inputbinder/Plugin.cs +++ b/ksp2-inputbinder/Plugin.cs @@ -10,7 +10,7 @@ namespace Codenade.Inputbinder { - [BepInPlugin("codenade-inputbinder", "codenade-inputbinder", "0.4.1")]//PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] + [BepInPlugin("codenade-inputbinder", "codenade-inputbinder", "0.4.2")]//PluginInfo.PLUGIN_GUID, PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)] public class Plugin : BaseUnityPlugin { private void Awake() diff --git a/ksp2-inputbinder/Properties/AssemblyInfo.cs b/ksp2-inputbinder/Properties/AssemblyInfo.cs index 869cd57..4d6b72c 100644 --- a/ksp2-inputbinder/Properties/AssemblyInfo.cs +++ b/ksp2-inputbinder/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.4.1.0")] -[assembly: AssemblyFileVersion("0.4.1.0")] +[assembly: AssemblyVersion("0.4.2.0")] +[assembly: AssemblyFileVersion("0.4.2.0")]