diff --git a/.gitignore b/.gitignore index 3e62424..ecb55c4 100644 --- a/.gitignore +++ b/.gitignore @@ -274,3 +274,7 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml +SubnauticaModSystem/AutosortLockersSML/BZ/AutosortLockersSML.dll +SubnauticaModSystem/AutosortLockersSML/BZ/AutosortLockersSML.dll +*.dll +*.xml diff --git a/SubnauticaModSystem/AutosortLockers/AutosortLocker.cs b/SubnauticaModSystem/AutosortLockers/AutosortLocker.cs index c454801..17848c2 100644 --- a/SubnauticaModSystem/AutosortLockers/AutosortLocker.cs +++ b/SubnauticaModSystem/AutosortLockers/AutosortLocker.cs @@ -7,6 +7,14 @@ using SMLHelper.V2.Crafting; using UnityEngine; using UnityEngine.UI; +using UWE; +#if SUBNAUTICA + using RecipeData = SMLHelper.V2.Crafting.TechData; + using Sprite = Atlas.Sprite; +#elif BELOWZERO + using TMPro; +#endif + namespace AutosortLockers { @@ -28,10 +36,17 @@ public class AutosortLocker : MonoBehaviour private Image background; [SerializeField] private Image icon; +#if SUBNAUTICA [SerializeField] private Text text; [SerializeField] private Text sortingText; +#elif BELOWZERO + [SerializeField] + private TextMeshProUGUI text; + [SerializeField] + private TextMeshProUGUI sortingText; +#endif [SerializeField] private bool isSorting; [SerializeField] @@ -302,6 +317,7 @@ public AutosortLockerBuildable() public override TechCategory CategoryForPDA => TechCategory.InteriorModule; +#if SUBNAUTICA public override GameObject GetGameObject() { GameObject originalPrefab = CraftData.GetPrefabForTechType(TechType.SmallLocker); @@ -339,27 +355,95 @@ public override GameObject GetGameObject() return prefab; } +#endif + + public override IEnumerator GetGameObjectAsync(IOut gameObject) + { + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 1"); + CoroutineTask task = CraftData.GetPrefabForTechTypeAsync(TechType.SmallLocker); + yield return task; + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 2"); + GameObject originalPrefab = task.GetResult(); + GameObject prefab = GameObject.Instantiate(originalPrefab); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 3, prefab " + (prefab == null ? "is" : "is not") + " null"); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 4"); + // TEST + StorageContainer container = prefab.GetComponent(); + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 4.1, container.container is " + (container.container == null ? "is" : "is not") + " null"); + container.width = Mod.config.AutosorterWidth; + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 4.2"); + container.height = Mod.config.AutosorterHeight; + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 4.3"); + container.Resize(Mod.config.AutosorterWidth, Mod.config.AutosorterHeight); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 5"); + var meshRenderers = prefab.GetComponentsInChildren(); + foreach (var meshRenderer in meshRenderers) + { + meshRenderer.material.color = new Color(1, 0, 0); + } + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 6"); + var prefabText = prefab.GetComponentInChildren(); + //Logger.Log($"AutosortLockerBuildable.GetGameObjectAsync: 6.1, prefabText == {prefabText.ToString()}"); + var label = prefab.FindChild("Label"); + DestroyImmediate(label); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 7"); + var autoSorter = prefab.AddComponent(); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 8"); + var canvas = LockerPrefabShared.CreateCanvas(prefab.transform); + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 8.1"); + autoSorter.background = LockerPrefabShared.CreateBackground(canvas.transform); + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 8.2"); + autoSorter.icon = LockerPrefabShared.CreateIcon(autoSorter.background.transform, MainColor, 40); + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 8.3: prefabText " + (prefabText == null ? "is" : "is not") + " null"); + autoSorter.text = LockerPrefabShared.CreateText(autoSorter.background.transform, prefabText, MainColor, 0, 14, "Autosorter"); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 9"); + autoSorter.sortingText = LockerPrefabShared.CreateText(autoSorter.background.transform, prefabText, MainColor, -120, 12, "Sorting..."); +#if SUBNAUTICA + autoSorter.sortingText.alignment = TextAnchor.UpperCenter; +#elif BELOWZERO + autoSorter.sortingText.alignment = TextAlignmentOptions.Top; +#endif + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 10"); + autoSorter.background.gameObject.SetActive(false); + autoSorter.icon.gameObject.SetActive(false); + autoSorter.text.gameObject.SetActive(false); + autoSorter.sortingText.gameObject.SetActive(false); + + //Logger.Log("AutosortLockerBuildable.GetGameObjectAsync: 11"); + //return prefab; + gameObject.Set(prefab); + yield break; + } - protected override TechData GetBlueprintRecipe() + protected override RecipeData GetBlueprintRecipe() { - return new TechData + return new RecipeData() { craftAmount = 1, Ingredients = Mod.config.EasyBuild ? new List - { - new Ingredient(TechType.Titanium, 2) - } + { + new Ingredient(TechType.Titanium, 2) + } : new List - { - new Ingredient(TechType.Titanium, 2), - new Ingredient(TechType.ComputerChip, 1), - new Ingredient(TechType.AluminumOxide, 2) - } + { + new Ingredient(TechType.Titanium, 2), + new Ingredient(TechType.ComputerChip, 1), + new Ingredient(TechType.AluminumOxide, 2) + } }; } - protected override Atlas.Sprite GetItemSprite() + protected override Sprite GetItemSprite() { return SMLHelper.V2.Utility.ImageUtils.LoadSpriteFromFile(Mod.GetAssetPath("AutosortLocker.png")); } diff --git a/SubnauticaModSystem/AutosortLockers/AutosortLockers.csproj b/SubnauticaModSystem/AutosortLockers/AutosortLockersSML.csproj similarity index 63% rename from SubnauticaModSystem/AutosortLockers/AutosortLockers.csproj rename to SubnauticaModSystem/AutosortLockers/AutosortLockersSML.csproj index 8c1c9af..9d4456b 100644 --- a/SubnauticaModSystem/AutosortLockers/AutosortLockers.csproj +++ b/SubnauticaModSystem/AutosortLockers/AutosortLockersSML.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties AutosortLockers AutosortLockersSML - v4.0 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,77 +37,104 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + false + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + false + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll - False + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\QModInstaller.dll + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll False - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.InputLegacyModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.InputLegacyModule.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Physics2DModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Physics2DModule.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.PhysicsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.PhysicsModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextCoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextCoreModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll + False + + + $(GameDir)\$(DataFolder)\Managed\Unity.TextMeshPro.dll False @@ -114,6 +143,7 @@ + @@ -139,27 +169,22 @@ - - - PreserveNewest - - ResXFileCodeGenerator Resources.Designer.cs - + + + + - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i - -xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\EpicGames\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +copy $(ProjectDir)mod_$(ConfigurationName).json $(GameDir)\QMods\$(ProjectName)\mod.json /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i + \ No newline at end of file diff --git a/SubnauticaModSystem/AutosortLockers/AutosortTarget.cs b/SubnauticaModSystem/AutosortLockers/AutosortTarget.cs index c311362..110810f 100644 --- a/SubnauticaModSystem/AutosortLockers/AutosortTarget.cs +++ b/SubnauticaModSystem/AutosortLockers/AutosortTarget.cs @@ -7,6 +7,13 @@ using SMLHelper.V2.Crafting; using UnityEngine; using UnityEngine.UI; +using UWE; +#if SUBNAUTICA + using RecipeData = SMLHelper.V2.Crafting.TechData; + using Sprite = Atlas.Sprite; +#elif BELOWZERO +using TMPro; +#endif namespace AutosortLockers { @@ -23,8 +30,29 @@ public class AutosortTarget : MonoBehaviour private Coroutine plusCoroutine; private SaveDataEntry saveData; +#if SUBNAUTICA [SerializeField] private Text textPrefab; + [SerializeField] + private Text text; + [SerializeField] + private Text label; + [SerializeField] + private Text plus; + [SerializeField] + private Text quantityText; +#elif BELOWZERO + [SerializeField] + private TextMeshProUGUI textPrefab; + [SerializeField] + private TextMeshProUGUI text; + [SerializeField] + private TextMeshProUGUI label; + [SerializeField] + private TextMeshProUGUI plus; + [SerializeField] + private TextMeshProUGUI quantityText; +#endif [SerializeField] private Image background; [SerializeField] @@ -38,14 +66,6 @@ public class AutosortTarget : MonoBehaviour [SerializeField] private Image customizeButtonImage; [SerializeField] - private Text text; - [SerializeField] - private Text label; - [SerializeField] - private Text plus; - [SerializeField] - private Text quantityText; - [SerializeField] private List currentFilters = new List(); private void Awake() @@ -370,10 +390,28 @@ private void Initialize() UpdateText(); + // Moved to FinalSetup + //CreatePicker(); + //CreateCustomizeScreen(); + StartCoroutine("FinalSetup"); + initialized = true; + } + + internal bool bPrefabsLoaded = false; + internal GameObject lockerPrefab; + + private IEnumerator FinalSetup() + { + IPrefabRequest request = PrefabDatabase.GetPrefabForFilenameAsync("Submarine/Build/SmallLocker.prefab"); + yield return request; + request.TryGetPrefab(out GameObject prefab); + lockerPrefab = prefab; + bPrefabsLoaded = true; + CreatePicker(); CreateCustomizeScreen(); - initialized = true; + yield break; } private void InitializeFromSaveData() @@ -472,7 +510,7 @@ private void CreatePicker() private void CreateCustomizeScreen() { - customizeScreen = CustomizeScreen.Create(background.transform, saveData); + customizeScreen = CustomizeScreen.Create(background.transform, saveData, lockerPrefab); customizeScreen.onModified += InitializeFromSaveData; customizeScreen.Initialize(saveData); customizeScreen.gameObject.SetActive(false); @@ -534,21 +572,36 @@ public AutosortTargetBuildable() public override TechCategory CategoryForPDA => TechCategory.InteriorModule; - public override GameObject GetGameObject() + public override IEnumerator GetGameObjectAsync(IOut gameObject) { - GameObject prefab = GetPrefab(TechType.SmallLocker); + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 1"); + TaskResult result = new TaskResult(); + yield return GetPrefabAsync(TechType.SmallLocker, result); + + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 2"); + GameObject basePrefab = result.Get(); + GameObject prefab = GameObject.Instantiate(basePrefab); + + + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 3"); StorageContainer container = prefab.GetComponent(); + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 3.1"); container.width = Mod.config.ReceptacleWidth; + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 3.2"); container.height = Mod.config.ReceptacleHeight; - container.container.Resize(Mod.config.ReceptacleWidth, Mod.config.ReceptacleHeight); + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 3.3, container.container " + (container.container == null ? "is" : "is not") + " null"); + container.Resize(Mod.config.ReceptacleWidth, Mod.config.ReceptacleHeight); - return prefab; + //Logger.Log("AutosortTargetBuildable.GetGameObjectAsync: 4"); + + gameObject.Set(prefab); + yield break; } - protected override TechData GetBlueprintRecipe() + protected override RecipeData GetBlueprintRecipe() { - return new TechData + return new RecipeData { craftAmount = 1, Ingredients = Mod.config.EasyBuild @@ -564,7 +617,7 @@ protected override TechData GetBlueprintRecipe() }; } - protected override Atlas.Sprite GetItemSprite() + protected override Sprite GetItemSprite() { return SMLHelper.V2.Utility.ImageUtils.LoadSpriteFromFile(Mod.GetAssetPath("AutosortTarget.png")); } @@ -583,21 +636,34 @@ public AutosortStandingTargetBuildable() public override TechCategory CategoryForPDA => TechCategory.InteriorModule; - public override GameObject GetGameObject() + public override IEnumerator GetGameObjectAsync(IOut gameObject) { - var prefab = GetPrefab(TechType.Locker); + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 1"); + + TaskResult result = new TaskResult(); + yield return GetPrefabAsync(TechType.Locker, result); + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 2"); - var container = prefab.GetComponent(); + GameObject basePrefab = result.Get(); + GameObject prefab = GameObject.Instantiate(basePrefab); + + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 3"); + StorageContainer container = prefab.GetComponent(); + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 3.1"); container.width = Mod.config.StandingReceptacleWidth; + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 3.2"); container.height = Mod.config.StandingReceptacleHeight; - container.container.Resize(Mod.config.StandingReceptacleWidth, Mod.config.StandingReceptacleHeight); + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 3.3, container.container " + (container.container == null ? "is" : "is not") + " null"); + container.Resize(Mod.config.StandingReceptacleWidth, Mod.config.StandingReceptacleHeight); - return prefab; + //Logger.Log("AutosortStandingTargetBuildable.GetGameObjectAsync: 4"); + gameObject.Set(prefab); + yield break; } - protected override TechData GetBlueprintRecipe() + protected override RecipeData GetBlueprintRecipe() { - return new TechData + return new RecipeData { craftAmount = 1, Ingredients = Mod.config.EasyBuild @@ -615,7 +681,7 @@ protected override TechData GetBlueprintRecipe() }; } - protected override Atlas.Sprite GetItemSprite() + protected override Sprite GetItemSprite() { return SMLHelper.V2.Utility.ImageUtils.LoadSpriteFromFile(Mod.GetAssetPath("AutosortTargetStanding.png")); } @@ -631,9 +697,13 @@ public static void AddBuildable() sorterStandingTarget.Patch(); } - public static GameObject GetPrefab(TechType basePrefab) + public static IEnumerator GetPrefabAsync(TechType basePrefab, IOut gameObject) { - GameObject originalPrefab = CraftData.GetPrefabForTechType(basePrefab); + //Logger.Log($"GetPrefabAsync() executing for basePrefab TechType.{basePrefab.AsString()}"); + CoroutineTask task = CraftData.GetPrefabForTechTypeAsync(basePrefab); + yield return task; + + GameObject originalPrefab = task.GetResult(); GameObject prefab = GameObject.Instantiate(originalPrefab); var meshRenderers = prefab.GetComponentsInChildren(); @@ -644,8 +714,18 @@ public static GameObject GetPrefab(TechType basePrefab) var autosortTarget = prefab.AddComponent(); - var smallLockerPrefab = CraftData.GetPrefabForTechType(TechType.SmallLocker); + task = CraftData.GetPrefabForTechTypeAsync(TechType.SmallLocker); + yield return task; + //var smallLockerPrefab = CraftData.GetPrefabForTechType(TechType.SmallLocker); + + //Logger.Log($"GetPrefabAsync() attempting to instantiate smallLockerPrefab"); + var smallLockerPrefab = GameObject.Instantiate(task.GetResult()); + //Logger.Log($"GetPrefabAsync() attempting to instantiate autosortTarget; smallLockerPrefab " + (smallLockerPrefab == null ? "is" : "is not") + " null"); +#if SUBNAUTICA autosortTarget.textPrefab = GameObject.Instantiate(smallLockerPrefab.GetComponentInChildren()); +#elif BELOWZERO + autosortTarget.textPrefab = GameObject.Instantiate(smallLockerPrefab.GetComponentInChildren()); +#endif var label = prefab.FindChild("Label"); DestroyImmediate(label); @@ -677,7 +757,9 @@ public static GameObject GetPrefab(TechType basePrefab) autosortTarget.customizeButton = ConfigureButton.Create(autosortTarget.background.transform, autosortTarget.textPrefab.color, 20); autosortTarget.customizeButtonImage = autosortTarget.customizeButton.GetComponent(); - return prefab; + //return prefab; + //originalPrefab.SetActive(false); + gameObject.Set(prefab); } } } diff --git a/SubnauticaModSystem/AutosortLockers/AutosortTypePicker.cs b/SubnauticaModSystem/AutosortLockers/AutosortTypePicker.cs index 6c70d0d..3290a73 100644 --- a/SubnauticaModSystem/AutosortLockers/AutosortTypePicker.cs +++ b/SubnauticaModSystem/AutosortLockers/AutosortTypePicker.cs @@ -3,6 +3,9 @@ using System.Linq; using Common.Mod; using Common.Utility; +#if BELOWZERO + using TMPro; +#endif using UnityEngine; using UnityEngine.UI; @@ -29,8 +32,13 @@ private enum Mode { Categories, Items } private Image[] underlines = new Image[2]; [SerializeField] private PickerCloseButton closeButton; +#if SUBNAUTICA [SerializeField] private Text pageText; +#elif BELOWZERO + [SerializeField] + private TextMeshProUGUI pageText; +#endif [SerializeField] private PickerPageButton prevPageButton; [SerializeField] @@ -167,7 +175,13 @@ private void SetCurrentPage(int page) - public static AutosortTypePicker Create(Transform parent, Text textPrefab) + public static AutosortTypePicker Create(Transform parent, +#if SUBNAUTICA + Text textPrefab +#elif BELOWZERO + TextMeshProUGUI textPrefab +#endif + ) { var picker = LockerPrefabShared.CreateCanvas(parent).gameObject.AddComponent(); picker.GetComponent().sortingLayerID = 0; @@ -253,7 +267,13 @@ public static PickerCloseButton AddCloseButton(Transform parent) return closeButton; } - public static PickerButton CreatePickerButton(Transform parent, int x, int y, Text textPrefab, Action action, int width = 100) + public static PickerButton CreatePickerButton(Transform parent, int x, int y, +#if SUBNAUTICA + Text textPrefab, +#elif BELOWZERO + TextMeshProUGUI textPrefab, +#endif + Action action, int width = 100) { var button = PickerButton.Create(parent, textPrefab, action, width); diff --git a/SubnauticaModSystem/AutosortLockers/AutosorterCategories.cs b/SubnauticaModSystem/AutosortLockers/AutosorterCategories.cs index 2873056..85af185 100644 --- a/SubnauticaModSystem/AutosortLockers/AutosorterCategories.cs +++ b/SubnauticaModSystem/AutosortLockers/AutosorterCategories.cs @@ -1,4 +1,8 @@ -using Oculus.Newtonsoft.Json; +#if SUBNAUTICA +using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +#endif using System; using System.Collections; using System.Collections.Generic; @@ -6,6 +10,7 @@ using System.IO; using System.Linq; using UnityEngine; +using static HandReticle; namespace AutosortLockers { @@ -53,6 +58,19 @@ public static class AutosorterCategoryData TechType.Peeper, TechType.Reginald, TechType.Spadefish, +#if BELOWZERO + TechType.SpinnerFish, + TechType.Symbiote, + TechType.ArcticPeeper, + TechType.ArrowRay, + TechType.NootFish, + TechType.Triops, + TechType.FeatherFish, + TechType.FeatherFishRed, + TechType.DiscusFish, + TechType.Penguin, + TechType.PenguinBaby +#endif }; public static List AlterraArtifacts = new List { @@ -125,7 +143,38 @@ public static class AutosorterCategoryData TechType.LavaLizardEgg, TechType.LavaLizardEggUndiscovered, TechType.CrabsnakeEggUndiscovered, - TechType.SpadefishEggUndiscovered + TechType.SpadefishEggUndiscovered, +#if BELOWZERO + TechType.SeaMonkeyEgg, + TechType.ArcticRayEgg, + TechType.ArcticRayEggUndiscovered, + TechType.BruteSharkEgg, + TechType.BruteSharkEggUndiscovered, + TechType.LilyPaddlerEgg, + TechType.LilyPaddlerEggUndiscovered, + TechType.PinnacaridEgg, + TechType.PinnacaridEggUndiscovered, + TechType.SquidSharkEgg, + TechType.SquidSharkEggUndiscovered, + TechType.TitanHolefishEgg, + TechType.TitanHolefishEggUndiscovered, + TechType.TrivalveBlueEgg, + TechType.TrivalveYellowEgg, + TechType.TrivalveBlueEggUndiscovered, + TechType.TrivalveYellowEggUndiscovered, + TechType.BrinewingEgg, + TechType.BrinewingEggUndiscovered, + TechType.CryptosuchusEgg, + TechType.CryptosuchusEggUndiscovered, + TechType.GlowWhaleEgg, + TechType.GlowWhaleEggUndiscovered, + TechType.JellyfishEgg, + TechType.JellyfishEggUndiscovered, + TechType.PenguinEgg, + TechType.PenguinEggUndiscovered, + TechType.RockPuncherEgg, + TechType.RockPuncherEggUndiscovered +#endif }; public static List Food = new List { @@ -165,6 +214,31 @@ public static class AutosorterCategoryData TechType.HangingFruit, TechType.Melon, TechType.PurpleVegetable, +#if BELOWZERO + TechType.CookedSpinnerfish, + TechType.CookedSymbiote, + TechType.CookedArcticPeeper, + TechType.CookedArrowRay, + TechType.CookedNootFish, + TechType.CookedTriops, + TechType.CookedFeatherFish, + TechType.CookedFeatherFishRed, + TechType.CookedDiscusFish, + TechType.WaterPurificationTablet, + TechType.SpicyFruitSalad, + TechType.CuredSpinnerfish, + TechType.CuredSymbiote, + TechType.CuredArcticPeeper, + TechType.CuredArrowRay, + TechType.CuredNootFish, + TechType.CuredTriops, + TechType.CuredFeatherFish, + TechType.CuredFeatherFishRed, + TechType.CuredDiscusFish, + TechType.HeatFruit, + TechType.LeafyFruit, + TechType.IceFruit, +#endif }; public static List Water = new List { @@ -173,6 +247,9 @@ public static class AutosorterCategoryData TechType.DisinfectedWater, TechType.FilteredWater, TechType.StillsuitWater, +#if BELOWZERO + TechType.WaterPurificationTablet, +#endif }; public static List ScannerRoomUpgrades = new List { @@ -221,6 +298,18 @@ public static class AutosorterCategoryData TechType.VehicleHullModule3, TechType.VehiclePowerUpgradeModule, TechType.VehicleStorageModule, +#if BELOWZERO + TechType.SeaTruckUpgradeAfterburner, + TechType.SeaTruckUpgradeThruster, + TechType.SeaTruckUpgradeEnergyEfficiency, + TechType.SeaTruckUpgradePerimeterDefense, + TechType.SeaTruckUpgradeHorsePower, + TechType.SeaTruckUpgradeHull1, + TechType.SeaTruckUpgradeHull2, + TechType.SeaTruckUpgradeHull3, + TechType.HoverbikeJumpModule, + TechType.HoverbikeIceWormReductionModule +#endif }; public static List Equipment = new List { @@ -238,7 +327,15 @@ public static class AutosorterCategoryData TechType.Stillsuit, TechType.SwimChargeFins, TechType.Tank, +#if BELOWZERO TechType.UltraGlideFins, + TechType.ColdSuit, + TechType.ColdSuitGloves, + TechType.ColdSuitHelmet, + TechType.SuitBoosterTank, + TechType.Constructor, + TechType.Hoverbike, +#endif }; public static List Tools = new List { @@ -266,7 +363,17 @@ public static class AutosorterCategoryData TechType.SmallStorage, TechType.StasisRifle, TechType.Welder, +#if BELOWZERO TechType.LuggageBag, + TechType.Thumper, + TechType.TeleportationTool, + TechType.MetalDetector, + TechType.FlashlightHelmet, + TechType.QuantumLocker, + TechType.SnowBall, + TechType.SpyPenguin, + TechType.SpyPenguinRemote, +#endif }; public static List Torpedoes = new List { @@ -284,6 +391,7 @@ public static class AutosorterCategoryData TechType.FernPalmSeed, TechType.GabeSFeatherSeed, TechType.HangingFruit, + TechType.JellyPlant, TechType.JellyPlantSeed, TechType.KooshChunk, TechType.Melon, @@ -314,6 +422,18 @@ public static class AutosorterCategoryData TechType.SpikePlantSeed, TechType.SpottedLeavesPlantSeed, TechType.WhiteMushroomSpore, +#if BELOWZERO + TechType.KelpRootPustule, + TechType.KelpRootPustuleSeed, + TechType.GenericRibbonSeed, + TechType.FrozenRiverPlant2, + TechType.FrozenRiverPlant2Seeds, + TechType.GenericSpiralChunk, + TechType.DeepLilyShroom, + TechType.DeepLilyShroomSeed, + TechType.SmallMaroonPlantSeed, + TechType.LilyPadResource, +#endif }; public static List Metals = new List { @@ -342,6 +462,9 @@ public static class AutosorterCategoryData TechType.SeaTreaderPoop, TechType.StalkerTooth, TechType.JellyPlant, +#if BELOWZERO + TechType.SnowStalkerFur, +#endif }; public static List Electronics = new List { @@ -367,6 +490,9 @@ public static class AutosorterCategoryData TechType.Polyaniline, TechType.PrecursorIonCrystal, TechType.Silicone, +#if BELOWZERO + TechType.HydraulicFluid, +#endif }; public static List CrystalMaterials = new List { diff --git a/SubnauticaModSystem/AutosortLockers/CanvasLink_Patch.cs b/SubnauticaModSystem/AutosortLockers/CanvasLink_Patch.cs new file mode 100644 index 0000000..aea3859 --- /dev/null +++ b/SubnauticaModSystem/AutosortLockers/CanvasLink_Patch.cs @@ -0,0 +1,59 @@ +using HarmonyLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace AutosortLockers +{ + [HarmonyPatch(typeof(CanvasLink))] + public class CanvasLink_Patch + { + private static FieldInfo canvasesInfo = typeof(CanvasLink).GetField("canvases", BindingFlags.NonPublic | BindingFlags.Instance); + /* + private void SetCanvasesEnabled(bool enabled) + { + Canvas[] array = this.canvases; + for (int i = 0; i < array.Length; i++) + { + array[i].enabled = enabled; + } + } + */ + [HarmonyPatch("SetCanvasesEnabled")] + [HarmonyPrefix] + public static bool PrefixSetCanvasesEnabled(ref CanvasLink __instance) + { + if (__instance == null) + return false; + + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"PrefixSetCanvasesEnabled(): begin"); + Canvas[] array = (Canvas[])(canvasesInfo.GetValue(__instance)); + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"PrefixSetCanvasesEnabled(): canvases array " + ((array == null || array.Length < 1) ? "not " : "") + "successfully retrieved"); + List list = new List(); + if (array != null && array.Length > 0) + { + for (int i = 0; i < array.Length; i++) + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"PrefixSetCanvasesEnabled(): checking canvas array index {i}"); + if (array[i] != null) + { + list.Add(array[i]); + } + else + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"PrefixSetCanvasesEnabled(): Found null entry in canvas array at index {i}"); + } + + } + canvasesInfo.SetValue(__instance, list.ToArray()); + } + + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"PrefixSetCanvasesEnabled(): end"); + return true; + } + } +} diff --git a/SubnauticaModSystem/AutosortLockers/ColorPicker.cs b/SubnauticaModSystem/AutosortLockers/ColorPicker.cs index 2889211..ae86d78 100644 --- a/SubnauticaModSystem/AutosortLockers/ColorPicker.cs +++ b/SubnauticaModSystem/AutosortLockers/ColorPicker.cs @@ -54,7 +54,7 @@ public override void Open() /////////////////////////////////////////////////////////////////////////////////////////////////////////////// - public static ColorPicker Create(Transform parent) + public static ColorPicker Create(Transform parent, GameObject lockerPrefab = null) { var beaconColorPicker = new GameObject("ColorPicker", typeof(RectTransform)).AddComponent(); @@ -63,8 +63,7 @@ public static ColorPicker Create(Transform parent) beaconColorPicker.ButtonsPerPage = 72; beaconColorPicker.ButtonsPerRow = 8; - Picker.Create(parent, beaconColorPicker, Mod.colors.Count); - + Picker.Create(parent, beaconColorPicker, Mod.colors.Count, lockerPrefab); return beaconColorPicker; } } diff --git a/SubnauticaModSystem/AutosortLockers/ColorPickerButton.cs b/SubnauticaModSystem/AutosortLockers/ColorPickerButton.cs index 1c97187..baf4ac1 100644 --- a/SubnauticaModSystem/AutosortLockers/ColorPickerButton.cs +++ b/SubnauticaModSystem/AutosortLockers/ColorPickerButton.cs @@ -4,6 +4,9 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +#if SUBNAUTICA + using Sprite = Atlas.Sprite; +#endif namespace AutosortLockers { @@ -31,13 +34,13 @@ public void OnPointerClick(PointerEventData eventData) onClick(id); } - public void Initialize(int id, Color color, bool toggled, Sprite imageSprite) + /*public void Initialize(int id, Color color, bool toggled, Sprite imageSprite) { - var sprite = new Atlas.Sprite(imageSprite); + Sprite sprite = new Sprite(imageSprite); Initialize(id, color, toggled, sprite); - } + }*/ - public void Initialize(int id, Color color, bool toggled, Atlas.Sprite imageSprite) + public void Initialize(int id, Color color, bool toggled, Sprite imageSprite) { this.id = id; this.toggled = toggled; diff --git a/SubnauticaModSystem/AutosortLockers/ColorSetting.cs b/SubnauticaModSystem/AutosortLockers/ColorSetting.cs index bf727f2..3085754 100644 --- a/SubnauticaModSystem/AutosortLockers/ColorSetting.cs +++ b/SubnauticaModSystem/AutosortLockers/ColorSetting.cs @@ -5,6 +5,9 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +#if BELOWZERO +using TMPro; +#endif namespace AutosortLockers { @@ -21,11 +24,18 @@ private void Awake() rectTransform = transform as RectTransform; } +#if SUBNAUTICA private void Initialize(Text textPrefab, string label) { activeButton = ColoredIconButton.Create(transform, CustomizeScreen.ScreenContentColor, textPrefab, label, 100, 15); activeButton.text.supportRichText = true; } +#elif BELOWZERO + private void Initialize(TextMeshProUGUI textPrefab, string label) + { + activeButton = ColoredIconButton.Create(transform, CustomizeScreen.ScreenContentColor, textPrefab, label, 100, 15); + } +#endif internal void SetInitialValue(Color initialColor) { @@ -45,10 +55,14 @@ private void OnClick() /////////////////////////////////////////////////////////////////////////////////////////// - public static ColorSetting Create(Transform parent, string label) + public static ColorSetting Create(Transform parent, string label, GameObject lockerPrefab = null) { - var lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); +#if SUBNAUTICA + lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#elif BELOWZERO + var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#endif textPrefab.fontSize = 12; textPrefab.color = new Color32(66, 134, 244, 255); diff --git a/SubnauticaModSystem/AutosortLockers/ColoredIconButton.cs b/SubnauticaModSystem/AutosortLockers/ColoredIconButton.cs index a453539..9028604 100644 --- a/SubnauticaModSystem/AutosortLockers/ColoredIconButton.cs +++ b/SubnauticaModSystem/AutosortLockers/ColoredIconButton.cs @@ -8,6 +8,10 @@ using UnityEngine.EventSystems; using UnityEngine.UI; +#if BELOWZERO +using TMPro; +#endif + namespace AutosortLockers { public class ColoredIconButton : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler @@ -23,7 +27,11 @@ public class ColoredIconButton : MonoBehaviour, IPointerClickHandler, IPointerEn public Color imageColor; public Image image; +#if SUBNAUTICA public Text text; +#elif BELOWZERO + public TextMeshProUGUI text; +#endif public Action onClick = delegate { }; private Color imageDisabledColor; @@ -89,7 +97,13 @@ public void OnPointerUp(PointerEventData eventData) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - public static ColoredIconButton Create(Transform parent, Color color, Text textPrefab = null, string label = "", float width = 100, float iconWidth = 20) + public static ColoredIconButton Create(Transform parent, Color color, +#if SUBNAUTICA + Text textPrefab = null, +#elif BELOWZERO + TextMeshProUGUI textPrefab = null, +#endif + string label = "", float width = 100, float iconWidth = 20) { var checkboxButton = new GameObject("Checkbox", typeof(RectTransform)); var rt = checkboxButton.transform as RectTransform; @@ -101,14 +115,22 @@ public static ColoredIconButton Create(Transform parent, Color color, Text textP RectTransformExtensions.SetSize(checkbox.rectTransform, iconWidth, iconWidth); checkbox.rectTransform.anchoredPosition = new Vector2(textPrefab != null ? - width / 2 + 10 : 0, 0); +#if SUBNAUTICA Text text = null; +#elif BELOWZERO + TextMeshProUGUI text = null; +#endif if (textPrefab != null) { var spacing = 5; text = LockerPrefabShared.CreateText(rt, textPrefab, color, 0, 10, label); RectTransformExtensions.SetSize(text.rectTransform, width - 20 - spacing, 20); text.rectTransform.anchoredPosition = new Vector2(10 + spacing, 0); +#if SUBNAUTICA text.alignment = TextAnchor.MiddleLeft; +#elif BELOWZERO + text.alignment = TextAlignmentOptions.MidlineLeft; +#endif } checkboxButton.AddComponent(); diff --git a/SubnauticaModSystem/AutosortLockers/Config.cs b/SubnauticaModSystem/AutosortLockers/Config.cs index 4cc282a..5b44924 100644 --- a/SubnauticaModSystem/AutosortLockers/Config.cs +++ b/SubnauticaModSystem/AutosortLockers/Config.cs @@ -1,4 +1,8 @@ -using Oculus.Newtonsoft.Json; +#if SUBNAUTICA +using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +#endif namespace AutosortLockers { diff --git a/SubnauticaModSystem/AutosortLockers/CustomizeScreen.cs b/SubnauticaModSystem/AutosortLockers/CustomizeScreen.cs index 09debf6..c56708e 100644 --- a/SubnauticaModSystem/AutosortLockers/CustomizeScreen.cs +++ b/SubnauticaModSystem/AutosortLockers/CustomizeScreen.cs @@ -6,6 +6,11 @@ using System.Text; using UnityEngine; using UnityEngine.UI; +using UWE; +using System.Collections; +#if BELOWZERO +using TMPro; +#endif namespace AutosortLockers { @@ -20,7 +25,11 @@ class CustomizeScreen : MonoBehaviour [SerializeField] private Image background; [SerializeField] +#if SUBNAUTICA private Text labelLabel; +#elif BELOWZERO + private TextMeshProUGUI labelLabel; +#endif [SerializeField] private LabelController label; [SerializeField] @@ -174,10 +183,14 @@ private void OnLockerColorPicked(int index) ////////////////////////////////////////////////////////////////////////////////////////////////////////////// - public static CustomizeScreen Create(Transform parent, SaveDataEntry data) + public static CustomizeScreen Create(Transform parent, SaveDataEntry data, GameObject lockerPrefab = null) { - var lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); +#if SUBNAUTICA + lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#elif BELOWZERO + var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#endif textPrefab.fontSize = 12; textPrefab.color = CustomizeScreen.ScreenContentColor; @@ -192,31 +205,35 @@ public static CustomizeScreen Create(Transform parent, SaveDataEntry data) screen.labelLabel = LockerPrefabShared.CreateText(screen.background.transform, textPrefab, ScreenContentColor, 100, 9, "Label:"); RectTransformExtensions.SetSize(screen.labelLabel.rectTransform, 90, 40); +#if SUBNAUTICA screen.labelLabel.alignment = TextAnchor.MiddleLeft; +#elif BELOWZERO + screen.labelLabel.alignment = TextAlignmentOptions.MidlineLeft; +#endif - screen.label = LabelController.Create(data, screen.background.transform); + screen.label = LabelController.Create(data, screen.background.transform, lockerPrefab); screen.label.rectTransform.anchoredPosition = new Vector2(0, 80); screen.exitButton = ConfigureButton.Create(screen.background.transform, Color.white, 40); var startX = 0; var startY = 30; - screen.labelColorSetting = ColorSetting.Create(screen.background.transform, "Label Color"); + screen.labelColorSetting = ColorSetting.Create(screen.background.transform, "Label Color", lockerPrefab); screen.labelColorSetting.rectTransform.anchoredPosition = new Vector2(startX, startY); - screen.iconColorSetting = ColorSetting.Create(screen.background.transform, "Icon Color"); + screen.iconColorSetting = ColorSetting.Create(screen.background.transform, "Icon Color", lockerPrefab); screen.iconColorSetting.rectTransform.anchoredPosition = new Vector2(startX, startY - 19); - screen.textColorSetting = ColorSetting.Create(screen.background.transform, "Filters Color"); + screen.textColorSetting = ColorSetting.Create(screen.background.transform, "Filters Color", lockerPrefab); screen.textColorSetting.rectTransform.anchoredPosition = new Vector2(startX, startY - (19 * 2)); - screen.buttonsColorSetting = ColorSetting.Create(screen.background.transform, "Misc Color"); + screen.buttonsColorSetting = ColorSetting.Create(screen.background.transform, "Misc Color", lockerPrefab); screen.buttonsColorSetting.rectTransform.anchoredPosition = new Vector2(startX, startY - (19 * 3)); - screen.lockerColorSetting = ColorSetting.Create(screen.background.transform, "Locker Color"); + screen.lockerColorSetting = ColorSetting.Create(screen.background.transform, "Locker Color", lockerPrefab); screen.lockerColorSetting.rectTransform.anchoredPosition = new Vector2(startX, startY - (19 * 4)); - screen.colorPicker = ColorPicker.Create(screen.background.transform); + screen.colorPicker = ColorPicker.Create(screen.background.transform, lockerPrefab); screen.colorPicker.gameObject.SetActive(false); screen.colorPicker.rectTransform.anchoredPosition = new Vector2(0, 30); diff --git a/SubnauticaModSystem/AutosortLockers/LabelController.cs b/SubnauticaModSystem/AutosortLockers/LabelController.cs index 9f1d516..a602598 100644 --- a/SubnauticaModSystem/AutosortLockers/LabelController.cs +++ b/SubnauticaModSystem/AutosortLockers/LabelController.cs @@ -5,6 +5,9 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +#if BELOWZERO +using TMPro; +#endif namespace AutosortLockers { @@ -14,7 +17,11 @@ class LabelController : MonoBehaviour, IPointerClickHandler, IPointerEnterHandle public RectTransform rectTransform; public Action onModified = delegate { }; +#if SUBNAUTICA public Text text; +#elif BELOWZERO + public TextMeshProUGUI text; +#endif [SerializeField] private SaveDataEntry target; @@ -24,7 +31,11 @@ private void Awake() rectTransform = transform as RectTransform; } +#if SUBNAUTICA private void Initialize(SaveDataEntry data, Text textPrefab) +#elif BELOWZERO + private void Initialize(SaveDataEntry data, TextMeshProUGUI textPrefab) +#endif { target = data; @@ -65,17 +76,25 @@ private void Update() if (hover) { HandReticle.main.SetIcon(HandReticle.IconType.Rename); +#if SUBNAUTICA HandReticle.main.SetInteractTextRaw("Set Locker Label", ""); +#elif BELOWZERO + HandReticle.main.SetTextRaw(HandReticle.TextType.Hand, "Set Locker Label"); +#endif } } /////////////////////////////////////////////////////////////////////////////////////////// - public static LabelController Create(SaveDataEntry data, Transform parent) + public static LabelController Create(SaveDataEntry data, Transform parent, GameObject lockerPrefab = null) { - var lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); +#if SUBNAUTICA + lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#elif BELOWZERO + var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#endif textPrefab.fontSize = 12; textPrefab.color = CustomizeScreen.ScreenContentColor; diff --git a/SubnauticaModSystem/AutosortLockers/Mod.cs b/SubnauticaModSystem/AutosortLockers/Mod.cs index f617fa2..282cb5f 100644 --- a/SubnauticaModSystem/AutosortLockers/Mod.cs +++ b/SubnauticaModSystem/AutosortLockers/Mod.cs @@ -4,15 +4,24 @@ using System.IO; using System.Reflection; using Common.Mod; -using Harmony; +using HarmonyLib; +#if SUBNAUTICA using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +using SMLHelper.V2.Handlers; +#endif using UnityEngine; +using UWE; namespace AutosortLockers { internal static class Mod { public const string SaveDataFilename = "AutosortLockerSMLSaveData.json"; + + private const int MAX_LOCKER_WIDTH = 8; + private const int MAX_LOCKER_HEIGHT = 10; public static Config config; public static SaveData saveData; public static List colors = new List(); @@ -31,7 +40,7 @@ public static void Patch(string modDirectory = null) AddBuildables(); - HarmonyInstance harmony = HarmonyInstance.Create("com.AutosortLockersSML.mod"); + Harmony harmony = new Harmony("com.AutosortLockersSML.mod"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.Log("Patched"); @@ -58,7 +67,7 @@ private static void LoadConfig() config = ModUtils.LoadConfig(GetModPath() + "/config.json"); ValidateConfig(); - var serializedColors = JsonConvert.DeserializeObject>(File.ReadAllText(GetAssetPath("colors.json"))); + List serializedColors = JsonConvert.DeserializeObject< List >(File.ReadAllText(GetAssetPath("colors.json"))); foreach (var sColor in serializedColors) { colors.Add(sColor.ToColor()); @@ -70,10 +79,12 @@ private static void ValidateConfig() Config defaultConfig = new Config(); ModUtils.ValidateConfigValue("SortInterval", 0.1f, 10.0f, ref config, ref defaultConfig); - ModUtils.ValidateConfigValue("AutosorterWidth", 1, 8, ref config, ref defaultConfig); - ModUtils.ValidateConfigValue("AutosorterHeight", 1, 10, ref config, ref defaultConfig); - ModUtils.ValidateConfigValue("ReceptacleWidth", 1, 8, ref config, ref defaultConfig); - ModUtils.ValidateConfigValue("ReceptacleHeight", 1, 10, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("AutosorterWidth", 1, MAX_LOCKER_WIDTH, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("AutosorterHeight", 1, MAX_LOCKER_HEIGHT, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("ReceptacleWidth", 1, MAX_LOCKER_WIDTH, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("ReceptacleHeight", 1, MAX_LOCKER_HEIGHT, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("StandingReceptacleWidth", 1, MAX_LOCKER_WIDTH, ref config, ref defaultConfig); + ModUtils.ValidateConfigValue("StandingReceptacleHeight", 1, MAX_LOCKER_HEIGHT, ref config, ref defaultConfig); } public static SaveData GetSaveData() diff --git a/SubnauticaModSystem/AutosortLockers/Patches/Initializer_Patch.cs b/SubnauticaModSystem/AutosortLockers/Patches/Initializer_Patch.cs index 70f33e5..3f60dd3 100644 --- a/SubnauticaModSystem/AutosortLockers/Patches/Initializer_Patch.cs +++ b/SubnauticaModSystem/AutosortLockers/Patches/Initializer_Patch.cs @@ -1,5 +1,5 @@  -using Harmony; +using HarmonyLib; namespace AutosortLockers.Patches { diff --git a/SubnauticaModSystem/AutosortLockers/Picker.cs b/SubnauticaModSystem/AutosortLockers/Picker.cs index 7e75d8b..6e73b24 100644 --- a/SubnauticaModSystem/AutosortLockers/Picker.cs +++ b/SubnauticaModSystem/AutosortLockers/Picker.cs @@ -6,6 +6,9 @@ using System.Text; using UnityEngine; using UnityEngine.UI; +#if BELOWZERO + using TMPro; +#endif namespace AutosortLockers { @@ -32,7 +35,11 @@ class Picker : MonoBehaviour [SerializeField] private ColorPickerPageButton nextPageButton; [SerializeField] +#if SUBNAUTICA private Text pageText; +#elif BELOWZERO + private TextMeshProUGUI pageText; +#endif [SerializeField] protected List buttons = new List(); @@ -171,10 +178,15 @@ public void Close() /////////////////////////////////////////////////////////////////////////////////////////////////////// - protected static void Create(Transform parent, Picker instance, int buttonCount) + + protected static void Create(Transform parent, Picker instance, int buttonCount, GameObject lockerPrefab = null) { - var lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); +#if SUBNAUTICA + lockerPrefab = Resources.Load("Submarine/Build/SmallLocker"); var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#elif BELOWZERO + var textPrefab = Instantiate(lockerPrefab.GetComponentInChildren()); +#endif textPrefab.fontSize = 16; textPrefab.color = ScreenContentColor; diff --git a/SubnauticaModSystem/AutosortLockers/PickerButton.cs b/SubnauticaModSystem/AutosortLockers/PickerButton.cs index 5c9f294..88ea9e5 100644 --- a/SubnauticaModSystem/AutosortLockers/PickerButton.cs +++ b/SubnauticaModSystem/AutosortLockers/PickerButton.cs @@ -6,6 +6,9 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +#if BELOWZERO + using TMPro; +#endif namespace AutosortLockers { @@ -26,7 +29,11 @@ public class PickerButton : MonoBehaviour, IPointerClickHandler, IPointerEnterHa [SerializeField] private Image background; [SerializeField] +#if SUBNAUTICA private Text text; +#elif BELOWZERO + private TextMeshProUGUI text; +#endif public AutosorterFilter GetTechType() { @@ -99,7 +106,13 @@ public void SetTabActive(bool active) - public static PickerButton Create(Transform parent, Text textPrefab, Action action, int width = 100, int height = 18) + public static PickerButton Create(Transform parent, +#if SUBNAUTICA + Text textPrefab, +#elif BELOWZERO + TextMeshProUGUI textPrefab, +#endif + Action action, int width = 100, int height = 18) { var button = new GameObject("PickerButton", typeof(RectTransform)).AddComponent(); button.transform.SetParent(parent, false); @@ -112,13 +125,18 @@ public static PickerButton Create(Transform parent, Text textPrefab, Action(); + button.text.alignment = TextAnchor.MiddleCenter; +#elif BELOWZERO + button.text = new GameObject("TextMeshProUGUI", typeof(RectTransform)).AddComponent(); + button.text.alignment = TextAlignmentOptions.Center; +#endif RectTransformExtensions.SetParams(button.text.rectTransform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), button.transform); RectTransformExtensions.SetSize(button.text.rectTransform, width, height); button.text.color = new Color(1, 1, 1); button.text.font = textPrefab.font; button.text.fontSize = 10; - button.text.alignment = TextAnchor.MiddleCenter; button.onClick += action; diff --git a/SubnauticaModSystem/AutosortLockers/mod.json b/SubnauticaModSystem/AutosortLockers/mod_BZ.json similarity index 90% rename from SubnauticaModSystem/AutosortLockers/mod.json rename to SubnauticaModSystem/AutosortLockers/mod_BZ.json index 0a7eed4..d55260d 100644 --- a/SubnauticaModSystem/AutosortLockers/mod.json +++ b/SubnauticaModSystem/AutosortLockers/mod_BZ.json @@ -1,4 +1,5 @@ { + "Game": "BelowZero", "Id": "AutosortLockersSML", "DisplayName": "Autosort Lockers SML", "Author": "RandyKnapp w/PrimeSonic", diff --git a/SubnauticaModSystem/AutosortLockers/mod_SN1.json b/SubnauticaModSystem/AutosortLockers/mod_SN1.json new file mode 100644 index 0000000..f59a68e --- /dev/null +++ b/SubnauticaModSystem/AutosortLockers/mod_SN1.json @@ -0,0 +1,10 @@ +{ + "Game": "Subnautica", + "Id": "AutosortLockersSML", + "DisplayName": "Autosort Lockers SML", + "Author": "RandyKnapp w/PrimeSonic", + "Version": "2.0.0", + "Requires": [ "SMLHelper" ], + "Enable": true, + "AssemblyName": "AutosortLockersSML.dll" +} \ No newline at end of file diff --git a/SubnauticaModSystem/BaseTeleporters/BaseTeleporters.csproj b/SubnauticaModSystem/BaseTeleporters/BaseTeleporters.csproj index facf459..46906f2 100644 --- a/SubnauticaModSystem/BaseTeleporters/BaseTeleporters.csproj +++ b/SubnauticaModSystem/BaseTeleporters/BaseTeleporters.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties BaseTeleporters BaseTeleporters - v3.5 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -33,27 +35,49 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony.dll + $(GameDir)\$(DataFolder)\Managed\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-UnityScript.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-UnityScript.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-UnityScript-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-UnityScript-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll @@ -62,25 +86,25 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Analytics.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Analytics.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Networking.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Networking.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.PerformanceTesting.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.PerformanceTesting.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.VR.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.VR.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityScript.Lang.dll + $(GameDir)\$(DataFolder)\Managed\UnityScript.Lang.dll @@ -100,8 +124,8 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(TargetName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(TargetName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(TargetName)\Assets\ /q /y /i /s + xcopy $(TargetPath) $(GameDir)\QMods\$(TargetName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(TargetName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(TargetName)\Assets\ /q /y /i /s \ No newline at end of file diff --git a/SubnauticaModSystem/BaseTeleporters/Mod.cs b/SubnauticaModSystem/BaseTeleporters/Mod.cs index 82433fd..e9f9291 100644 --- a/SubnauticaModSystem/BaseTeleporters/Mod.cs +++ b/SubnauticaModSystem/BaseTeleporters/Mod.cs @@ -1,6 +1,6 @@ using Common.Mod; using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; diff --git a/SubnauticaModSystem/BaseTeleporters/Patches/BuilderUtils_Patches.cs b/SubnauticaModSystem/BaseTeleporters/Patches/BuilderUtils_Patches.cs index 1d35500..66293de 100644 --- a/SubnauticaModSystem/BaseTeleporters/Patches/BuilderUtils_Patches.cs +++ b/SubnauticaModSystem/BaseTeleporters/Patches/BuilderUtils_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using UnityEngine; using UWE; diff --git a/SubnauticaModSystem/BaseTeleporters/Patches/Teleporter_Patches.cs b/SubnauticaModSystem/BaseTeleporters/Patches/Teleporter_Patches.cs index f819305..1b1aaa3 100644 --- a/SubnauticaModSystem/BaseTeleporters/Patches/Teleporter_Patches.cs +++ b/SubnauticaModSystem/BaseTeleporters/Patches/Teleporter_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/BetterPowerInfo/BetterPowerInfo.csproj b/SubnauticaModSystem/BetterPowerInfo/BetterPowerInfo.csproj index 73566c1..593ea0b 100644 --- a/SubnauticaModSystem/BetterPowerInfo/BetterPowerInfo.csproj +++ b/SubnauticaModSystem/BetterPowerInfo/BetterPowerInfo.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties BetterPowerInfo BetterPowerInfo - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,20 +37,45 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 8.0 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 8.0 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll + + + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -57,31 +84,31 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.InputLegacyModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.InputLegacyModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -128,10 +155,10 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y -xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\SubnauticaZero\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\SubnauticaZero\QMods\$(ProjectName)\ /q /y +xcopy $(TargetPath) $(GameDir)Zero\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)Zero\QMods\$(ProjectName)\ /q /y - \ No newline at end of file + diff --git a/SubnauticaModSystem/BetterPowerInfo/Mod.cs b/SubnauticaModSystem/BetterPowerInfo/Mod.cs index 899e58a..3983f41 100644 --- a/SubnauticaModSystem/BetterPowerInfo/Mod.cs +++ b/SubnauticaModSystem/BetterPowerInfo/Mod.cs @@ -1,5 +1,5 @@ using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.IO; using System.Reflection; diff --git a/SubnauticaModSystem/BetterPowerInfo/ModLoaderIntegration.cs b/SubnauticaModSystem/BetterPowerInfo/ModLoaderIntegration.cs index 9f56606..83319ee 100644 --- a/SubnauticaModSystem/BetterPowerInfo/ModLoaderIntegration.cs +++ b/SubnauticaModSystem/BetterPowerInfo/ModLoaderIntegration.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Reflection; using UnityEngine; diff --git a/SubnauticaModSystem/BetterPowerInfo/Patches/uGUI_PowerIndicator_Initialize_Patch.cs b/SubnauticaModSystem/BetterPowerInfo/Patches/uGUI_PowerIndicator_Initialize_Patch.cs index 1a863ae..720c043 100644 --- a/SubnauticaModSystem/BetterPowerInfo/Patches/uGUI_PowerIndicator_Initialize_Patch.cs +++ b/SubnauticaModSystem/BetterPowerInfo/Patches/uGUI_PowerIndicator_Initialize_Patch.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Harmony; +using HarmonyLib; using System.Reflection; namespace BetterPowerInfo.Patches diff --git a/SubnauticaModSystem/BetterScannerBlips/BetterScannerBlips.csproj b/SubnauticaModSystem/BetterScannerBlips/BetterScannerBlips.csproj index dfda4e5..a9ad289 100644 --- a/SubnauticaModSystem/BetterScannerBlips/BetterScannerBlips.csproj +++ b/SubnauticaModSystem/BetterScannerBlips/BetterScannerBlips.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties BetterScannerBlips BetterScannerBlips - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,49 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll - - False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll + False - - False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp_publicized.dll + False + + + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,34 +88,39 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.InputLegacyModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.InputLegacyModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll + + + $(GameDir)\$(DataFolder)\Managed\Unity.TextMeshPro.dll + False + @@ -101,6 +133,7 @@ True Resources.resx + @@ -116,12 +149,12 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + rem xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +rem xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +rem xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i -xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\EpicGames\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i +rem xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y +rem xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y +rem xcopy $(ProjectDir)Assets D:\EpicGames\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i \ No newline at end of file diff --git a/SubnauticaModSystem/BetterScannerBlips/BlipIdentifier.cs b/SubnauticaModSystem/BetterScannerBlips/BlipIdentifier.cs new file mode 100644 index 0000000..da24146 --- /dev/null +++ b/SubnauticaModSystem/BetterScannerBlips/BlipIdentifier.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; + +namespace BetterScannerBlips +{ + /*internal class BlipIdentifier : MonoBehaviour + { + // A component added to a GUI scanner blip that stores information about the actual TechType of a fragment, allowing the code to identify exactly what type of Fragment the object is + + internal string uniqueId; + internal TechType actualTechType { get + { + return ResourceTrackerPatches.GetTechTypeForId(this.uniqueId); + } + } + }*/ +} diff --git a/SubnauticaModSystem/BetterScannerBlips/Config.cs b/SubnauticaModSystem/BetterScannerBlips/Config.cs index 0f4fca7..e5ffdd9 100644 --- a/SubnauticaModSystem/BetterScannerBlips/Config.cs +++ b/SubnauticaModSystem/BetterScannerBlips/Config.cs @@ -3,7 +3,7 @@ namespace BetterScannerBlips { [Serializable] - class Config + public class Config { public float MaxRange = 200.0f; public float MaxRangeScale = 0.2f; @@ -21,5 +21,17 @@ class Config public bool ShowDistance = true; public bool NoText = false; public string ToggleKey = "l"; + + // Added by DaWrecka; if bUseScreenDistance, then distance is counted as distance on screen from the crosshair, expressed as a fraction of total screen real estate. + // The maximum such distance is 0.5, because the crosshair is always dead-centre of the screen. + public bool bUseScreenDistance = false; + public float MaxScreenRange = 0.5f; + public float MaxScreenRangeScale = 0.2f; + public float CloseScreenRange = 0.15f; + public float CloseScreenRangeScale = 1.0f; + public float MinScreenRange = 0.1f; + public float MinScreenRangeScale = 10.0f; + public float TextScreenRange = 0.2f; + public float AlphaOutScreenRange = 0.2f; } } diff --git a/SubnauticaModSystem/BetterScannerBlips/CustomBlip.cs b/SubnauticaModSystem/BetterScannerBlips/CustomBlip.cs index f28585c..dbc48b5 100644 --- a/SubnauticaModSystem/BetterScannerBlips/CustomBlip.cs +++ b/SubnauticaModSystem/BetterScannerBlips/CustomBlip.cs @@ -1,22 +1,42 @@ -using Common.Utility; +using BetterScannerBlips.Patches; +using Common.Utility; using System; using System.Collections.Generic; using System.Linq; using System.Text; +#if BELOWZERO +using TMPro; +#endif using UnityEngine; using UnityEngine.UI; namespace BetterScannerBlips { - class CustomBlip : MonoBehaviour + public class CustomBlip : MonoBehaviour { private static Color circleColor; private static Color textColor; private Image image; +#if SN1 private Text text; +#elif BELOWZERO + private TextMeshProUGUI text; +#endif private TechType techType; private string resourceName; + private string lastID = ""; // Last unique identifier we were attached to. As long as the current ID matches this, we shouldn't need to retrieve the string. + // Randy's original code didn't take this into account; and in fairness, he may not have needed to take it into account at all. + // This code was originally based on Subnautica 1, and this behaviour may not have happened there. + // However, in BZ, a given blip might be moved around - for example, a blip may initially be highlighting a Seaglide fragment, but later on - be it frames, seconds, whatever - + // it might instead be highlighting a Seatruck fragment. Wouldn't be a problem under normal circumstances, but since we want proper text for these blips... + // Not only that, but since every blip from a given map room would've been showing the exact same text anyway, blips moving around didn't matter, until we wanted blips with different text. + + public void ResetCustomBlip() + { + this.techType = TechType.None; + this.resourceName = ""; + } public static void InitializeColors() { @@ -36,20 +56,29 @@ public static void InitializeColors() private void Awake() { image = gameObject.GetComponent(); +#if SN1 text = gameObject.GetComponentInChildren(); +#elif BELOWZERO + text = gameObject.GetComponentInChildren(); +#endif } +#if SN1 public void Refresh(ResourceTracker.ResourceInfo target) +#elif BELOWZERO + public void Refresh(ResourceTrackerDatabase.ResourceInfo target) +#endif { if (target != null) { var vectorToPlayer = Player.main.transform.position - target.position; var distance = vectorToPlayer.magnitude; - if (resourceName == string.Empty || techType != target.techType) + if (techType != target.techType || target.techType == TechType.Fragment) { techType = target.techType; - resourceName = Language.main.Get(techType); + if(!ResourceTrackerPatches.TryGetResourceName(target.uniqueId, out resourceName)) + resourceName = Language.main.Get(techType); } RefreshColor(distance); diff --git a/SubnauticaModSystem/BetterScannerBlips/Mod.cs b/SubnauticaModSystem/BetterScannerBlips/Mod.cs index 8c6ca73..94bc249 100644 --- a/SubnauticaModSystem/BetterScannerBlips/Mod.cs +++ b/SubnauticaModSystem/BetterScannerBlips/Mod.cs @@ -1,19 +1,23 @@ using Common.Mod; using Common.Utility; -using Harmony; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Reflection; using UnityEngine; +using HarmonyLib; +#if SUBNAUTICA using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +#endif using System.Threading; using System.Globalization; namespace BetterScannerBlips { - static class Mod + public static class Mod { public static Config config; @@ -24,7 +28,7 @@ public static void Patch(string modDirectory = null) Mod.modDirectory = modDirectory ?? "Subnautica_Data/Managed"; LoadConfig(); - HarmonyInstance harmony = HarmonyInstance.Create("com.BetterScannerBlips.mod"); + var harmony = new Harmony("com.BetterScannerBlips.mod"); harmony.PatchAll(Assembly.GetExecutingAssembly()); CustomBlip.InitializeColors(); diff --git a/SubnauticaModSystem/BetterScannerBlips/Patches/ResourceTrackerPatches.cs b/SubnauticaModSystem/BetterScannerBlips/Patches/ResourceTrackerPatches.cs new file mode 100644 index 0000000..c777950 --- /dev/null +++ b/SubnauticaModSystem/BetterScannerBlips/Patches/ResourceTrackerPatches.cs @@ -0,0 +1,135 @@ +using QLogger = QModManager.Utility.Logger; +using HarmonyLib; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using UnityEngine; +using UWE; + + +namespace BetterScannerBlips.Patches +{ + [HarmonyPatch(typeof(ResourceTracker))] + public class ResourceTrackerPatches + { + internal static Dictionary IdToGameObjectDict = new Dictionary(); + internal static Dictionary IdToTechTypeDict = new Dictionary(); + internal static Dictionary IdToResourceNameDict = new Dictionary(); + internal static readonly FieldInfo uniqueIdInfo = typeof(ResourceTracker).GetField("uniqueId", BindingFlags.Instance | BindingFlags.NonPublic); + internal static readonly FieldInfo TechTypeInfo = typeof(ResourceTracker).GetField("techType", BindingFlags.Instance | BindingFlags.NonPublic); + +/* + [HarmonyPatch(nameof(ResourceTracker.Start))] + [HarmonyPrefix] + public static bool PreStart(ref ResourceTracker __instance) + { + if (__instance.overrideTechType == TechType.Fragment) + { + __instance.overrideTechType = TechType.None; + } + + return true; + } +*/ + + [HarmonyPatch("Register")] + [HarmonyPrefix] + public static void PreRegister(ref ResourceTracker __instance) + { + GameObject go = __instance.gameObject; + TechType gameTechType = (go != null ? CraftData.GetTechType(go) : TechType.None); + //TechType tt = ((__instance.overrideTechType == TechType.None) ? gameTechType : __instance.overrideTechType); + if (gameTechType == TechType.Fragment || __instance.overrideTechType == TechType.Fragment) // We only need to concern ourselves with fragments + { + string uniqueId = __instance.prefabIdentifier.Id; + QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"ResourceTrackerPatches.PreRegister() running on ResourceTracker with unique ID {uniqueId}, overrideTechType {__instance.overrideTechType} and techType {gameTechType}"); + + if (!string.IsNullOrEmpty(uniqueId)) + { + string resourceName = Language.main.Get(gameTechType); + QLogger.Log(QLogger.Level.Debug, $"Registering resource names for fragment:\nUnique ID: {uniqueId}\nTechType: {gameTechType.AsString()}\nResource name: {resourceName}"); + IdToGameObjectDict[uniqueId] = __instance.gameObject; + IdToTechTypeDict[uniqueId] = gameTechType; + IdToResourceNameDict[uniqueId] = resourceName; + } + + //__instance.overrideTechType = TechType.None; + } + } + + /* + [HarmonyPatch("Register")] + [HarmonyPostfix] + public static void PostRegister(ref ResourceTracker __instance) + { + TechType tt = (TechType)TechTypeInfo.GetValue(__instance); + if (tt == TechType.Fragment || __instance.overrideTechType == TechType.Fragment) + { + string uniqueId = __instance.prefabIdentifier.Id; + GameObject go = __instance.gameObject; + TechType resourceType = (go == null ? TechType.None : CraftData.GetTechType(go)); + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"ResourceTrackerPatches.PostRegister() running on ResourceTracker with unique ID {uniqueId}, overrideTechType {__instance.overrideTechType} and techType {resourceType}"); + + //TechType actualTechType = CraftData.GetTechType(__instance.gameObject); + if (!string.IsNullOrEmpty(uniqueId)) + { + if (__instance.gameObject != null) + { + IdToGameObjectDict[uniqueId] = __instance.gameObject; + } + IdToTechTypeDict[uniqueId] = resourceType; + IdToResourceNameDict[uniqueId] = Language.main.Get(resourceType); + } + } + + //if((TechType)TechTypeInfo.GetValue(__instance) == TechType.Fragment) + //CoroutineHost.StartCoroutine(RegisterResourceTrackerCoroutine(__instance)); + } + */ + + [HarmonyPatch("Unregister")] + [HarmonyPostfix] + public static void PostUnregister(ref ResourceTracker __instance) + { + string uniqueId = (string)uniqueIdInfo.GetValue(__instance); + if (!string.IsNullOrEmpty(uniqueId)) + { + IdToGameObjectDict.Remove(uniqueId); + IdToTechTypeDict.Remove(uniqueId); + IdToResourceNameDict.Remove(uniqueId); + } + } + + public static TechType GetTechTypeForId(string uniqueId) + { + if (!string.IsNullOrEmpty(uniqueId)) + { + if (IdToTechTypeDict.TryGetValue(uniqueId, out TechType tt)) + { + if(tt != TechType.Fragment) + return tt; + } + else if (IdToGameObjectDict.TryGetValue(uniqueId, out GameObject go)) + { + if(go != null) + return CraftData.GetTechType(go); + } + } + + return TechType.None; + } + + public static bool TryGetResourceName(string uniqueId, out string resourceName) + { + bool result = IdToResourceNameDict.TryGetValue(uniqueId, out resourceName); + + QLogger.Log(QLogger.Level.Debug, $"Attempting to retrieve resource name for unique ID '{uniqueId}': Result is {result}" + (result ? $", retrieved string '{resourceName}'" : "")); + + return result; + } + } +} diff --git a/SubnauticaModSystem/BetterScannerBlips/Patches/uGUI_ResourceTracker_UpdateBlips_Patch.cs b/SubnauticaModSystem/BetterScannerBlips/Patches/uGUI_ResourceTracker_UpdateBlips_Patch.cs index 2627f82..10ad2e1 100644 --- a/SubnauticaModSystem/BetterScannerBlips/Patches/uGUI_ResourceTracker_UpdateBlips_Patch.cs +++ b/SubnauticaModSystem/BetterScannerBlips/Patches/uGUI_ResourceTracker_UpdateBlips_Patch.cs @@ -1,17 +1,23 @@ using Common.Mod; -using Harmony; +using HarmonyLib; +#if SN1 +using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +#endif using System; using System.Collections; using System.Collections.Generic; +using System.Linq; using System.Reflection; +using System.Reflection.Emit; using UnityEngine; using UnityEngine.UI; namespace BetterScannerBlips.Patches { [HarmonyPatch(typeof(uGUI_ResourceTracker))] - [HarmonyPatch("UpdateBlips")] - class uGUI_ResourceTracker_UpdateBlips_Patch + internal class uGUI_ResourceTracker_UpdateBlips_Patch { private static readonly FieldInfo uGUI_ResourceTracker_blips = typeof(uGUI_ResourceTracker).GetField("blips", BindingFlags.NonPublic | BindingFlags.Instance); private static readonly FieldInfo uGUI_ResourceTracker_nodes = typeof(uGUI_ResourceTracker).GetField("nodes", BindingFlags.NonPublic | BindingFlags.Instance); @@ -19,6 +25,8 @@ class uGUI_ResourceTracker_UpdateBlips_Patch private static bool hide = false; + [HarmonyPrefix] + [HarmonyPatch("UpdateBlips")] private static bool Prefix(uGUI_ResourceTracker __instance) { if (__instance != null && __instance.blip != null) @@ -33,6 +41,8 @@ private static bool Prefix(uGUI_ResourceTracker __instance) return true; } + [HarmonyPostfix] + [HarmonyPatch("UpdateBlips")] private static void Postfix(uGUI_ResourceTracker __instance) { if (Blip_gameObject == null) @@ -47,14 +57,22 @@ private static void Postfix(uGUI_ResourceTracker __instance) ErrorMessage.AddDebug(string.Format("Scanner Blips Toggled: {0}", hide ? $"OFF (Press {Mod.config.ToggleKey} to show)" : "ON")); } - HashSet nodes = (HashSet)uGUI_ResourceTracker_nodes.GetValue(__instance); +#if SN1 + HashSet nodes = (HashSet)uGUI_ResourceTracker_nodes.GetValue(__instance); +#elif BELOWZERO + HashSet nodes = (HashSet)uGUI_ResourceTracker_nodes.GetValue(__instance); +#endif IList blips = (IList)uGUI_ResourceTracker_blips.GetValue(__instance); Camera camera = MainCamera.camera; Vector3 position = camera.transform.position; Vector3 forward = camera.transform.forward; int i = 0; +#if SN1 foreach (ResourceTracker.ResourceInfo resourceInfo in nodes) +#elif BELOWZERO + foreach (ResourceTrackerDatabase.ResourceInfo resourceInfo in nodes) +#endif { Vector3 lhs = resourceInfo.position - position; if (Vector3.Dot(lhs, forward) > 0f) diff --git a/SubnauticaModSystem/BetterScannerBlips/Properties/Resources.Designer.cs b/SubnauticaModSystem/BetterScannerBlips/Properties/Resources.Designer.cs index b1e2a3d..987dcd1 100644 --- a/SubnauticaModSystem/BetterScannerBlips/Properties/Resources.Designer.cs +++ b/SubnauticaModSystem/BetterScannerBlips/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace BetterScannerBlips.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/SubnauticaModSystem/BlueprintTracker/BlueprintTracker.csproj b/SubnauticaModSystem/BlueprintTracker/BlueprintTracker.csproj index cb7edf1..401e6d0 100644 --- a/SubnauticaModSystem/BlueprintTracker/BlueprintTracker.csproj +++ b/SubnauticaModSystem/BlueprintTracker/BlueprintTracker.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,49 +10,57 @@ Properties BlueprintTracker BlueprintTracker - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 - - true - full - false - bin\Debug\ - DEBUG;TRACE + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 prompt - 4 - false - - pdbonly + + SN1;SUBNAUTICA_STABLE + true true - bin\Release\ - TRACE + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 prompt - 4 - false Always - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll - - False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll + False - - False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp_publicized.dll + False - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll + + + False + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -60,28 +69,35 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll + + + $(GameDir)\$(DataFolder)\Managed\UnityEngine.InputLegacyModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll + + + $(GameDir)\$(DataFolder)\Managed\Unity.TextMeshPro.dll + False diff --git a/SubnauticaModSystem/BlueprintTracker/Mod.cs b/SubnauticaModSystem/BlueprintTracker/Mod.cs index e8b8761..1c61ab4 100644 --- a/SubnauticaModSystem/BlueprintTracker/Mod.cs +++ b/SubnauticaModSystem/BlueprintTracker/Mod.cs @@ -1,6 +1,6 @@ using Common.Mod; using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.IO; using System.Linq; @@ -27,7 +27,7 @@ public static void Patch(string modDirectory = null) Mod.modDirectory = modDirectory ?? "Subnautica_Data/Managed"; LoadConfig(); - HarmonyInstance harmony = HarmonyInstance.Create("com.blueprinttracker.mod"); + var harmony = new Harmony("com.blueprinttracker.mod"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Logger.Log("Patched"); diff --git a/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_BlueprintEntry_SetIcon_Patch.cs b/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_BlueprintEntry_SetIcon_Patch.cs index d3836d7..43ea6e1 100644 --- a/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_BlueprintEntry_SetIcon_Patch.cs +++ b/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_BlueprintEntry_SetIcon_Patch.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; namespace BlueprintTracker.Patches { diff --git a/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_PowerIndicator_Initialize_Patch.cs b/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_PowerIndicator_Initialize_Patch.cs index ecc4833..225b071 100644 --- a/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_PowerIndicator_Initialize_Patch.cs +++ b/SubnauticaModSystem/BlueprintTracker/Patches/uGUI_PowerIndicator_Initialize_Patch.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System.Reflection; using UnityEngine; diff --git a/SubnauticaModSystem/BlueprintTracker/Properties/Resources.Designer.cs b/SubnauticaModSystem/BlueprintTracker/Properties/Resources.Designer.cs index eb50062..6dfc5d6 100644 --- a/SubnauticaModSystem/BlueprintTracker/Properties/Resources.Designer.cs +++ b/SubnauticaModSystem/BlueprintTracker/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace BlueprintTracker.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/SubnauticaModSystem/Common/Mod/LockerPrefabShared.cs b/SubnauticaModSystem/Common/Mod/LockerPrefabShared.cs index ef9eca8..4b0e249 100644 --- a/SubnauticaModSystem/Common/Mod/LockerPrefabShared.cs +++ b/SubnauticaModSystem/Common/Mod/LockerPrefabShared.cs @@ -1,11 +1,14 @@ using UnityEngine; using UnityEngine.UI; +#if BELOWZERO +using TMPro; +#endif namespace Common.Mod { public static class LockerPrefabShared { - internal static Canvas CreateCanvas(Transform parent) + internal static Canvas CreateCanvas(Transform parent) { var canvas = new GameObject("Canvas", typeof(RectTransform)).AddComponent(); var t = canvas.transform; @@ -59,9 +62,16 @@ internal static Image CreateIcon(Transform parent, Color color, int y) return icon; } +#if SN1 internal static Text CreateText(Transform parent, Text prefab, Color color, int y, int size, string initial) { var text = new GameObject("Text", typeof(RectTransform)).AddComponent(); +#elif BELOWZERO + internal static TextMeshProUGUI CreateText(Transform parent, TextMeshProUGUI prefab, Color color, int y, int size, string initial) + { + var text = new GameObject("TextMeshProUGUI", typeof(RectTransform)).AddComponent(); +#endif + var rt = text.rectTransform; RectTransformExtensions.SetParams(rt, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), parent); RectTransformExtensions.SetSize(rt, 120, 200); @@ -70,7 +80,11 @@ internal static Text CreateText(Transform parent, Text prefab, Color color, int text.font = prefab.font; text.fontSize = size; text.color = color; +#if SUBNAUTICA text.alignment = TextAnchor.MiddleCenter; +#elif BELOWZERO + text.alignment = TextAlignmentOptions.Center; +#endif text.text = initial; return text; diff --git a/SubnauticaModSystem/Common/Mod/ProtoBufSerializerPatcher.cs b/SubnauticaModSystem/Common/Mod/ProtoBufSerializerPatcher.cs index c7979c2..d413534 100644 --- a/SubnauticaModSystem/Common/Mod/ProtoBufSerializerPatcher.cs +++ b/SubnauticaModSystem/Common/Mod/ProtoBufSerializerPatcher.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Reflection; -using Harmony; +using HarmonyLib; using ProtoBuf; public class ProtobufSerializerPatcher @@ -28,7 +28,7 @@ public static bool Prefix_GetKeyImpl(Type key, ref int __result) return true; } - public static void Patch(HarmonyInstance instance) + public static void Patch(Harmony instance) { Type type = typeof(ProtobufSerializerPrecompiled); instance.Patch(type.GetMethod("Serialize", BindingFlags.NonPublic | BindingFlags.Instance), new HarmonyMethod(typeof(ProtobufSerializerPatcher).GetMethod("Prefix_Serialize")), null); diff --git a/SubnauticaModSystem/CustomPings/CustomBeacons.csproj b/SubnauticaModSystem/CustomPings/CustomBeacons.csproj index b34d4bb..e1a6472 100644 --- a/SubnauticaModSystem/CustomPings/CustomBeacons.csproj +++ b/SubnauticaModSystem/CustomPings/CustomBeacons.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties CustomBeacons CustomBeacons - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,31 +85,31 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Physics2DModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Physics2DModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -113,9 +137,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i /s + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i /s xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/CustomPings/Mod.cs b/SubnauticaModSystem/CustomPings/Mod.cs index 34f1cba..6e252b2 100644 --- a/SubnauticaModSystem/CustomPings/Mod.cs +++ b/SubnauticaModSystem/CustomPings/Mod.cs @@ -1,6 +1,6 @@ using Common.Mod; using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; diff --git a/SubnauticaModSystem/CustomPings/Patches/PingTab_Patches.cs b/SubnauticaModSystem/CustomPings/Patches/PingTab_Patches.cs index c69f7a3..5c6931d 100644 --- a/SubnauticaModSystem/CustomPings/Patches/PingTab_Patches.cs +++ b/SubnauticaModSystem/CustomPings/Patches/PingTab_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/CustomPings/Patches/Ping_Patches.cs b/SubnauticaModSystem/CustomPings/Patches/Ping_Patches.cs index e277fe2..2017687 100644 --- a/SubnauticaModSystem/CustomPings/Patches/Ping_Patches.cs +++ b/SubnauticaModSystem/CustomPings/Patches/Ping_Patches.cs @@ -1,6 +1,6 @@ using Common.Mod; using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.IO; diff --git a/SubnauticaModSystem/CustomizedStorage/CustomizedStorage.csproj b/SubnauticaModSystem/CustomizedStorage/CustomizedStorage.csproj index 02cd599..e8911c3 100644 --- a/SubnauticaModSystem/CustomizedStorage/CustomizedStorage.csproj +++ b/SubnauticaModSystem/CustomizedStorage/CustomizedStorage.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties CustomizedStorage CustomizedStorage - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,25 +37,47 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll False - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -62,28 +86,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -114,9 +138,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)config.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)config.json $(GameDir)\QMods\$(ProjectName)\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/CustomizedStorage/Mod.cs b/SubnauticaModSystem/CustomizedStorage/Mod.cs index 0bdfe4f..959f588 100644 --- a/SubnauticaModSystem/CustomizedStorage/Mod.cs +++ b/SubnauticaModSystem/CustomizedStorage/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using Oculus.Newtonsoft.Json; using System; using System.IO; diff --git a/SubnauticaModSystem/CustomizedStorage/Patches/Patches.cs b/SubnauticaModSystem/CustomizedStorage/Patches/Patches.cs index 40b41d9..13fdcf9 100644 --- a/SubnauticaModSystem/CustomizedStorage/Patches/Patches.cs +++ b/SubnauticaModSystem/CustomizedStorage/Patches/Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/CheckboxButton.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/CheckboxButton.cs index 4a37564..21ff8e5 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/CheckboxButton.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/CheckboxButton.cs @@ -4,6 +4,9 @@ using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; +#if BZ +using TMPro; +#endif namespace DockedVehicleStorageAccess { @@ -21,7 +24,11 @@ public class CheckboxButton : MonoBehaviour, IPointerClickHandler, IPointerEnter public RectTransform rectTransform; public Image image; +#if SN1 public Text text; +#elif BZ + public TextMeshProUGUI text; +#endif public Action onToggled = delegate { }; private Sprite checkedSprite = null; @@ -94,9 +101,14 @@ public void OnPointerUp(PointerEventData eventData) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#if SN1 public static CheckboxButton CreateCheckbox(Transform parent, Color color, Text textPrefab, string label, float width = 100) { - var checkboxButton = new GameObject("Checkbox", typeof(RectTransform)); +#elif BZ + public static CheckboxButton CreateCheckbox(Transform parent, Color color, TextMeshProUGUI textPrefab, string label, float width = 100) + { +#endif + var checkboxButton = new GameObject("Checkbox", typeof(RectTransform)); var rt = checkboxButton.transform as RectTransform; RectTransformExtensions.SetParams(rt, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), parent); RectTransformExtensions.SetSize(rt, width, 20); @@ -111,8 +123,11 @@ public static CheckboxButton CreateCheckbox(Transform parent, Color color, Text var text = LockerPrefabShared.CreateText(rt, textPrefab, color, 0, 10, label); RectTransformExtensions.SetSize(text.rectTransform, width - iconWidth - spacing, iconWidth); text.rectTransform.anchoredPosition = new Vector2(iconWidth / 2 + spacing, 0); +#if SN1 text.alignment = TextAnchor.MiddleLeft; - +#elif BZ + text.alignment = TextAlignmentOptions.MidlineLeft; +#endif checkboxButton.AddComponent(); var button = checkboxButton.AddComponent(); diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/Config.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/Config.cs index e13174c..c62fdce 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/Config.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/Config.cs @@ -1,9 +1,18 @@ -using Oculus.Newtonsoft.Json; +#if SUBNAUTICA +using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +using SMLHelper.V2.Json; +#endif namespace DockedVehicleStorageAccess { +#if !BELOWZERO [JsonObject] internal class Config +#else + internal class Config : ConfigFile +#endif { public int LockerWidth { get; set; } = 6; public int LockerHeight { get; set; } = 8; @@ -11,7 +20,9 @@ internal class Config public float ExtractInterval { get; set; } = 0.25f; public float AutosortTransferInterval { get; set; } = 0.25f; +#if !BELOWZERO [JsonIgnore] +#endif internal bool UseAutosortMod { get; set; } } } diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/DockedVehicleStorageAccess.csproj b/SubnauticaModSystem/DockedVehicleStorageAccess/DockedVehicleStorageAccess.csproj index 3b85e69..67eb5de 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/DockedVehicleStorageAccess.csproj +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/DockedVehicleStorageAccess.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties DockedVehicleStorageAccess DockedVehicleStorageAccessSML - v4.0 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,73 +37,98 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll - False + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\QModInstaller.dll + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll False - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll False + + $(GameDir)\$(DataFolder)\Managed\Unity.TextMeshPro.dll + False + - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.InputLegacyModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.InputLegacyModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Physics2DModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Physics2DModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.PhysicsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.PhysicsModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextCoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextCoreModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll False @@ -123,7 +150,10 @@ - + + PreserveNewest + + PreserveNewest @@ -136,12 +166,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i - -xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\EpicGames\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(AssemblyName)\ /q /y +copy $(ProjectDir)mod_$(Configuration).json "$(GameDir)\QMods\$(AssemblyName)\mod.json" /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(AssemblyName)\Assets\ /q /y /i + \ No newline at end of file diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/Mod.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/Mod.cs index 13ffebe..5da36f5 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/Mod.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/Mod.cs @@ -1,14 +1,19 @@ using System; using System.Reflection; using Common.Mod; -using Harmony; +using HarmonyLib; using QModManager.API; +using SMLHelper.V2.Handlers; namespace DockedVehicleStorageAccess { internal static class Mod { +#if !BELOWZERO public static Config config; +#else + public static Config config { get; } = OptionsPanelHandler.RegisterModOptions(); +#endif private static string modDirectory; @@ -21,8 +26,7 @@ public static void Patch(string modDirectory = null) AddBuildables(); - HarmonyInstance harmony = HarmonyInstance.Create("com.DockedVehicleStorageAccessSML.mod"); - harmony.PatchAll(Assembly.GetExecutingAssembly()); + new Harmony("com.DockedVehicleStorageAccessSML.mod").PatchAll(Assembly.GetExecutingAssembly()); Logger.Log("Patched"); } @@ -44,7 +48,9 @@ public static string GetAssetPath(string filename) private static void LoadConfig() { +#if !BELOWZERO config = ModUtils.LoadConfig(GetModPath() + "/config.json"); +#endif config.UseAutosortMod = QModServices.Main.ModPresent("AutosortLockersSML"); if (config.UseAutosortMod) diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/MoonpoolTerminalController.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/MoonpoolTerminalController.cs index 3f16274..6e0df65 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/MoonpoolTerminalController.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/MoonpoolTerminalController.cs @@ -1,5 +1,10 @@ using Common.Mod; +#if SUBNAUTICA using Oculus.Newtonsoft.Json; +#elif BELOWZERO +using Newtonsoft.Json; +using TMPro; +#endif using System; using System.Collections.Generic; using System.IO; @@ -37,13 +42,14 @@ class MoonpoolTerminalController : MonoBehaviour, IProtoEventListener private void Awake() { - var buttonPositionCenter = new Vector2(0, 0); - var buttonSpacing = 104; + Vector2 buttonPositionCenter = new Vector2(0, 0); + int buttonSpacing = 104; - var parent = GetComponentInChildren().transform; - var color = new Color32(189, 255, 255, 255); + Transform parent = GetComponentInChildren().transform; + Color32 color = new Color32(189, 255, 255, 255); - var text = new GameObject("label", typeof(RectTransform)).AddComponent(); +#if SN1 + Text text = new GameObject("label", typeof(RectTransform)).AddComponent(); RectTransformExtensions.SetParams(text.rectTransform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), parent); RectTransformExtensions.SetSize(text.rectTransform, 500, 140); text.rectTransform.anchoredPosition = buttonPositionCenter + new Vector2(0, 80); @@ -52,11 +58,22 @@ private void Awake() text.fontSize = Mathf.FloorToInt(GetComponentInChildren().fontSize * 1.8f); text.font = GetComponentInChildren().font; text.alignment = TextAnchor.MiddleCenter; +#elif BZ + TextMeshProUGUI text = new GameObject("label", typeof(RectTransform)).AddComponent(); + RectTransformExtensions.SetParams(text.rectTransform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), parent); + RectTransformExtensions.SetSize(text.rectTransform, 500, 140); + text.rectTransform.anchoredPosition = buttonPositionCenter + new Vector2(0, 80); + text.color = GetComponentInChildren().color; + text.text = "Position"; + text.fontSize = Mathf.FloorToInt(GetComponentInChildren().fontSize * 1.8f); + text.font = GetComponentInChildren().font; + text.alignment = TextAlignmentOptions.Midline; +#endif text.raycastTarget = false; - for (int i = 0; i < 4; ++i) + for (int i = 0; i < 4; i++) { - var button = CheckboxButton.CreateCheckboxNoText(parent, color, 100); + CheckboxButton button = CheckboxButton.CreateCheckboxNoText(parent, color, 100); button.Initialize(); button.toggled = false; button.rectTransform.anchoredPosition = buttonPositionCenter + new Vector2((-1.5f + i) * buttonSpacing, 0); diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/Patches/DockingBay_Patches.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/Patches/DockingBay_Patches.cs index 83e57e7..64f7478 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/Patches/DockingBay_Patches.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/Patches/DockingBay_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; @@ -11,7 +11,6 @@ namespace DockedVehicleStorageAccess.Patches { [HarmonyPatch(typeof(VehicleDockingBay))] - [HarmonyPatch("Start")] class VehicleDockingBay_Start_Patch { private static readonly MethodInfo CyclopsVehicleStorageTerminalManager_OnDockedChanged = typeof(CyclopsVehicleStorageTerminalManager).GetMethod("OnDockedChanged", BindingFlags.NonPublic | BindingFlags.Instance); @@ -19,18 +18,36 @@ class VehicleDockingBay_Start_Patch private static GameObject prefab; private static bool requestingPrefab; + [HarmonyPatch("Start")] private static void Postfix(VehicleDockingBay __instance) { + // in SN1, VehicleDockingBay.subRoot will either be of type BaseRoot, if the docking bay in question is in a habitat, or of SubRoot, if it's in a Cyclops. + // But subRoot always seems to be Null in BZ, so something else needs to be done + + // Of course, this assumes we can figure out an alternative to the Cyclops terminal used by default. +#if SN1 + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"VehicleDockingBay.Start.Postfix: running on VehicleDockingBay {__instance.ToString()}"); + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"VehicleDockingBay is of type {__instance.GetType().ToString()}"); if (__instance.subRoot is BaseRoot) { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"VehicleDockingBay is BaseRoot, creating console"); __instance.StartCoroutine(CreateConsole(__instance)); } +#elif BZ + QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"Cyclops prefab not available in BZ, not attempting to add moonpool console"); + /*QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"VehicleDockingBay type is {__instance.dockType.ToString()}"); + if (__instance.dockType == Vehicle.DockType.Base) + { + QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"VehicleDockingBay type is correct, creating console"); + }*/ +#endif } private static IEnumerator CreateConsole(VehicleDockingBay __instance) { if (prefab == null) { + QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"CreateConsole: attempting to create prefab"); yield return CreatePrefab(); } @@ -39,6 +56,7 @@ private static IEnumerator CreateConsole(VehicleDockingBay __instance) console.transform.localPosition = new Vector3(4.96f, 1.4f, 3.23f); console.transform.localEulerAngles = new Vector3(0, 42.5f, 0); + QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"Adding MoonpoolTerminalController component"); console.AddComponent(); var terminalManager = console.GetComponent(); diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/VehicleStorageAccess.cs b/SubnauticaModSystem/DockedVehicleStorageAccess/VehicleStorageAccess.cs index 8bdcf36..57e4363 100644 --- a/SubnauticaModSystem/DockedVehicleStorageAccess/VehicleStorageAccess.cs +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/VehicleStorageAccess.cs @@ -10,6 +10,12 @@ using SMLHelper.V2.Crafting; using UnityEngine; using UnityEngine.UI; +#if SUBNAUTICA + using RecipeData = SMLHelper.V2.Crafting.TechData; + using Sprite = Atlas.Sprite; +#elif BELOWZERO +using TMPro; +#endif namespace DockedVehicleStorageAccess { @@ -34,11 +40,16 @@ public class VehicleStorageAccess : MonoBehaviour, IProtoEventListener private StorageContainer container; private SubRoot subRoot; private VehicleDockingBay[] dockingBays = new VehicleDockingBay[0]; +#if SN1 private List vehicles = new List(); +#elif BZ + private List vehicles = new List(); +#endif private bool transferringToAutosorter; private List autosorters = new List(); +#if SN1 [SerializeField] private Text textPrefab; [SerializeField] @@ -55,6 +66,24 @@ public class VehicleStorageAccess : MonoBehaviour, IProtoEventListener private Image exosuitIcon; [SerializeField] private Text exosuitCountText; +#elif BZ + [SerializeField] + private TextMeshProUGUI textPrefab; + [SerializeField] + private Image background; + [SerializeField] + private Image icon; + [SerializeField] + private TextMeshProUGUI text; + [SerializeField] + private Image seamothIcon; + [SerializeField] + private TextMeshProUGUI seamothCountText; + [SerializeField] + private Image exosuitIcon; + [SerializeField] + private TextMeshProUGUI exosuitCountText; +#endif [SerializeField] private CheckboxButton enableCheckbox; @@ -132,7 +161,11 @@ private void UpdateDockedVehicles() vehicles.Clear(); foreach (var dockingBay in dockingBays) { +#if SN1 var vehicle = dockingBay.GetDockedVehicle(); +#elif BZ + var vehicle = dockingBay.GetDockedObject(); +#endif if (vehicle != null) { vehicles.Add(vehicle); @@ -160,6 +193,7 @@ private IEnumerator TryExtractItems() bool extractedAnything = false; Dictionary extractionResults = new Dictionary(); +#if SN1 List localVehicles = vehicles.ToList(); foreach (var vehicle in localVehicles) { @@ -167,6 +201,31 @@ private IEnumerator TryExtractItems() extractionResults[vehicleName] = 0; var vehicleContainers = vehicle.gameObject.GetComponentsInChildren().Select((x) => x.container).ToList(); vehicleContainers.AddRange(GetSeamothStorage(vehicle)); +#elif BZ + foreach (Dockable dockable in vehicles) + { + if (dockable.gameObject == null) + continue; + + string vehicleName = ""; + NamePlate namePlate = dockable.gameObject.GetComponent(); + if (namePlate != null) + { + vehicleName = namePlate.namePlateText; + } + else + { + vehicleName = dockable.gameObject.name; + } + + extractionResults[vehicleName] = 0; + List vehicleContainers = new List(); + vehicleContainers.AddRange(dockable.gameObject.GetComponentsInChildren().Select((x) => x.container).ToList()); + List dockableContainers = GetSeamothStorage(dockable); + if (dockableContainers != null) + vehicleContainers.AddRange(dockableContainers); + +#endif bool couldNotAdd = false; foreach (var vehicleContainer in vehicleContainers) { @@ -218,10 +277,11 @@ private IEnumerator TryExtractItems() extractingItems = false; } +#if SN1 private List GetSeamothStorage(Vehicle seamoth) { var results = new List(); - if (seamoth is SeaMoth && seamoth.modules != null) + if ((seamoth is SeaMoth && seamoth.modules != null) { using (var e = seamoth.modules.GetEquipment()) { @@ -244,6 +304,55 @@ private List GetSeamothStorage(Vehicle seamoth) return results; } +#elif BZ + // This method appears to be flawless as-is; no exceptions seem to be getting thrown here. + private List GetSeamothStorage(Dockable dockable) + { + if (dockable == null) + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Error, $"GetSeamothStorage invoked with null dockable"); + return null; + } + + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: running on dockable {dockable.name}; dockable.truckMotor = " + (dockable.truckMotor != null ? dockable.truckMotor.ToString() : "null")); + Equipment modules = null; + if (dockable.vehicle is SeaMoth) + modules = dockable.vehicle.modules; + else if (dockable.truckMotor != null) + modules = dockable.truckMotor.upgrades.modules; + + if (modules != null) + { + var results = new List(); + int i = 0; + using (var e = modules.GetEquipment()) + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: start enumerator"); + while (e.MoveNext()) + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: For dockable {dockable.name}, using module {i}"); + var module = e.Current.Value; + if (module != null && module.item != null) + { + var container = module.item.GetComponent(); + if (container != null && !container.gameObject.name.Contains("Torpedo")) + { + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: For dockable {dockable.name}, found SeamothStorageContainer at index {i}"); + results.Add(container.container); + } + } + i++; + } + } + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: got {results.Count} storage containers"); + return results; + } + + //QModManager.Utility.Logger.Log(QModManager.Utility.Logger.Level.Debug, $"GetSeamothStorage: could not get Equipment instance"); + return null; + } +#endif + private void NotifyExtraction(Dictionary extractionResults) { List messageEntries = new List(); @@ -346,10 +455,16 @@ private void UpdateText() int seamothCount = 0; int exosuitCount = 0; - foreach (var vehicle in vehicles) - { - seamothCount += (vehicle is SeaMoth ? 1 : 0); + foreach (var dockable in vehicles) + { +#if SN1 + seamothCount += (dockable is SeaMoth ? 1 : 0); + exosuitCount += (dockable is Exosuit ? 1 : 0); +#elif BZ + var vehicle = dockable.vehicle; + seamothCount += ((vehicle is SeaMoth || dockable.truckMotor != null) ? 1 : 0); exosuitCount += (vehicle is Exosuit ? 1 : 0); +#endif } seamothCountText.text = seamothCount > 1 ? "x" + seamothCount : ""; @@ -364,15 +479,15 @@ private void UpdateText() } else if (extractingItems) { - text.text += "\n\nEXTRACTING..."; + text.text += "\n\nEXTRACTING..."; // The original code here was , but that apparently isn't valid for a TextMeshProUGUI. } else if (Mod.config.UseAutosortMod && autosorters.Count == 0 && transferringToAutosorter) { - text.text += "\n\nTRANSFERRING..."; + text.text += "\n\nTRANSFERRING..."; } else { - text.text += "\n\nREADY"; + text.text += "\n\nREADY"; } } @@ -406,7 +521,9 @@ private void Initialize() background.gameObject.SetActive(true); icon.gameObject.SetActive(true); text.gameObject.SetActive(true); +#if !BZ text.supportRichText = true; +#endif background.sprite = ImageUtils.LoadSprite(Mod.GetAssetPath("LockerScreen.png")); icon.sprite = ImageUtils.LoadSprite(Mod.GetAssetPath("Receptacle.png")); @@ -461,6 +578,7 @@ public void OnProtoDeserialize(ProtobufSerializer serializer) saveData = data; initialized = false; }); + StopAllCoroutines(); } public string GetSaveDataPath() @@ -485,12 +603,26 @@ public VehicleStorageAccessBuildable() public override TechCategory CategoryForPDA => TechCategory.InteriorModule; +#if SN1 public override GameObject GetGameObject() { GameObject originalPrefab = CraftData.GetPrefabForTechType(TechType.SmallLocker); GameObject prefab = GameObject.Instantiate(originalPrefab); + var storageAccess = prefab.AddComponent(); + storageAccess.textPrefab = GameObject.Instantiate(prefab.GetComponentInChildren()); + +#elif BZ + public override IEnumerator GetGameObjectAsync(IOut gameObject) + { + CoroutineTask task = CraftData.GetPrefabForTechTypeAsync(TechType.SmallLocker); + yield return task; + var smallLockerPrefab = task.GetResult(); + GameObject prefab = GameObject.Instantiate(smallLockerPrefab); + var storageAccess = prefab.EnsureComponent(); + storageAccess.textPrefab = GameObject.Instantiate(smallLockerPrefab.GetComponentInChildren()); +#endif - var container = prefab.GetComponent(); + var container = prefab.EnsureComponent(); container.width = Mod.config.LockerWidth; container.height = Mod.config.LockerHeight; container.container.Resize(Mod.config.LockerWidth, Mod.config.LockerHeight); @@ -501,9 +633,6 @@ public override GameObject GetGameObject() meshRenderer.material.color = new Color(0, 0, 1); } - var storageAccess = prefab.AddComponent(); - - storageAccess.textPrefab = GameObject.Instantiate(prefab.GetComponentInChildren()); var label = prefab.FindChild("Label"); DestroyImmediate(label); @@ -532,12 +661,16 @@ public override GameObject GetGameObject() storageAccess.background.gameObject.SetActive(false); +#if SN1 return prefab; +#elif BZ + gameObject.Set(prefab); +#endif } - protected override TechData GetBlueprintRecipe() + protected override RecipeData GetBlueprintRecipe() { - return new TechData + return new RecipeData { craftAmount = 1, Ingredients = @@ -548,7 +681,7 @@ protected override TechData GetBlueprintRecipe() }; } - protected override Atlas.Sprite GetItemSprite() + protected override Sprite GetItemSprite() { return SMLHelper.V2.Utility.ImageUtils.LoadSpriteFromFile(Mod.GetAssetPath("StorageAccess.png")); } diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/mod_BZ.json b/SubnauticaModSystem/DockedVehicleStorageAccess/mod_BZ.json new file mode 100644 index 0000000..14c39b1 --- /dev/null +++ b/SubnauticaModSystem/DockedVehicleStorageAccess/mod_BZ.json @@ -0,0 +1,10 @@ +{ + "Id": "DockedVehicleStorageAccessSML", + "DisplayName": "Docked Vehicle Storage Access", + "Author": "RandyKnapp w/PrimeSonic", + "Version": "2.0.0", + "Requires": [ "SMLHelper" ], + "Enable": true, + "Game": "BelowZero", + "AssemblyName": "DockedVehicleStorageAccessSML.dll" +} \ No newline at end of file diff --git a/SubnauticaModSystem/DockedVehicleStorageAccess/mod.json b/SubnauticaModSystem/DockedVehicleStorageAccess/mod_SN1.json similarity index 100% rename from SubnauticaModSystem/DockedVehicleStorageAccess/mod.json rename to SubnauticaModSystem/DockedVehicleStorageAccess/mod_SN1.json diff --git a/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_BZ.json b/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_BZ.json new file mode 100644 index 0000000..14c39b1 --- /dev/null +++ b/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_BZ.json @@ -0,0 +1,10 @@ +{ + "Id": "DockedVehicleStorageAccessSML", + "DisplayName": "Docked Vehicle Storage Access", + "Author": "RandyKnapp w/PrimeSonic", + "Version": "2.0.0", + "Requires": [ "SMLHelper" ], + "Enable": true, + "Game": "BelowZero", + "AssemblyName": "DockedVehicleStorageAccessSML.dll" +} \ No newline at end of file diff --git a/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_SN1.json b/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_SN1.json new file mode 100644 index 0000000..1e01245 --- /dev/null +++ b/SubnauticaModSystem/DockedVehicleStorageAccessSML/BZ/mod_SN1.json @@ -0,0 +1,9 @@ +{ + "Id": "DockedVehicleStorageAccessSML", + "DisplayName": "Docked Vehicle Storage Access", + "Author": "RandyKnapp w/PrimeSonic", + "Version": "2.0.0", + "Requires": [ "SMLHelper" ], + "Enable": true, + "AssemblyName": "DockedVehicleStorageAccessSML.dll" +} \ No newline at end of file diff --git a/SubnauticaModSystem/GameDir.targets b/SubnauticaModSystem/GameDir.targets new file mode 100644 index 0000000..abcff26 --- /dev/null +++ b/SubnauticaModSystem/GameDir.targets @@ -0,0 +1,9 @@ + + + + + C:\Steam\steamapps\common\ + $(CommonDir)\Subnautica\ + $(CommonDir)\SubnauticaZero\ + + \ No newline at end of file diff --git a/SubnauticaModSystem/HabitatControlPanel/HabitatControlPanel.csproj b/SubnauticaModSystem/HabitatControlPanel/HabitatControlPanel.csproj index e203823..f04df1c 100644 --- a/SubnauticaModSystem/HabitatControlPanel/HabitatControlPanel.csproj +++ b/SubnauticaModSystem/HabitatControlPanel/HabitatControlPanel.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties HabitatControlPanel HabitatControlPanelSML - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,27 +37,49 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\QModInstaller.dll + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -64,34 +88,34 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.AnimationModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.AnimationModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.AssetBundleModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.AssetBundleModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.Physics2DModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.Physics2DModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.PhysicsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.PhysicsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -140,9 +164,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/HabitatControlPanel/Mod.cs b/SubnauticaModSystem/HabitatControlPanel/Mod.cs index 43580d9..c75d7b7 100644 --- a/SubnauticaModSystem/HabitatControlPanel/Mod.cs +++ b/SubnauticaModSystem/HabitatControlPanel/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Reflection; diff --git a/SubnauticaModSystem/HabitatControlPanel/Patches/Ping_Patches.cs b/SubnauticaModSystem/HabitatControlPanel/Patches/Ping_Patches.cs index eb7d9ef..95a9437 100644 --- a/SubnauticaModSystem/HabitatControlPanel/Patches/Ping_Patches.cs +++ b/SubnauticaModSystem/HabitatControlPanel/Patches/Ping_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Reflection; diff --git a/SubnauticaModSystem/HudConfig/HudConfig.csproj b/SubnauticaModSystem/HudConfig/HudConfig.csproj index b37c0e6..e8d0baa 100644 --- a/SubnauticaModSystem/HudConfig/HudConfig.csproj +++ b/SubnauticaModSystem/HudConfig/HudConfig.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties HudConfig HudConfig - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,28 +85,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -101,9 +125,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/HudConfig/Mod.cs b/SubnauticaModSystem/HudConfig/Mod.cs index f5868b9..1b36203 100644 --- a/SubnauticaModSystem/HudConfig/Mod.cs +++ b/SubnauticaModSystem/HudConfig/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using Oculus.Newtonsoft.Json; using System; using System.IO; diff --git a/SubnauticaModSystem/HudConfig/Patches/HUD_Patches.cs b/SubnauticaModSystem/HudConfig/Patches/HUD_Patches.cs index a874602..9654e3b 100644 --- a/SubnauticaModSystem/HudConfig/Patches/HUD_Patches.cs +++ b/SubnauticaModSystem/HudConfig/Patches/HUD_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/LongLockerNames/LongLockerNames.csproj b/SubnauticaModSystem/LongLockerNames/LongLockerNames.csproj index 5b8d995..2607a7c 100644 --- a/SubnauticaModSystem/LongLockerNames/LongLockerNames.csproj +++ b/SubnauticaModSystem/LongLockerNames/LongLockerNames.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties LongLockerNames LongLockerNames - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,23 +37,45 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -60,28 +84,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -110,9 +134,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/LongLockerNames/Mod.cs b/SubnauticaModSystem/LongLockerNames/Mod.cs index 12dd3e5..d901dae 100644 --- a/SubnauticaModSystem/LongLockerNames/Mod.cs +++ b/SubnauticaModSystem/LongLockerNames/Mod.cs @@ -1,5 +1,5 @@ using Common.Utility; -using Harmony; +using HarmonyLib; using System; using System.IO; using System.Linq; diff --git a/SubnauticaModSystem/LongLockerNames/Patches/uGUI_SignInput_Awake_Patch.cs b/SubnauticaModSystem/LongLockerNames/Patches/uGUI_SignInput_Awake_Patch.cs index 146d24b..1970a49 100644 --- a/SubnauticaModSystem/LongLockerNames/Patches/uGUI_SignInput_Awake_Patch.cs +++ b/SubnauticaModSystem/LongLockerNames/Patches/uGUI_SignInput_Awake_Patch.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System.Linq; using UnityEngine; using UnityEngine.UI; diff --git a/SubnauticaModSystem/ModInjector_MoreQuickSlots/ModInjector_MoreQuickSlots.csproj b/SubnauticaModSystem/ModInjector_MoreQuickSlots/ModInjector_MoreQuickSlots.csproj index 33eaf30..db635f0 100644 --- a/SubnauticaModSystem/ModInjector_MoreQuickSlots/ModInjector_MoreQuickSlots.csproj +++ b/SubnauticaModSystem/ModInjector_MoreQuickSlots/ModInjector_MoreQuickSlots.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -8,7 +9,8 @@ WinExe ModInjector_MoreQuickSlots ModInjector_MoreQuickSlots - v4.6.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 true @@ -17,7 +19,7 @@ true full false - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\ + $(GameDir)\$(DataFolder)\Managed\ DEBUG;TRACE prompt 4 @@ -34,6 +36,28 @@ inject128.ico + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + ..\Packages\Mono.Cecil.dll diff --git a/SubnauticaModSystem/PrawnsuitLightswitch/Mod.cs b/SubnauticaModSystem/PrawnsuitLightswitch/Mod.cs index f4d62f3..47130dc 100644 --- a/SubnauticaModSystem/PrawnsuitLightswitch/Mod.cs +++ b/SubnauticaModSystem/PrawnsuitLightswitch/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Reflection; diff --git a/SubnauticaModSystem/PrawnsuitLightswitch/Patches/Exosuit_Patches.cs b/SubnauticaModSystem/PrawnsuitLightswitch/Patches/Exosuit_Patches.cs index 3373d54..03ef4e0 100644 --- a/SubnauticaModSystem/PrawnsuitLightswitch/Patches/Exosuit_Patches.cs +++ b/SubnauticaModSystem/PrawnsuitLightswitch/Patches/Exosuit_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; diff --git a/SubnauticaModSystem/PrawnsuitLightswitch/PrawnsuitLightswitch.csproj b/SubnauticaModSystem/PrawnsuitLightswitch/PrawnsuitLightswitch.csproj index 572de39..1964e13 100644 --- a/SubnauticaModSystem/PrawnsuitLightswitch/PrawnsuitLightswitch.csproj +++ b/SubnauticaModSystem/PrawnsuitLightswitch/PrawnsuitLightswitch.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties PrawnsuitLightswitch PrawnsuitLightswitch - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,28 +85,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -112,9 +136,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/QuitToDesktop/QuitToDesktop.csproj b/SubnauticaModSystem/QuitToDesktop/QuitToDesktop.csproj index 9f1fa62..c6787c4 100644 --- a/SubnauticaModSystem/QuitToDesktop/QuitToDesktop.csproj +++ b/SubnauticaModSystem/QuitToDesktop/QuitToDesktop.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,6 +10,7 @@ Properties QuitToDesktop QuitToDesktop + $(SolutionDir)$(AssemblyName)\$(Configuration)\ v4.7.2 512 @@ -36,21 +38,43 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - D:\SteamLibrary\steamapps\common\Subnautica\BepInEx\core\0Harmony.dll + $(GameDir)\BepInEx\core\0Harmony.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp-firstpass_publicized.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\publicized_assemblies\Assembly-CSharp_publicized.dll + $(GameDir)\$(DataFolder)\Managed\publicized_assemblies\Assembly-CSharp_publicized.dll - D:\SteamLibrary\steamapps\common\Subnautica\BepInEx\plugins\QModManager\QModInstaller.dll + $(GameDir)\BepInEx\plugins\QModManager\QModInstaller.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -59,27 +83,27 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -105,8 +129,8 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\QuitToDesktop\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\QuitToDesktop\ /q /y + xcopy $(TargetPath) $(GameDir)\QMods\QuitToDesktop\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\QuitToDesktop\ /q /y xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\QuitToDesktop\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\QuitToDesktop\ /q /y diff --git a/SubnauticaModSystem/SeaglideMapMod/Mod.cs b/SubnauticaModSystem/SeaglideMapMod/Mod.cs index b9ac501..f4111d6 100644 --- a/SubnauticaModSystem/SeaglideMapMod/Mod.cs +++ b/SubnauticaModSystem/SeaglideMapMod/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Reflection; diff --git a/SubnauticaModSystem/SeaglideMapMod/Patches/ScannerTool_Patches.cs b/SubnauticaModSystem/SeaglideMapMod/Patches/ScannerTool_Patches.cs index 1a64849..8c2c322 100644 --- a/SubnauticaModSystem/SeaglideMapMod/Patches/ScannerTool_Patches.cs +++ b/SubnauticaModSystem/SeaglideMapMod/Patches/ScannerTool_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/SeaglideMapMod/Patches/Seaglide_Patches.cs b/SubnauticaModSystem/SeaglideMapMod/Patches/Seaglide_Patches.cs index 2f0f4f9..601efdf 100644 --- a/SubnauticaModSystem/SeaglideMapMod/Patches/Seaglide_Patches.cs +++ b/SubnauticaModSystem/SeaglideMapMod/Patches/Seaglide_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections; using System.Collections.Generic; diff --git a/SubnauticaModSystem/SeaglideMapMod/SeaglideMapControls.csproj b/SubnauticaModSystem/SeaglideMapMod/SeaglideMapControls.csproj index 06126b6..a2a5d6d 100644 --- a/SubnauticaModSystem/SeaglideMapMod/SeaglideMapControls.csproj +++ b/SubnauticaModSystem/SeaglideMapMod/SeaglideMapControls.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties SeaglideMapControls SeaglideMapControls - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,28 +85,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -113,9 +137,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/SubnauticaModSystem.sln b/SubnauticaModSystem/SubnauticaModSystem.sln index 9ded94b..2f4d5ac 100644 --- a/SubnauticaModSystem/SubnauticaModSystem.sln +++ b/SubnauticaModSystem/SubnauticaModSystem.sln @@ -17,7 +17,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LongLockerNames", "LongLock EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common", "Common\Common.shproj", "{DD1D2DC7-3BDC-4DC1-99C8-2D0CCBF2B171}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutosortLockers", "AutosortLockers\AutosortLockers.csproj", "{6C883B28-31E6-4C26-B32B-BF5BE0D70190}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutosortLockersSML", "AutosortLockers\AutosortLockersSML.csproj", "{6C883B28-31E6-4C26-B32B-BF5BE0D70190}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BetterScannerBlips", "BetterScannerBlips\BetterScannerBlips.csproj", "{B7752C03-C7BB-494F-BA52-9CD5EC649AA7}" EndProject @@ -63,125 +63,203 @@ Global Common\Common.projitems*{fd7b0bb5-6bcf-45b6-9145-10a8f0fef277}*SharedItemsImports = 4 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution + BZ|Any CPU = BZ|Any CPU Debug_Autosort|Any CPU = Debug_Autosort|Any CPU Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU + SN1|Any CPU = SN1|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.BZ|Any CPU.Build.0 = BZ|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Debug|Any CPU.Build.0 = Debug|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.Release|Any CPU.Build.0 = Release|Any CPU + {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {2B390DAA-56B9-42D9-BAD4-8A47736C0563}.SN1|Any CPU.Build.0 = SN1|Any CPU + {09868E2D-416A-441C-9D9A-19D791E8FC42}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {09868E2D-416A-441C-9D9A-19D791E8FC42}.BZ|Any CPU.Build.0 = BZ|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Debug|Any CPU.Build.0 = Debug|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Release|Any CPU.ActiveCfg = Release|Any CPU {09868E2D-416A-441C-9D9A-19D791E8FC42}.Release|Any CPU.Build.0 = Release|Any CPU + {09868E2D-416A-441C-9D9A-19D791E8FC42}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {09868E2D-416A-441C-9D9A-19D791E8FC42}.SN1|Any CPU.Build.0 = SN1|Any CPU + {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.BZ|Any CPU.Build.0 = BZ|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Debug|Any CPU.Build.0 = Debug|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Release|Any CPU.ActiveCfg = Release|Any CPU {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.Release|Any CPU.Build.0 = Release|Any CPU + {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {0D86304E-0A53-422A-99E6-0C687D9DBBC6}.SN1|Any CPU.Build.0 = SN1|Any CPU + {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.BZ|Any CPU.Build.0 = BZ|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Debug|Any CPU.Build.0 = Debug|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Release|Any CPU.ActiveCfg = Release|Any CPU {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.Release|Any CPU.Build.0 = Release|Any CPU + {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {CF7E5EA0-EE32-4330-AF9C-E720E9A64681}.SN1|Any CPU.Build.0 = SN1|Any CPU + {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.BZ|Any CPU.Build.0 = BZ|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Debug|Any CPU.Build.0 = Debug|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Release|Any CPU.ActiveCfg = Release|Any CPU {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.Release|Any CPU.Build.0 = Release|Any CPU + {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {BFFEC1AE-67D2-4CBA-B76B-76DF2BA9C053}.SN1|Any CPU.Build.0 = SN1|Any CPU + {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.BZ|Any CPU.Build.0 = BZ|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Release|Any CPU.ActiveCfg = Release|Any CPU {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.Release|Any CPU.Build.0 = Release|Any CPU + {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {7B7CDBE9-9FAC-4E28-A42C-80A21066D7AB}.SN1|Any CPU.Build.0 = SN1|Any CPU + {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.BZ|Any CPU.Build.0 = BZ|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Debug_Autosort|Any CPU.ActiveCfg = Release|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Debug_Autosort|Any CPU.Build.0 = Release|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Debug|Any CPU.Build.0 = Debug|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Release|Any CPU.ActiveCfg = Release|Any CPU {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.Release|Any CPU.Build.0 = Release|Any CPU + {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {6C883B28-31E6-4C26-B32B-BF5BE0D70190}.SN1|Any CPU.Build.0 = SN1|Any CPU + {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.BZ|Any CPU.Build.0 = BZ|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.Release|Any CPU.Build.0 = Release|Any CPU + {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {B7752C03-C7BB-494F-BA52-9CD5EC649AA7}.SN1|Any CPU.Build.0 = SN1|Any CPU + {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.BZ|Any CPU.Build.0 = BZ|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Debug|Any CPU.Build.0 = Debug|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Release|Any CPU.ActiveCfg = Release|Any CPU {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.Release|Any CPU.Build.0 = Release|Any CPU + {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {829B1A80-D3B3-431A-A4B8-284C6B9DE226}.SN1|Any CPU.Build.0 = SN1|Any CPU + {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.BZ|Any CPU.Build.0 = BZ|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Debug|Any CPU.Build.0 = Debug|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Release|Any CPU.ActiveCfg = Release|Any CPU {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.Release|Any CPU.Build.0 = Release|Any CPU + {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {D9A802D6-AD51-4543-9903-0B90B1FA65AC}.SN1|Any CPU.Build.0 = SN1|Any CPU + {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.BZ|Any CPU.Build.0 = BZ|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.Release|Any CPU.Build.0 = Release|Any CPU + {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {7E1DE3EC-3325-4F95-B306-616E1FA23B40}.SN1|Any CPU.Build.0 = SN1|Any CPU + {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.BZ|Any CPU.Build.0 = BZ|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Debug|Any CPU.Build.0 = Debug|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Release|Any CPU.ActiveCfg = Release|Any CPU {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.Release|Any CPU.Build.0 = Release|Any CPU + {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {F8A529A2-4CF8-4651-B0E8-B43B26C66753}.SN1|Any CPU.Build.0 = SN1|Any CPU + {1CC2A3A8-342F-4C3F-83C7-249882920D71}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {1CC2A3A8-342F-4C3F-83C7-249882920D71}.BZ|Any CPU.Build.0 = BZ|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Debug|Any CPU.Build.0 = Debug|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Release|Any CPU.ActiveCfg = Release|Any CPU {1CC2A3A8-342F-4C3F-83C7-249882920D71}.Release|Any CPU.Build.0 = Release|Any CPU + {1CC2A3A8-342F-4C3F-83C7-249882920D71}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {1CC2A3A8-342F-4C3F-83C7-249882920D71}.SN1|Any CPU.Build.0 = SN1|Any CPU + {683A1124-D419-49F6-B602-60A803658315}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {683A1124-D419-49F6-B602-60A803658315}.BZ|Any CPU.Build.0 = BZ|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Debug|Any CPU.Build.0 = Debug|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Release|Any CPU.ActiveCfg = Release|Any CPU {683A1124-D419-49F6-B602-60A803658315}.Release|Any CPU.Build.0 = Release|Any CPU + {683A1124-D419-49F6-B602-60A803658315}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {683A1124-D419-49F6-B602-60A803658315}.SN1|Any CPU.Build.0 = SN1|Any CPU + {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.BZ|Any CPU.Build.0 = BZ|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Debug|Any CPU.Build.0 = Debug|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.Release|Any CPU.Build.0 = Release|Any CPU + {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {667BF0BB-F5AB-446C-A6B3-3FAABB2F49D5}.SN1|Any CPU.Build.0 = SN1|Any CPU + {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.BZ|Any CPU.Build.0 = BZ|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Debug|Any CPU.Build.0 = Debug|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Release|Any CPU.ActiveCfg = Release|Any CPU {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.Release|Any CPU.Build.0 = Release|Any CPU + {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {FD7B0BB5-6BCF-45B6-9145-10A8F0FEF277}.SN1|Any CPU.Build.0 = SN1|Any CPU + {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.BZ|Any CPU.Build.0 = BZ|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Debug|Any CPU.Build.0 = Debug|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Release|Any CPU.ActiveCfg = Release|Any CPU {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.Release|Any CPU.Build.0 = Release|Any CPU + {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {03B89974-4EA6-4CD4-8C9F-C039EB81DE5F}.SN1|Any CPU.Build.0 = SN1|Any CPU + {B4A7744B-F777-426C-94CD-1470B680B5B7}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {B4A7744B-F777-426C-94CD-1470B680B5B7}.BZ|Any CPU.Build.0 = BZ|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Debug|Any CPU.Build.0 = Debug|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Release|Any CPU.ActiveCfg = Release|Any CPU {B4A7744B-F777-426C-94CD-1470B680B5B7}.Release|Any CPU.Build.0 = Release|Any CPU + {B4A7744B-F777-426C-94CD-1470B680B5B7}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {B4A7744B-F777-426C-94CD-1470B680B5B7}.SN1|Any CPU.Build.0 = SN1|Any CPU + {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.BZ|Any CPU.ActiveCfg = BZ|Any CPU + {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.BZ|Any CPU.Build.0 = BZ|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Debug_Autosort|Any CPU.ActiveCfg = Debug|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Debug_Autosort|Any CPU.Build.0 = Debug|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Debug|Any CPU.Build.0 = Debug|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Release|Any CPU.ActiveCfg = Release|Any CPU {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.Release|Any CPU.Build.0 = Release|Any CPU + {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.SN1|Any CPU.ActiveCfg = SN1|Any CPU + {2EBF18DB-437E-4A9A-A03C-06770A3F9CB6}.SN1|Any CPU.Build.0 = SN1|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/SubnauticaModSystem/TorpedoImprovements/Mod.cs b/SubnauticaModSystem/TorpedoImprovements/Mod.cs index b1575f2..9785392 100644 --- a/SubnauticaModSystem/TorpedoImprovements/Mod.cs +++ b/SubnauticaModSystem/TorpedoImprovements/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using Oculus.Newtonsoft.Json; using System; using System.IO; diff --git a/SubnauticaModSystem/TorpedoImprovements/Patches/Exosuit_Patches.cs b/SubnauticaModSystem/TorpedoImprovements/Patches/Exosuit_Patches.cs index 53ce9e1..f0953e2 100644 --- a/SubnauticaModSystem/TorpedoImprovements/Patches/Exosuit_Patches.cs +++ b/SubnauticaModSystem/TorpedoImprovements/Patches/Exosuit_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/TorpedoImprovements/Patches/Seamoth_Patches.cs b/SubnauticaModSystem/TorpedoImprovements/Patches/Seamoth_Patches.cs index 35a2287..c610009 100644 --- a/SubnauticaModSystem/TorpedoImprovements/Patches/Seamoth_Patches.cs +++ b/SubnauticaModSystem/TorpedoImprovements/Patches/Seamoth_Patches.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/TorpedoImprovements/TorpedoImprovements.csproj b/SubnauticaModSystem/TorpedoImprovements/TorpedoImprovements.csproj index 46100b3..1067f26 100644 --- a/SubnauticaModSystem/TorpedoImprovements/TorpedoImprovements.csproj +++ b/SubnauticaModSystem/TorpedoImprovements/TorpedoImprovements.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties TorpedoImprovements TorpedoImprovements - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,25 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -62,31 +85,31 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.PhysicsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.PhysicsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -110,9 +133,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/WhiteLights/Mod.cs b/SubnauticaModSystem/WhiteLights/Mod.cs index b489ea7..9b9ea8b 100644 --- a/SubnauticaModSystem/WhiteLights/Mod.cs +++ b/SubnauticaModSystem/WhiteLights/Mod.cs @@ -1,5 +1,5 @@ using Common.Mod; -using Harmony; +using HarmonyLib; using Oculus.Newtonsoft.Json; using System; using System.IO; diff --git a/SubnauticaModSystem/WhiteLights/Patches/Exosuit_Patches.cs b/SubnauticaModSystem/WhiteLights/Patches/Exosuit_Patches.cs index 8f13adb..38ae034 100644 --- a/SubnauticaModSystem/WhiteLights/Patches/Exosuit_Patches.cs +++ b/SubnauticaModSystem/WhiteLights/Patches/Exosuit_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; diff --git a/SubnauticaModSystem/WhiteLights/Patches/Seaglide_Patches.cs b/SubnauticaModSystem/WhiteLights/Patches/Seaglide_Patches.cs index 46d529d..044e4d8 100644 --- a/SubnauticaModSystem/WhiteLights/Patches/Seaglide_Patches.cs +++ b/SubnauticaModSystem/WhiteLights/Patches/Seaglide_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using UnityEngine; namespace WhiteLights.Patches diff --git a/SubnauticaModSystem/WhiteLights/Patches/Seamoth_Patches.cs b/SubnauticaModSystem/WhiteLights/Patches/Seamoth_Patches.cs index a8623c3..80a8758 100644 --- a/SubnauticaModSystem/WhiteLights/Patches/Seamoth_Patches.cs +++ b/SubnauticaModSystem/WhiteLights/Patches/Seamoth_Patches.cs @@ -1,4 +1,4 @@ -using Harmony; +using HarmonyLib; using UnityEngine; namespace WhiteLights.Patches diff --git a/SubnauticaModSystem/WhiteLights/WhiteLights.csproj b/SubnauticaModSystem/WhiteLights/WhiteLights.csproj index 1f3a272..0a31afa 100644 --- a/SubnauticaModSystem/WhiteLights/WhiteLights.csproj +++ b/SubnauticaModSystem/WhiteLights/WhiteLights.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties WhiteLights WhiteLights - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,24 +37,46 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony-1.2.0.1.dll + + $(GameDir)\BepInEx\core\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp-firstpass.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp-firstpass.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Newtonsoft.Json.dll + $(GameDir)\$(DataFolder)\Managed\NewtonSoft.Json.dll - D:\SteamLibrary\steamapps\common\Subnautica\QMods\Modding Helper\SMLHelper.dll + $(GameDir)\QMods\$(SMLHelperFolder)\SMLHelper.dll @@ -61,28 +85,28 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.CoreModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.CoreModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.ImageConversionModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.ImageConversionModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.JSONSerializeModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.JSONSerializeModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.TextRenderingModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.TextRenderingModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIElementsModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIElementsModule.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UIModule.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UIModule.dll @@ -103,9 +127,9 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)Assets D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\Assets\ /q /y /i + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)Assets $(GameDir)\QMods\$(ProjectName)\Assets\ /q /y /i xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y diff --git a/SubnauticaModSystem/zzzEnableConsole/zzzEnableConsole.csproj b/SubnauticaModSystem/zzzEnableConsole/zzzEnableConsole.csproj index 87262bb..f326d34 100644 --- a/SubnauticaModSystem/zzzEnableConsole/zzzEnableConsole.csproj +++ b/SubnauticaModSystem/zzzEnableConsole/zzzEnableConsole.csproj @@ -1,6 +1,7 @@  + Debug AnyCPU @@ -9,7 +10,8 @@ Properties zzzEnableConsole zzzEnableConsole - v4.7.1 + $(SolutionDir)$(AssemblyName)\$(Configuration)\ + v4.7.2 512 @@ -35,13 +37,35 @@ Always + + BZ;BELOWZERO + true + true + $(CommonDir)SubnauticaZero.Stable + SubnauticaZero_Data + SMLHelper_BZ + AnyCPU + 7.1 + prompt + + + SN1;SUBNAUTICA_STABLE + true + true + $(CommonDir)Subnautica.Stable + Subnautica_Data + Modding Helper + AnyCPU + 7.1 + prompt + - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\0Harmony.dll + $(GameDir)\$(DataFolder)\Managed\0Harmony.dll False - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\Assembly-CSharp.dll + $(GameDir)\$(DataFolder)\Managed\Assembly-CSharp.dll @@ -50,10 +74,10 @@ - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.dll - D:\SteamLibrary\steamapps\common\Subnautica\Subnautica_Data\Managed\UnityEngine.UI.dll + $(GameDir)\$(DataFolder)\Managed\UnityEngine.UI.dll @@ -77,8 +101,8 @@ - xcopy $(TargetPath) D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y -xcopy $(ProjectDir)mod.json D:\SteamLibrary\steamapps\common\Subnautica\QMods\$(ProjectName)\ /q /y + xcopy $(TargetPath) $(GameDir)\QMods\$(ProjectName)\ /q /y +xcopy $(ProjectDir)mod.json $(GameDir)\QMods\$(ProjectName)\ /q /y xcopy $(TargetPath) D:\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y xcopy $(ProjectDir)mod.json D:\\EpicGames\Subnautica\QMods\$(ProjectName)\ /q /y