diff --git a/SCHIZO/Creatures/UnityCreaturePrefab.cs b/SCHIZO/Creatures/UnityCreaturePrefab.cs index 8e12f919..42da590f 100644 --- a/SCHIZO/Creatures/UnityCreaturePrefab.cs +++ b/SCHIZO/Creatures/UnityCreaturePrefab.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics.CodeAnalysis; using ECCLibrary; using Nautilus.Handlers; @@ -27,9 +27,9 @@ protected override void SetItemProperties() if (UnityData.acidImmune) CreatureDataUtils.SetAcidImmune(ModItem); if (UnityData.bioReactorCharge > 0) CreatureDataUtils.SetBioreactorCharge(ModItem, UnityData.bioReactorCharge); - if (UnityData.PDAEncyclopediaInfo) + if (UnityData.pdaEncyInfo) { - PDAHandler.AddCustomScannerEntry(ModItem, UnityData.PDAEncyclopediaInfo.scanTime, encyclopediaKey: PrefabInfo.ClassID); + PDAHandler.AddCustomScannerEntry(ModItem, UnityData.pdaEncyInfo.scanTime, encyclopediaKey: PrefabInfo.ClassID); } if (UnityData.isPickupable) diff --git a/SCHIZO/Items/Data/ItemData.cs b/SCHIZO/Items/Data/ItemData.cs index 82914ca5..b7cba829 100644 --- a/SCHIZO/Items/Data/ItemData.cs +++ b/SCHIZO/Items/Data/ItemData.cs @@ -12,7 +12,6 @@ partial class ItemData public string[] CraftTreePath => RetargetHelpers.Pick(craftTreePathSN, craftTreePathBZ).Split('/'); public TechGroup TechGroup => (TechGroup) RetargetHelpers.Pick(techGroupSN, techGroupBZ); public TechCategory TechCategory => (TechCategory) RetargetHelpers.Pick(techCategorySN, techCategoryBZ); - public PDAEncyclopediaInfo PDAEncyclopediaInfo => RetargetHelpers.Pick(pdaEncyclopediaInfoSN, pdaEncyclopediaInfoBZ); public KnownTechInfo KnownTechInfo => RetargetHelpers.Pick(knownTechInfoSN, knownTechInfoBZ); public bool UnlockAtStart => RetargetHelpers.Pick(unlockAtStartSN, unlockAtStartBZ); public TechType RequiredForUnlock => RetargetHelpers.Pick(requiredForUnlockSN, requiredForUnlockBZ).GetTechType(); diff --git a/SCHIZO/Items/UnityPrefab.cs b/SCHIZO/Items/UnityPrefab.cs index 6d6c46fb..ec051ffe 100644 --- a/SCHIZO/Items/UnityPrefab.cs +++ b/SCHIZO/Items/UnityPrefab.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Nautilus.Assets; using Nautilus.Handlers; @@ -132,11 +132,12 @@ protected virtual void SetItemProperties() CraftDataHandler.AddToGroup(ModItem.ItemData.TechGroup, ModItem.ItemData.TechCategory, ModItem); } - if (ModItem.ItemData.PDAEncyclopediaInfo) + if (ModItem.ItemData.pdaEncyInfo) { - PDAEncyclopediaInfo i = ModItem.ItemData.PDAEncyclopediaInfo; + PDAEncyclopediaInfo i = ModItem.ItemData.pdaEncyInfo; + string encyPath = RetargetHelpers.Pick(i.encyPathSN, i.encyPathBZ); - PDAHandler.AddEncyclopediaEntry(ModItem.PrefabInfo.ClassID, i.encyPath, i.title, i.description.text, i.texture, i.unlockSprite, + PDAHandler.AddEncyclopediaEntry(ModItem.PrefabInfo.ClassID, encyPath, i.title, i.description.text, i.texture, i.unlockSprite, i.isImportantUnlock ? PDAHandler.UnlockImportant : PDAHandler.UnlockBasic); if (i.scanSounds) ScanSoundHandler.Register(ModItem, i.scanSounds); diff --git a/SCHIZO/Resources/AssetBundles/Assets.cs b/SCHIZO/Resources/AssetBundles/Assets.cs index e39c6b91..a67a62d3 100644 --- a/SCHIZO/Resources/AssetBundles/Assets.cs +++ b/SCHIZO/Resources/AssetBundles/Assets.cs @@ -12,7 +12,7 @@ namespace SCHIZO.Resources; public static class Assets { - private const int _rnd = 228879590; + private const int _rnd = -1727900894; private static readonly UnityEngine.AssetBundle _a = ResourceManager.GetAssetBundle("assets"); diff --git a/SCHIZO/Resources/AssetBundles/assets b/SCHIZO/Resources/AssetBundles/assets index af53f3c9..201cacd4 100644 Binary files a/SCHIZO/Resources/AssetBundles/assets and b/SCHIZO/Resources/AssetBundles/assets differ diff --git a/SCHIZO/Spawns/CoordinatedSpawns.cs b/SCHIZO/Spawns/CoordinatedSpawns.cs new file mode 100644 index 00000000..287f489e --- /dev/null +++ b/SCHIZO/Spawns/CoordinatedSpawns.cs @@ -0,0 +1,21 @@ +using Nautilus.Handlers; +using SCHIZO.Helpers; +using NSpawnInfo = Nautilus.Handlers.SpawnInfo; + +namespace SCHIZO.Spawns; + +partial class CoordinatedSpawns +{ + protected override void Register() + { + foreach (SpawnInfo spawnInfo in spawns) + { + //if (!spawnInfo.game.HasFlag(GAME)) continue; + + //foreach (SpawnInfo.SpawnLocation location in spawnInfo.spawnLocations) + SpawnInfo.SpawnLocation location = RetargetHelpers.Pick(spawnInfo.subnautica, spawnInfo.belowZero); + NSpawnInfo nSpawnInfo = new((TechType)spawnInfo.item.techType, location.position, location.rotation); + CoordinatedSpawnsHandler.RegisterCoordinatedSpawn(nSpawnInfo); + } + } +} diff --git a/Unity/Assets/Coordinated Spawns.asset b/Unity/Assets/Coordinated Spawns.asset new file mode 100644 index 00000000..7af7c482 --- /dev/null +++ b/Unity/Assets/Coordinated Spawns.asset @@ -0,0 +1,25 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6ccb8c039e34e44ebdee40c7d89e4a4, type: 3} + m_Name: Coordinated Spawns + m_EditorClassIdentifier: + spawns: + - item: + isCustom: 0 + techType: 0 + itemData: {fileID: 0} + subnautica: + position: {x: 0, y: 0, z: 0} + rotation: {x: 0, y: 0, z: 0} + belowZero: + position: {x: 0, y: 0, z: 0} + rotation: {x: 0, y: 0, z: 0} diff --git a/Unity/Assets/Ermshark/Databank/Databank BZ.asset.meta b/Unity/Assets/Coordinated Spawns.asset.meta similarity index 79% rename from Unity/Assets/Ermshark/Databank/Databank BZ.asset.meta rename to Unity/Assets/Coordinated Spawns.asset.meta index 489e6b71..49811225 100644 --- a/Unity/Assets/Ermshark/Databank/Databank BZ.asset.meta +++ b/Unity/Assets/Coordinated Spawns.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c07efc17b4a326141b084b80f348be78 +guid: e84785f0b1b5820488bdff72c72ebe81 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Unity/Assets/Ermfish/Databank/Databank.asset b/Unity/Assets/Ermfish/Databank/Databank.asset index f38c7eeb..a5b37ef0 100644 --- a/Unity/Assets/Ermfish/Databank/Databank.asset +++ b/Unity/Assets/Ermfish/Databank/Databank.asset @@ -17,7 +17,8 @@ MonoBehaviour: isImportantUnlock: 0 scanSounds: {fileID: 8990697991671373227, guid: 1138c2d796e81ac43a4f257daf9651b7, type: 2} - encyPath: Lifeforms/Fauna/SmallHerbivores + encyPathSN: Lifeforms/Fauna/SmallHerbivores + encyPathBZ: Research/Lifeforms/Fauna/SmallHerbivores title: Ermfish texture: {fileID: 2800000, guid: d49d9f150a353394d84717884b9d8c8f, type: 3} description: {fileID: 4900000, guid: a784ad2033ad64a409b8d4ad1cda86a4, type: 3} diff --git a/Unity/Assets/Ermfish/Ermfish regular.asset b/Unity/Assets/Ermfish/Ermfish regular.asset index 87d58d20..201aeca3 100644 --- a/Unity/Assets/Ermfish/Ermfish regular.asset +++ b/Unity/Assets/Ermfish/Ermfish regular.asset @@ -49,14 +49,13 @@ MonoBehaviour: isBuildable: 0 craftingTime: 2.5 itemSounds: {fileID: 11400000, guid: bfb77f100ed7e6e4fb42c9b05bcb00af, type: 2} + pdaEncyInfo: {fileID: 11400000, guid: 8b76d116f9af8fc499d4c055bf652966, type: 2} registerInSN: 1 recipeSN: {fileID: 0} craftTreeTypeSN: 0 craftTreePathSN: techGroupSN: 14 techCategorySN: 0 - pdaEncyclopediaInfoSN: {fileID: 11400000, guid: 8b76d116f9af8fc499d4c055bf652966, - type: 2} knownTechInfoSN: {fileID: 11400000, guid: 89b8b3505e3ad2e48b2f9b7c378e4bbe, type: 2} unlockAtStartSN: 1 requiredForUnlockSN: @@ -70,8 +69,6 @@ MonoBehaviour: craftTreePathBZ: techGroupBZ: 13 techCategoryBZ: 0 - pdaEncyclopediaInfoBZ: {fileID: 11400000, guid: 8b76d116f9af8fc499d4c055bf652966, - type: 2} knownTechInfoBZ: {fileID: 11400000, guid: 89b8b3505e3ad2e48b2f9b7c378e4bbe, type: 2} soundTypeBZ: 31 unlockAtStartBZ: 1 diff --git a/Unity/Assets/Ermshark/Databank/Databank SN.asset b/Unity/Assets/Ermshark/Databank/Databank SN.asset deleted file mode 100644 index 635f5d65..00000000 --- a/Unity/Assets/Ermshark/Databank/Databank SN.asset +++ /dev/null @@ -1,23 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1160e7f4151348eb97332e6bb0a2a034, type: 3} - m_Name: Databank SN - m_EditorClassIdentifier: - scanTime: 5 - unlockSprite: {fileID: 21300000, guid: 85c36857a3ce21c49b2b3d2d1c09ecb6, type: 3} - isImportantUnlock: 0 - scanSounds: {fileID: -2996190608115189883, guid: 935233e4761193a489883563680a8478, - type: 2} - encyPath: Lifeforms/Fauna/Sharks - title: Ermshark - texture: {fileID: 2800000, guid: cee0542806d2bae418d81f925da9a9fa, type: 3} - description: {fileID: 4900000, guid: fa554e7d1e7ed174981f0e8702f16f2d, type: 3} diff --git a/Unity/Assets/Ermshark/Databank/Databank BZ.asset b/Unity/Assets/Ermshark/Databank/Databank.asset similarity index 87% rename from Unity/Assets/Ermshark/Databank/Databank BZ.asset rename to Unity/Assets/Ermshark/Databank/Databank.asset index ee200408..538f2767 100644 --- a/Unity/Assets/Ermshark/Databank/Databank BZ.asset +++ b/Unity/Assets/Ermshark/Databank/Databank.asset @@ -10,14 +10,15 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1160e7f4151348eb97332e6bb0a2a034, type: 3} - m_Name: Databank BZ + m_Name: Databank m_EditorClassIdentifier: scanTime: 5 unlockSprite: {fileID: 21300000, guid: 85c36857a3ce21c49b2b3d2d1c09ecb6, type: 3} isImportantUnlock: 0 scanSounds: {fileID: -2996190608115189883, guid: 935233e4761193a489883563680a8478, type: 2} - encyPath: Lifeforms/Fauna/Carnivores + encyPathSN: Lifeforms/Fauna/Carnivores + encyPathBZ: Research/Lifeforms/Fauna/Carnivores title: Ermshark texture: {fileID: 2800000, guid: cee0542806d2bae418d81f925da9a9fa, type: 3} description: {fileID: 4900000, guid: fa554e7d1e7ed174981f0e8702f16f2d, type: 3} diff --git a/Unity/Assets/Ermshark/Databank/Databank SN.asset.meta b/Unity/Assets/Ermshark/Databank/Databank.asset.meta similarity index 100% rename from Unity/Assets/Ermshark/Databank/Databank SN.asset.meta rename to Unity/Assets/Ermshark/Databank/Databank.asset.meta diff --git a/Unity/Assets/Ermshark/Ermshark.asset b/Unity/Assets/Ermshark/Ermshark.asset index 8bd2dfd0..b7d47588 100644 --- a/Unity/Assets/Ermshark/Ermshark.asset +++ b/Unity/Assets/Ermshark/Ermshark.asset @@ -21,14 +21,14 @@ MonoBehaviour: isCraftable: 0 isBuildable: 0 craftingTime: 2.5 + itemSounds: {fileID: 0} + pdaEncyInfo: {fileID: 11400000, guid: dbc6837d8eb5b9f42a96dcb82632b52e, type: 2} registerInSN: 1 recipeSN: {fileID: 0} craftTreeTypeSN: 0 craftTreePathSN: techGroupSN: 14 techCategorySN: 0 - pdaEncyclopediaInfoSN: {fileID: 11400000, guid: dbc6837d8eb5b9f42a96dcb82632b52e, - type: 2} knownTechInfoSN: {fileID: 0} unlockAtStartSN: 0 requiredForUnlockSN: @@ -37,13 +37,13 @@ MonoBehaviour: itemData: {fileID: 0} registerInBZ: 1 recipeBZ: {fileID: 0} + canBeRecycledBZ: 1 craftTreeTypeBZ: 0 craftTreePathBZ: techGroupBZ: 13 techCategoryBZ: 0 - pdaEncyclopediaInfoBZ: {fileID: 11400000, guid: c07efc17b4a326141b084b80f348be78, - type: 2} knownTechInfoBZ: {fileID: 0} + soundTypeBZ: 0 unlockAtStartBZ: 0 requiredForUnlockBZ: isCustom: 0 diff --git a/Unity/Assets/Registry.asset b/Unity/Assets/Registry.asset index fb4d9ac4..158f75fb 100644 --- a/Unity/Assets/Registry.asset +++ b/Unity/Assets/Registry.asset @@ -25,6 +25,7 @@ MonoBehaviour: - {fileID: 11400000, guid: c28559739ad713b4b8762ab1a05b5ae7, type: 2} - {fileID: 11400000, guid: 9524b524fdb9ada419fb4f6c3d57fbbc, type: 2} - {fileID: 11400000, guid: f240113ab1d4a1d42bcd6fc85fda4541, type: 2} + - {fileID: 11400000, guid: e84785f0b1b5820488bdff72c72ebe81, type: 2} - {fileID: 11400000, guid: 007ce99e929c7f7468c68ebf8977f560, type: 2} - {fileID: 11400000, guid: 24b80f032226d244e8d8bdd0ceb1cc0f, type: 2} - {fileID: 11400000, guid: 701583dc8b02d354ea6c2d189ce33872, type: 2} diff --git a/Unity/Assets/Scripts/SCHIZO/Interop/NaughtyAttributes/NaughtyScriptableObject.cs b/Unity/Assets/Scripts/SCHIZO/Interop/NaughtyAttributes/NaughtyScriptableObject.cs index db16b9b5..611a19fc 100644 --- a/Unity/Assets/Scripts/SCHIZO/Interop/NaughtyAttributes/NaughtyScriptableObject.cs +++ b/Unity/Assets/Scripts/SCHIZO/Interop/NaughtyAttributes/NaughtyScriptableObject.cs @@ -123,18 +123,18 @@ private static string GetDropdownListBoth(CraftTree_Type_All type) private readonly DropdownList _craftTreePaths_SN_Fabricator = new DropdownList() { {"(root)", ""}, - {"Resources", "Resources"}, - {"Resources -> Basic materials", "Resources/BasicMaterials"}, - {"Resources -> Advanced materials", "Resources/AdvancedMaterials"}, - {"Resources -> Electronics", "Resources/Electronics"}, - {"Survival", "Survival"}, - {"Survival -> Water", "Survival/Water"}, - {"Survival -> Cooked food", "Survival/CookedFood"}, - {"Survival -> Cured food", "Survival/CuredFood"}, - {"Personal", "Personal"}, - {"Personal -> Equipment", "Personal/Equipment"}, - {"Personal -> Tools", "Personal/Tools"}, - {"Personal -> Deployables", "Machines"}, + {"Resources/(root)", "Resources"}, + {"Resources/Basic materials", "Resources/BasicMaterials"}, + {"Resources/Advanced materials", "Resources/AdvancedMaterials"}, + {"Resources/Electronics", "Resources/Electronics"}, + {"Survival/(root)", "Survival"}, + {"Survival/Water", "Survival/Water"}, + {"Survival/Cooked food", "Survival/CookedFood"}, + {"Survival/Cured food", "Survival/CuredFood"}, + {"Personal/(root)", "Personal"}, + {"Personal/Equipment", "Personal/Equipment"}, + {"Personal/Tools", "Personal/Tools"}, + {"Personal/Deployables", "Machines"}, }; private readonly DropdownList _craftTreePaths_SN_MVB = new DropdownList() @@ -156,21 +156,21 @@ private static string GetDropdownListBoth(CraftTree_Type_All type) private readonly DropdownList _craftTreePaths_BZ_Fabricator = new DropdownList() { {"(root)", ""}, - {"Resources", "Resources"}, - {"Resources -> Basic materials", "Resources/BasicMaterials"}, - {"Resources -> Advanced materials", "Resources/AdvancedMaterials"}, - {"Resources -> Electronics", "Resources/Electronics"}, - {"Survival", "Survival"}, - {"Survival -> Water", "Survival/Water"}, - {"Survival -> Cooked food", "Survival/CookedFood"}, - {"Survival -> Cured food", "Survival/CuredFood"}, - {"Personal", "Personal"}, - {"Personal -> Equipment", "Personal/Equipment"}, - {"Personal -> Tools", "Personal/Tools"}, - {"Personal -> Deployables", "Machines"}, - {"Upgrades", "Upgrades"}, - {"Upgrades -> Prawn Suit Upgrades", "Upgrades/ExosuitUpgrades"}, - {"Upgrades -> Seatruck Upgrades", "Upgrades/SeatruckUpgrades"}, + {"Resources/(root)", "Resources"}, + {"Resources/Basic materials", "Resources/BasicMaterials"}, + {"Resources/Advanced materials", "Resources/AdvancedMaterials"}, + {"Resources/Electronics", "Resources/Electronics"}, + {"Survival/(root)", "Survival"}, + {"Survival/Water", "Survival/Water"}, + {"Survival/Cooked food", "Survival/CookedFood"}, + {"Survival/Cured food", "Survival/CuredFood"}, + {"Personal/(root)", "Personal"}, + {"Personal/Equipment", "Personal/Equipment"}, + {"Personal/Tools", "Personal/Tools"}, + {"Personal/Deployables", "Machines"}, + {"Upgrades/(root)", "Upgrades"}, + {"Upgrades/Prawn Suit Upgrades", "Upgrades/ExosuitUpgrades"}, + {"Upgrades/Seatruck Upgrades", "Upgrades/SeatruckUpgrades"}, }; private readonly DropdownList _craftTreePaths_BZ_MVB = new DropdownList() diff --git a/Unity/Assets/Scripts/SCHIZO/Items/Data/ItemData.cs b/Unity/Assets/Scripts/SCHIZO/Items/Data/ItemData.cs index 799bef34..edda4b92 100644 --- a/Unity/Assets/Scripts/SCHIZO/Items/Data/ItemData.cs +++ b/Unity/Assets/Scripts/SCHIZO/Items/Data/ItemData.cs @@ -8,7 +8,6 @@ using SCHIZO.Attributes.Visual; using SCHIZO.Sounds; using UnityEngine; -using UnityEngine.Serialization; using static NaughtyAttributes.EConditionOperator; namespace SCHIZO.Items.Data @@ -45,9 +44,12 @@ public partial class ItemData : ModRegistryItem [CommonData, ShowIf(nameof(Sounds_ShowIf))] public ItemSounds itemSounds; + [CommonData, Label("PDA Ency Info")] + public PDAEncyclopediaInfo pdaEncyInfo; + #region Subnautica Data - [SNData, Label("Register"), SerializeField, Careful] + [SNData, Label("Register"), Careful] public bool registerInSN = true; [SNData, Label("Recipe"), SerializeField, ShowIf(And, nameof(registerInSN), nameof(IsBuildableOrCraftable)), Careful] @@ -65,9 +67,6 @@ public partial class ItemData : ModRegistryItem [SNData, Label("Tech Category"), SerializeField, ShowIf(And, nameof(registerInSN), nameof(techCategorySN_ShowIf)), UsedImplicitly] private TechCategory_SN techCategorySN; - [FormerlySerializedAs("databankInfoSN"), SNData, Label("PDA Ency Info"), SerializeField, UsedImplicitly, ShowIf(nameof(registerInSN))] - private PDAEncyclopediaInfo pdaEncyclopediaInfoSN; - [SNData, Label("Known Tech Info"), SerializeField, UsedImplicitly, ShowIf(And, nameof(registerInSN), nameof(ShowPickupableProps))] private KnownTechInfo knownTechInfoSN; @@ -81,7 +80,7 @@ public partial class ItemData : ModRegistryItem #region Below Zero Data - [BZData, Label("Register"), SerializeField, Careful] + [BZData, Label("Register"), Careful] public bool registerInBZ = true; [BZData, Label("Recipe"), SerializeField, ShowIf(And, nameof(registerInBZ), nameof(IsBuildableOrCraftable)), Careful] @@ -102,9 +101,6 @@ public partial class ItemData : ModRegistryItem [BZData, Label("Tech Category"), SerializeField, ShowIf(And, nameof(registerInBZ), nameof(techCategoryBZ_ShowIf)), UsedImplicitly] private TechCategory_BZ techCategoryBZ; - [FormerlySerializedAs("databankInfoBZ")] [BZData, Label("PDA Ency Info"), SerializeField, UsedImplicitly, ShowIf(nameof(registerInBZ))] - private PDAEncyclopediaInfo pdaEncyclopediaInfoBZ; - [BZData, Label("Known Tech Info"), SerializeField, UsedImplicitly, ShowIf(And, nameof(registerInBZ), nameof(ShowPickupableProps))] private KnownTechInfo knownTechInfoBZ; diff --git a/Unity/Assets/Scripts/SCHIZO/Items/Data/PDAEncyclopediaInfo.cs b/Unity/Assets/Scripts/SCHIZO/Items/Data/PDAEncyclopediaInfo.cs index 0795e3d5..019d9101 100644 --- a/Unity/Assets/Scripts/SCHIZO/Items/Data/PDAEncyclopediaInfo.cs +++ b/Unity/Assets/Scripts/SCHIZO/Items/Data/PDAEncyclopediaInfo.cs @@ -1,4 +1,8 @@ -using NaughtyAttributes; +using System; +using NaughtyAttributes; +using SCHIZO.Attributes.Validation; +using SCHIZO.Interop.NaughtyAttributes; +using SCHIZO.Registering; using SCHIZO.Sounds.Collections; using UnityEngine; @@ -12,9 +16,126 @@ public sealed class PDAEncyclopediaInfo : ScriptableObject [BoxGroup("Scanning")] public bool isImportantUnlock; [BoxGroup("Scanning")] public SoundCollectionInstance scanSounds; - [BoxGroup("Databank")] public string encyPath; + [BoxGroup("Databank"), EncyPath(Game.Subnautica)] public string encyPathSN; + [BoxGroup("Databank"), EncyPath(Game.BelowZero)] public string encyPathBZ; [BoxGroup("Databank")] public string title; [BoxGroup("Databank")] public Texture2D texture; [BoxGroup("Databank")] public TextAsset description; + + private sealed class EncyPathAttribute : SwitchDropdownAttribute + { + private readonly Game _game; + + public EncyPathAttribute(Game game) + { + _game = game; + } + + public override string GetDropdownListName(SerializedPropertyHolder property) + { + switch (_game) + { + case Game.Subnautica: + return nameof(_encyPaths_SN); + + case Game.BelowZero: + return nameof(_encyPaths_BZ); + + default: + throw new NotSupportedException($"Choose either Subnautica or BelowZero for {nameof(EncyPathAttribute)}"); + } + } + + } + + private readonly DropdownList _encyPaths_SN = new DropdownList() + { + {"(root)", ""}, + + {"Advanced Theories", "Advanced"}, + + {"Blueprints/(root)", "Tech"}, + {"Blueprints/Equipment", "Tech/Equipment"}, + {"Blueprints/Habitat Installations", "Tech/Habitats"}, + {"Blueprints/Vehicles", "Tech/Vehicles"}, + {"Blueprints/Power", "Tech/Power"}, + + {"Data Downloads/(root)", "DownloadedData"}, + {"Data Downloads/Alien Data/(root)", "DownloadedData/Precursor"}, + {"Data Downloads/Alien Data/Artifacts", "DownloadedData/Precursor/Artifacts"}, + {"Data Downloads/Alien Data/Scan Data", "DownloadedData/Precursor/Scan"}, + {"Data Downloads/Alien Data/Terminal Data", "DownloadedData/Precursor/Terminal"}, + {"Data Downloads/Aurora Survivors", "DownloadedData/AuroraSurvivors"}, + {"Data Downloads/Codes && Clues", "DownloadedData/Codes"}, + {"Data Downloads/Degasi Survivors/(root)", "DownloadedData/Degasi"}, + {"Data Downloads/Degasi Survivors/Alterra Search && Rescue Mission", "DownloadedData/Degasi/Orders"}, + {"Data Downloads/Operations Logs", "DownloadedData/BeforeCrash"}, + {"Data Downloads/Public Documents", "DownloadedData/PublicDocs"}, + + {"Indigenous Lifeforms/(root)", "Lifeforms"}, + {"Indigenous Lifeforms/Coral", "Lifeforms/Coral"}, + {"Indigenous Lifeforms/Fauna/(root)", "Lifeforms/Fauna"}, + {"Indigenous Lifeforms/Fauna/Carnivores", "Lifeforms/Fauna/Carnivores"}, + {"Indigenous Lifeforms/Fauna/Deceased", "Lifeforms/Fauna/Deceased"}, + {"Indigenous Lifeforms/Fauna/Herbivores - Large", "Lifeforms/Fauna/LargeHerbivores"}, + {"Indigenous Lifeforms/Fauna/Herbivores - Small", "Lifeforms/Fauna/SmallHerbivores"}, + {"Indigenous Lifeforms/Fauna/Leviathans", "Lifeforms/Fauna/Leviathans"}, + {"Indigenous Lifeforms/Fauna/Scavengers && Parasites", "Lifeforms/Fauna/Scavengers"}, + + {"Indigenous Lifeforms/Flora/(root)", "Lifeforms/Flora"}, + {"Indigenous Lifeforms/Flora/Exploitable", "Lifeforms/Flora/Exploitable"}, + {"Indigenous Lifeforms/Flora/Land", "Lifeforms/Flora/Land"}, + {"Indigenous Lifeforms/Flora/Sea", "Lifeforms/Flora/Sea"}, + + {"Geological Data", "PlanetaryGeology"}, + + {"Survival Package/(root)", "Welcome"}, + {"Survival Package/Additional Technical", "Welcome/StartGear"}, + + {"Time Capsules", "TimeCapsules"}, + }; + + private readonly DropdownList _encyPaths_BZ = new DropdownList() + { + {"(root)", ""}, + + {"Logs && Communications/(root)", "DownloadedData"}, + {"Logs && Communications/Alterra", "DownloadedData/Alterra"}, + {"Logs && Communications/Alterra Personnel", "DownloadedData/AlterraPersonnel"}, + {"Logs && Communications/Maps", "DownloadedData/Maps"}, + {"Logs && Communications/Marguerit", "DownloadedData/Marguerit"}, + {"Logs && Communications/Memos && Miscellany", "DownloadedData/Memos"}, + {"Logs && Communications/Mercury II Logs", "DownloadedData/ShipWreck"}, + {"Logs && Communications/News", "DownloadedData/News"}, + {"Logs && Communications/Sam", "DownloadedData/Sam"}, + + {"Personal Log", "PersonalLog"}, + + {"Research/(root)", "Research"}, + {"Research/Alien Data", "Research/Precursor"}, + {"Research/Geological Data", "Research/PlanetaryGeology"}, + {"Research/Indigenous Lifeforms/(root)", "Research"}, + {"Research/Indigenous Lifeforms/Coral", "Research/Lifeforms/Coral"}, + {"Research/Indigenous Lifeforms/Fauna/(root)", "Research/Lifeforms/Fauna"}, + {"Research/Indigenous Lifeforms/Fauna/Carnivores", "Research/Lifeforms/Fauna/Carnivores"}, + {"Research/Indigenous Lifeforms/Fauna/Herbivores - Large", "Research/Lifeforms/Fauna/LargeHerbivores"}, + {"Research/Indigenous Lifeforms/Fauna/Herbivores - Small", "Research/Lifeforms/Fauna/SmallHerbivores"}, + {"Research/Indigenous Lifeforms/Fauna/Leviathans/(root)", "Research/Lifeforms/Fauna/Leviathans"}, + {"Research/Indigenous Lifeforms/Fauna/Leviathans/Frozen Creature", "Research/Lifeforms/Fauna/Leviathans/FrozenCreature"}, + {"Research/Indigenous Lifeforms/Fauna/Other", "Research/Lifeforms/Fauna/Other"}, + {"Research/Indigenous Lifeforms/Fauna/Scavengers && Parasites", "Research/Lifeforms/Fauna/Scavengers"}, + {"Research/Indigenous Lifeforms/Flora/(root)", "Lifeforms/Flora"}, + {"Research/Indigenous Lifeforms/Flora/Exploitable", "Lifeforms/Flora/Exploitable"}, + {"Research/Indigenous Lifeforms/Flora/Land", "Lifeforms/Flora/Land"}, + {"Research/Indigenous Lifeforms/Flora/Sea", "Lifeforms/Flora/Sea"}, + + {"Survival", "Survival"}, + + {"Tech/(root)", "Tech"}, + {"Tech/Equipment", "Tech/Equipment"}, + {"Tech/Habitat Installations", "Tech/Habitats"}, + {"Tech/Power", "Tech/Power"}, + {"Tech/Vehicles", "Tech/Vehicles"}, + }; } } diff --git a/Unity/Assets/Scripts/SCHIZO/Spawns.meta b/Unity/Assets/Scripts/SCHIZO/Spawns.meta new file mode 100644 index 00000000..2243b5bd --- /dev/null +++ b/Unity/Assets/Scripts/SCHIZO/Spawns.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c7851ea92e5e9634fb94667e545b6835 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs b/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs new file mode 100644 index 00000000..eb466ea4 --- /dev/null +++ b/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using SCHIZO.Registering; +using SCHIZO.Items.Data.Crafting; +using NaughtyAttributes; + +namespace SCHIZO.Spawns +{ + [CreateAssetMenu(menuName = "SCHIZO/Registering/Coordinated Spawns")] + public sealed partial class CoordinatedSpawns : ModRegistryItem + { + [ReorderableList] + public List spawns = new List(); + [Serializable] + public sealed partial class SpawnInfo + { + public Item item; + public SpawnLocation subnautica; + public SpawnLocation belowZero; + + [Serializable] + public partial struct SpawnLocation + { + public Vector3 position; + public Vector3 rotation; + } + } + } +} \ No newline at end of file diff --git a/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs.meta b/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs.meta new file mode 100644 index 00000000..f0b91b0b --- /dev/null +++ b/Unity/Assets/Scripts/SCHIZO/Spawns/CoordinatedSpawns.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a6ccb8c039e34e44ebdee40c7d89e4a4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Unity/Assets/Tutel/Databank/PDA Encyclopedia Info.asset b/Unity/Assets/Tutel/Databank/Tutel Ency.asset similarity index 86% rename from Unity/Assets/Tutel/Databank/PDA Encyclopedia Info.asset rename to Unity/Assets/Tutel/Databank/Tutel Ency.asset index 82adf8ac..9b38514f 100644 --- a/Unity/Assets/Tutel/Databank/PDA Encyclopedia Info.asset +++ b/Unity/Assets/Tutel/Databank/Tutel Ency.asset @@ -10,14 +10,15 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 1160e7f4151348eb97332e6bb0a2a034, type: 3} - m_Name: PDA Encyclopedia Info + m_Name: Tutel Ency m_EditorClassIdentifier: scanTime: 5 unlockSprite: {fileID: 21300000, guid: 3b57e6f5b26fa7645b62b4b09d12d18e, type: 3} isImportantUnlock: 0 scanSounds: {fileID: 5553836039373703376, guid: ef492aad68c54354fbddb8f880c89f34, type: 2} - encyPath: Lifeforms/Fauna/SmallHerbivores + encyPathSN: Lifeforms/Fauna/SmallHerbivores + encyPathBZ: Research/Lifeforms/Fauna/SmallHerbivores title: Tutel texture: {fileID: 2800000, guid: 7b273e37743f05b4d9823beffcd9c2a6, type: 3} description: {fileID: 4900000, guid: 40be8119d6a5f7840bf2056fa5123359, type: 3} diff --git a/Unity/Assets/Tutel/Databank/PDA Encyclopedia Info.asset.meta b/Unity/Assets/Tutel/Databank/Tutel Ency.asset.meta similarity index 100% rename from Unity/Assets/Tutel/Databank/PDA Encyclopedia Info.asset.meta rename to Unity/Assets/Tutel/Databank/Tutel Ency.asset.meta diff --git a/Unity/Assets/Tutel/Tutel fish.asset b/Unity/Assets/Tutel/Tutel fish.asset index f61251e3..24d1d474 100644 --- a/Unity/Assets/Tutel/Tutel fish.asset +++ b/Unity/Assets/Tutel/Tutel fish.asset @@ -49,14 +49,13 @@ MonoBehaviour: isBuildable: 0 craftingTime: 2.5 itemSounds: {fileID: 11400000, guid: 848cf4fb2ef44a84987c76d50f291e0d, type: 2} + pdaEncyInfo: {fileID: 11400000, guid: aa86b808e104bfa49905cfd6c27e78fd, type: 2} registerInSN: 1 recipeSN: {fileID: 0} craftTreeTypeSN: 0 craftTreePathSN: techGroupSN: 14 techCategorySN: 0 - pdaEncyclopediaInfoSN: {fileID: 11400000, guid: aa86b808e104bfa49905cfd6c27e78fd, - type: 2} knownTechInfoSN: {fileID: 11400000, guid: ba024ae7fd4b2f649bbb22d395a493fe, type: 2} unlockAtStartSN: 1 requiredForUnlockSN: @@ -70,8 +69,6 @@ MonoBehaviour: craftTreePathBZ: techGroupBZ: 13 techCategoryBZ: 0 - pdaEncyclopediaInfoBZ: {fileID: 11400000, guid: aa86b808e104bfa49905cfd6c27e78fd, - type: 2} knownTechInfoBZ: {fileID: 11400000, guid: ba024ae7fd4b2f649bbb22d395a493fe, type: 2} soundTypeBZ: 31 unlockAtStartBZ: 1