From d798a947c5f945072e395205c3f55d47333021a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 00:10:18 -0300 Subject: [PATCH 01/32] Rework asset data and improve role system --- .../Content/Data/Icons/InteractionIcons.asset | 20 ++- Assets/Content/Data/Roles/Assistant.asset | 4 +- .../Roles/Loadouts/AssistantLoadout.asset | 41 ++--- .../Data/Roles/Loadouts/SecurityLoadout.asset | 37 ++-- Assets/Content/Data/Roles/Security.asset | 4 +- Assets/Content/Data/Scenes.asset | 14 +- Assets/Content/Data/Settings.asset | 8 +- .../SS3D/CodeGeneration/EnumCreator.cs | 5 +- .../SS3D/CodeGeneration/StaticClassCreator.cs | 33 ++++ .../CodeGeneration/StaticClassCreator.cs.meta | 3 + .../SS3D/CodeGeneration/StaticClassWriter.cs | 43 +++++ .../CodeGeneration/StaticClassWriter.cs.meta | 3 + .../SS3D/Core/ApplicationInitializerSystem.cs | 2 +- Assets/Scripts/SS3D/Core/LogManager.cs | 4 +- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 27 +-- .../AssetDatabaseInspectorEditor.cs | 18 +- .../AssetDatabaseSettingsInspectorEditor.cs | 19 ++- Assets/Scripts/SS3D/Data/Assets.cs | 83 +-------- Assets/Scripts/SS3D/Data/Bodyparts.cs | 17 ++ Assets/Scripts/SS3D/Data/Bodyparts.cs.meta | 3 + .../Scripts/SS3D/Data/Enums/AssetDatabases.cs | 21 +-- .../Scripts/SS3D/Data/Enums/BodyPartsIds.cs | 11 ++ .../SS3D/Data/Enums/InteractionIcons.cs | 20 ++- Assets/Scripts/SS3D/Data/Enums/ItemId.cs | 160 ++++++++++-------- Assets/Scripts/SS3D/Data/Enums/Scenes.cs | 14 +- Assets/Scripts/SS3D/Data/Enums/SettingsId.cs | 8 +- Assets/Scripts/SS3D/Data/Icons.cs | 17 ++ Assets/Scripts/SS3D/Data/Icons.cs.meta | 3 + Assets/Scripts/SS3D/Data/Items.cs | 17 ++ Assets/Scripts/SS3D/Data/Items.cs.meta | 3 + .../Editor/EditorSceneUtils.cs | 20 +-- .../SceneManagement/Editor/SceneSwitcher.cs | 4 +- Assets/Scripts/SS3D/SceneManagement/Scene.cs | 25 +-- .../Combat/Interactions/HitInteraction.cs | 2 +- .../SS3D/Systems/Entities/EntitySystem.cs | 4 +- .../Furniture/DispenseProductInteraction.cs | 2 +- .../Furniture/LockLockerInteraction.cs | 2 +- Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs | 2 +- .../Furniture/UnlockLockerInteraction.cs | 2 +- .../SS3D/Systems/Furniture/VendingMachine.cs | 6 +- .../Commands/AddHandCommand.cs | 40 ++++- .../Containers/ContainerInteractive.cs | 8 +- .../Inventory/Containers/HumanInventory.cs | 5 +- .../Inventory/Interactions/DropInteraction.cs | 2 +- .../Inventory/Interactions/OpenInteraction.cs | 2 +- .../Interactions/PickupInteraction.cs | 2 +- .../Interactions/StoreInteraction.cs | 2 +- .../Interactions/TakeFirstInteraction.cs | 3 +- .../Interactions/ViewContainerInteraction.cs | 2 +- .../Items/Generic/HonkInteraction.cs | 2 +- .../Items/Generic/NukeDetonateInteraction.cs | 2 +- .../Systems/Inventory/Items/ItemSystem.cs | 73 +++----- .../Systems/Roles/Editor/RoleLoadoutEditor.cs | 129 -------------- .../Roles/Editor/RoleLoadoutEditor.cs.meta | 11 -- Assets/Scripts/SS3D/Systems/Roles/RoleData.cs | 8 +- .../Scripts/SS3D/Systems/Roles/RoleLoadout.cs | 37 +--- .../Scripts/SS3D/Systems/Roles/RoleSystem.cs | 65 +++---- .../Tests/Asset Audit/AssetDataTests.cs | 4 +- 58 files changed, 552 insertions(+), 576 deletions(-) create mode 100644 Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs create mode 100644 Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta create mode 100644 Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs create mode 100644 Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Bodyparts.cs create mode 100644 Assets/Scripts/SS3D/Data/Bodyparts.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs create mode 100644 Assets/Scripts/SS3D/Data/Icons.cs create mode 100644 Assets/Scripts/SS3D/Data/Icons.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Items.cs create mode 100644 Assets/Scripts/SS3D/Data/Items.cs.meta delete mode 100644 Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs delete mode 100644 Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs.meta diff --git a/Assets/Content/Data/Icons/InteractionIcons.asset b/Assets/Content/Data/Icons/InteractionIcons.asset index 1a404f06e6..b139b9b6e4 100644 --- a/Assets/Content/Data/Icons/InteractionIcons.asset +++ b/Assets/Content/Data/Icons/InteractionIcons.asset @@ -16,9 +16,17 @@ MonoBehaviour: EnumName: InteractionIcons AssetGroup: {fileID: 11400000, guid: 43f5c5834bd38014f9dbacb0f51bcc54, type: 2} Assets: - - {fileID: 21300000, guid: b22067d36fa963b4bbaf8d6085b0ebc9, type: 2} - - {fileID: 21300000, guid: 2db953f2ae8f41d4e9842d9144a9e396, type: 2} - - {fileID: 21300000, guid: 1f97d7fac1be1b448824c85e156d9746, type: 2} - - {fileID: 21300000, guid: e4d142ab75244e24c89d0c2aec36dbed, type: 2} - - {fileID: 21300000, guid: 88c0c549992b597489791caf4a12f18c, type: 2} - - {fileID: 21300000, guid: 3030468639c4d15459be5f65d30a42df, type: 2} + _list: + - _key: Power + _value: {fileID: 21300000, guid: b22067d36fa963b4bbaf8d6085b0ebc9, type: 2} + - _key: Take + _value: {fileID: 21300000, guid: 2db953f2ae8f41d4e9842d9144a9e396, type: 2} + - _key: Open + _value: {fileID: 21300000, guid: 1f97d7fac1be1b448824c85e156d9746, type: 2} + - _key: Discard + _value: {fileID: 21300000, guid: e4d142ab75244e24c89d0c2aec36dbed, type: 2} + - _key: Honk + _value: {fileID: 21300000, guid: 88c0c549992b597489791caf4a12f18c, type: 2} + - _key: Nuke + _value: {fileID: 21300000, guid: 3030468639c4d15459be5f65d30a42df, type: 2} + _new: diff --git a/Assets/Content/Data/Roles/Assistant.asset b/Assets/Content/Data/Roles/Assistant.asset index 6d5936e9f6..1fa6f33e8e 100644 --- a/Assets/Content/Data/Roles/Assistant.asset +++ b/Assets/Content/Data/Roles/Assistant.asset @@ -13,8 +13,8 @@ MonoBehaviour: m_Name: Assistant m_EditorClassIdentifier: _roleName: Assistant - _pdaPrefab: 5 - _idCardPrefab: 6 + _pdaPrefab: {fileID: 5261116577612792016, guid: 2a63163a4db141744a802f3ff67087db, type: 3} + _idCardPrefab: {fileID: 5261116577612792016, guid: ff95abc9c2b779340a1b50f1a128a934, type: 3} _permissions: - {fileID: 11400000, guid: 921240e0c27686d4eaf2ff761944c5eb, type: 2} _loadout: {fileID: 11400000, guid: 5db09cbd548ecf34f97473fb3898e95e, type: 2} diff --git a/Assets/Content/Data/Roles/Loadouts/AssistantLoadout.asset b/Assets/Content/Data/Roles/Loadouts/AssistantLoadout.asset index 05fe287b65..0df0584268 100644 --- a/Assets/Content/Data/Roles/Loadouts/AssistantLoadout.asset +++ b/Assets/Content/Data/Roles/Loadouts/AssistantLoadout.asset @@ -12,29 +12,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9fbd6da0c74d76746b141068081e0dc3, type: 3} m_Name: AssistantLoadout m_EditorClassIdentifier: - LeftHand: 0 - RightHand: 0 - LeftPocket: 0 - RightPocket: 0 - LeftGlove: 1 - RightGlove: 1 - LeftShoe: 1 - RightShoe: 1 - Hat: 1 - Glasses: 0 - LeftEar: 0 - RightEar: 1 - Jumpsuit: 1 - LeftHandItem: 0 - RightHandItem: 0 - LeftPocketItem: 0 - RightPocketItem: 0 - LeftGloveItem: 32 - RightGloveItem: 33 - LeftShoeItem: 37 - RightShoeItem: 38 - HatItem: 29 - GlassesItem: 0 - LeftEarItem: 0 - RightEarItem: 43 - JumpsuitItem: 36 + HandLeft: {fileID: 5533951594911835035, guid: 264ea51d92067c14ebc6633999afac78, type: 3} + HandRight: {fileID: 0} + Equipment: + _list: + - _key: 512 + _value: {fileID: 624365323667193292, guid: 236b51ddc6f9aa94ca92579082370c06, type: 3} + - _key: 16 + _value: {fileID: 6003340987905195654, guid: 5fa15d6fdef93dc4e80d798cefe8be0b, type: 3} + - _key: 32 + _value: {fileID: 930591319891399865, guid: 317ec7dcff3b11d4eae3a47929200b93, type: 3} + - _key: 2048 + _value: {fileID: 739222591386748088, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3} + - _key: 4096 + _value: {fileID: 4581819739591165899, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3} + _new: 0 diff --git a/Assets/Content/Data/Roles/Loadouts/SecurityLoadout.asset b/Assets/Content/Data/Roles/Loadouts/SecurityLoadout.asset index 4201582a6c..605d9a64b5 100644 --- a/Assets/Content/Data/Roles/Loadouts/SecurityLoadout.asset +++ b/Assets/Content/Data/Roles/Loadouts/SecurityLoadout.asset @@ -12,29 +12,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 9fbd6da0c74d76746b141068081e0dc3, type: 3} m_Name: SecurityLoadout m_EditorClassIdentifier: - LeftHand: 0 - RightHand: 0 - LeftPocket: 0 - RightPocket: 0 - LeftGlove: 1 - RightGlove: 1 - LeftShoe: 1 - RightShoe: 1 - Hat: 1 - Glasses: 0 - LeftEar: 0 - RightEar: 1 - Jumpsuit: 1 - LeftHandItem: 30 - RightHandItem: 0 - LeftPocketItem: 0 - RightPocketItem: 0 - LeftGloveItem: 32 - RightGloveItem: 33 - LeftShoeItem: 37 - RightShoeItem: 38 - HatItem: 29 - GlassesItem: 0 - LeftEarItem: 0 - RightEarItem: 43 - JumpsuitItem: 41 + HandLeft: {fileID: 8197868818743549203, guid: 1d2cf546d53e3fe4c9103007427aaec7, type: 3} + HandRight: {fileID: 0} + Equipment: + _list: + - _key: 512 + _value: {fileID: 726792282085660869, guid: 4635651592391df41b6b2413afdb76c3, type: 3} + - _key: 16 + _value: {fileID: 60374868058361228, guid: 4b790b4ffedbe564dab49f896d71eaa6, type: 3} + - _key: 32 + _value: {fileID: 2653363475000095017, guid: d7d68992cbd3cda45bb11a35a1490dc3, type: 3} + _new: 0 diff --git a/Assets/Content/Data/Roles/Security.asset b/Assets/Content/Data/Roles/Security.asset index 5e0445f740..a0cf26684f 100644 --- a/Assets/Content/Data/Roles/Security.asset +++ b/Assets/Content/Data/Roles/Security.asset @@ -13,8 +13,8 @@ MonoBehaviour: m_Name: Security m_EditorClassIdentifier: _roleName: Security - _pdaPrefab: 3 - _idCardPrefab: 4 + _pdaPrefab: {fileID: 5261116577612792016, guid: 79260483ae5d3e04fa272e092b49abac, type: 3} + _idCardPrefab: {fileID: 5261116577612792016, guid: d8b0c8d1ddcdeb24d9763054c103c9fe, type: 3} _permissions: - {fileID: 11400000, guid: 921240e0c27686d4eaf2ff761944c5eb, type: 2} - {fileID: 11400000, guid: 6f6e80ff9f87f7e4d810b2e9dcb013df, type: 2} diff --git a/Assets/Content/Data/Scenes.asset b/Assets/Content/Data/Scenes.asset index 0b9111ea06..fb6c9e1a74 100644 --- a/Assets/Content/Data/Scenes.asset +++ b/Assets/Content/Data/Scenes.asset @@ -16,7 +16,13 @@ MonoBehaviour: EnumName: Scenes AssetGroup: {fileID: 11400000, guid: bacca0c47905ef441803065410c8978e, type: 2} Assets: - - {fileID: 102900000, guid: 9fc0d4010bbf28b4594072e72b8655ab, type: 3} - - {fileID: 102900000, guid: c7d05c35cd4853643a09333ecceff608, type: 3} - - {fileID: 102900000, guid: d03a300180bde5646b09bfa4c392679f, type: 3} - - {fileID: 102900000, guid: 61687ab4465bb6e4d8164057bedc63db, type: 3} + _list: + - _key: Boot + _value: {fileID: 102900000, guid: 9fc0d4010bbf28b4594072e72b8655ab, type: 3} + - _key: Game + _value: {fileID: 102900000, guid: c7d05c35cd4853643a09333ecceff608, type: 3} + - _key: Launcher + _value: {fileID: 102900000, guid: d03a300180bde5646b09bfa4c392679f, type: 3} + - _key: Intro + _value: {fileID: 102900000, guid: 61687ab4465bb6e4d8164057bedc63db, type: 3} + _new: diff --git a/Assets/Content/Data/Settings.asset b/Assets/Content/Data/Settings.asset index 7de4a973e3..917df0cad8 100644 --- a/Assets/Content/Data/Settings.asset +++ b/Assets/Content/Data/Settings.asset @@ -16,5 +16,9 @@ MonoBehaviour: EnumName: SettingsId AssetGroup: {fileID: 11400000, guid: 9bfbc9d4c2c1bb944942108648547da2, type: 2} Assets: - - {fileID: 11400000, guid: 443046479504c5640b8f5902a102c09f, type: 2} - - {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} + _list: + - _key: ApplicationSettings + _value: {fileID: 11400000, guid: 443046479504c5640b8f5902a102c09f, type: 2} + - _key: LogSettings + _value: {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} + _new: diff --git a/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs index 3e5a206c5b..04b9e8878e 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs @@ -19,10 +19,13 @@ public static void CreateAtPath(string path, string enumName, IEnumerable enums = assets.Select(reference => reference.name); + List enumerable = enums.ToList(); + enumerable.Insert(0, "None"); + string dataPath = Application.dataPath; string fullPath = dataPath + path; - CodeWriter.WriteEnum(fullPath, enumName, enums, namespaceName); + CodeWriter.WriteEnum(fullPath, enumName, enumerable, namespaceName); EditorWindow.focusedWindow.ShowNotification(new GUIContent($"All assets loaded and {namespaceName}.{enumName} enum created at {path}.")); } #endif diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs new file mode 100644 index 0000000000..d57ee11cd0 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace SS3D.CodeGeneration +{ + public static class StaticClassCreator + { + #if UNITY_EDITOR + /// + /// Creates an enum in the object path, with the defined enum name and using a list of provided assets as its elements. + /// + /// + /// + /// + public static void CreateAtPath(string path, string className, IEnumerable assets, string namespaceName = "SS3D.Data.Enums") + { + IEnumerable enums = assets.Select(reference => reference.name); + + string dataPath = Application.dataPath; + string fullPath = dataPath + path; + + StaticClassWriter.WriteStaticClass(fullPath, className, enums, namespaceName); + + if (EditorWindow.focusedWindow != null) + { + EditorWindow.focusedWindow.ShowNotification(new GUIContent($"All assets loaded and {namespaceName}.{className} class created at {path}.")); + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta new file mode 100644 index 0000000000..cbd512668c --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 66c8c7b5ddf54254b3bfcf5c6223f212 +timeCreated: 1695767234 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs new file mode 100644 index 0000000000..68609b0cc2 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace SS3D.CodeGeneration +{ + public static class StaticClassWriter + { + public static void WriteStaticClass(string filePath, string className, IEnumerable items, string namespaceName = "SS3D.Data.Enums") + { + IEnumerable filtered = items.GroupBy(name => name).Select(nameGroup => nameGroup.Key); + + SourceFile sourceFile = new(); + using (new NamespaceScope(sourceFile, namespaceName)) + { + sourceFile.AppendLine($"public class {className}"); + + using (new BracesScope(sourceFile)) + { + for (int index = 0; index < filtered.ToList().Count; index++) + { + string member = filtered.ToList()[index]; + if (string.IsNullOrWhiteSpace(member)) + { + continue; + } + + char[] corrected = member.ToCharArray(); + corrected[0] = corrected[0].ToString().ToUpper()[0]; + + StringBuilder stringBuilder = new(); + stringBuilder.Append(corrected); + + sourceFile.AppendLine($"public static string {stringBuilder} = \"{stringBuilder}\";\n"); + } + } + } + + File.WriteAllText(filePath + "/" + className + ".cs", sourceFile.ToString()); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta new file mode 100644 index 0000000000..0e1c298255 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 37ea9927b0a648c792d075a3499f9db1 +timeCreated: 1695767291 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs index fdb2a5cf9d..28ae1bd38e 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs @@ -29,7 +29,7 @@ private void InitializeLauncher() CommandLineArgsSystem startArgsSystem = Subsystems.Get(); ApplicationSettings applicationSettings = ScriptableSettings.GetOrFind(); - Scenes sceneToLoad = startArgsSystem.HasCommandLineArgs() ? Scenes.Intro : Scenes.Launcher; + string sceneToLoad = startArgsSystem.HasCommandLineArgs() ? Scenes.Intro : Scenes.Launcher; if (applicationSettings.ForceLauncher && !startArgsSystem.HasCommandLineArgs()) { diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index 1dec1b69cd..50359f6775 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -34,7 +34,7 @@ static LogManager() if (Application.isPlaying) { - Settings = Assets.Get(Data.Enums.AssetDatabases.Settings, (int)Data.Enums.SettingsId.LogSettings); + settings = Assets.Get(AssetDatabases.Settings, SettingsId.LogSettings); } } @@ -54,8 +54,6 @@ public static void Initialize() // Configure writing to Unity's console, using our custom text formatter. configuration = configuration.WriteTo.Unity3D(formatter: new SS3DUnityTextFormatter(outputTemplate: DefaultUnityLogTemplate)); - - // Create the logger from the configuration. Log.Logger = configuration.CreateLogger(); } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index b86f7acc05..82d59dd8bd 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -1,6 +1,9 @@ -using System.Collections.Generic; +using Coimbra; +using JetBrains.Annotations; +using System.Collections.Generic; using Object = UnityEngine.Object; using SS3D.Attributes; +using UnityEditor; using UnityEngine; #if UNITY_EDITOR @@ -40,9 +43,9 @@ public class AssetDatabase : ScriptableObject /// /// All loaded assets that will be included in the built game. /// - [ReadOnly] + //[ReadOnly] #endif - public List Assets; + public SerializableDictionary Assets; #if UNITY_EDITOR /// @@ -50,13 +53,14 @@ public class AssetDatabase : ScriptableObject /// public void LoadAssetsFromAssetGroup() { - if (Assets == null) return; - Assets.Clear(); + Assets ??= new SerializableDictionary(); foreach (AddressableAssetEntry entry in AssetGroup.entries) { - Assets.Add(entry.MainAsset); + Assets.TryAdd(entry.MainAsset.name, entry.MainAsset); } + + EditorUtility.SetDirty(this); } #endif @@ -65,12 +69,15 @@ public void LoadAssetsFromAssetGroup() /// /// WARNING: Not sure how /// - /// Uses the ID of the asset cast into a int to get the asset from a list position. + /// Uses the ID of the asset cast into a int to get the asset from a list position. /// The type of asset to get. /// - public T Get(int index) where T : Object + [CanBeNull] + public T Get(string id) where T : Object { - return Assets[index] as T; + Assets.TryGetValue(id, out Object asset); + + return asset as T; } public bool TryGet(int index, out T asset) where T : Object @@ -91,7 +98,7 @@ public bool TryGet(int index, out T asset) where T : Object /// public void Add(Object asset) where TAsset : Object { - Assets.Add(asset as TAsset); + Assets.Add(asset.name, asset as TAsset); } #if UNITY_EDITOR diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs index 8ded355b86..e872fd111c 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs @@ -1,6 +1,7 @@ #if UNITY_EDITOR using SS3D.CodeGeneration; using System; +using System.Collections.Generic; using UnityEditor; using UnityEditor.AddressableAssets.Settings; using UnityEditor.UIElements; @@ -60,13 +61,20 @@ public override VisualElement CreateInspectorGUI() _enumNameTextField.value = _assetDatabase.EnumName; _assetGroupObjectField.value = _assetDatabase.AssetGroup; + _assetDatabase.LoadAssetsFromAssetGroup(); + + EditorUtility.SetDirty(_assetDatabase); + + string dataPath = AssetDatabase.EnumPath; + StaticClassCreator.CreateAtPath(dataPath, _assetDatabase.EnumName, _assetDatabase.Assets.Values, _assetDatabase.EnumNamespaceName); + if (_assetDatabase.Assets != null) { - foreach (Object asset in _assetDatabase.Assets) + foreach (KeyValuePair asset in _assetDatabase.Assets) { ObjectField objectField = new() { - value = asset + value = asset.Value }; _assetsListView.Add(objectField); @@ -88,18 +96,18 @@ private void HandleLoadAssetsButtonPressed() _assetDatabase.LoadAssetsFromAssetGroup(); _assetsListView.Clear(); - foreach (Object asset in _assetDatabase.Assets) + foreach (KeyValuePair asset in _assetDatabase.Assets) { ObjectField objectField = new() { - value = asset + value = asset.Value }; _assetsListView.Add(objectField); } EditorUtility.SetDirty(_assetDatabase); - EnumCreator.CreateAtPath(dataPath, _assetDatabase.EnumName, _assetDatabase.Assets, _assetDatabase.EnumNamespaceName); + StaticClassCreator.CreateAtPath(dataPath, _assetDatabase.EnumName, _assetDatabase.Assets.Values, _assetDatabase.EnumNamespaceName); } } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index 3cd16bdbbb..cebd538446 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -22,8 +22,6 @@ public class AssetDatabaseSettingsInspectorEditor : Editor private void OnEnable() { _assetDatabaseSettings = (AssetDatabaseSettings)target; - - FindAndLoadAllAssetsDatabasesAddressablesGroups(); } public override VisualElement CreateInspectorGUI() @@ -96,7 +94,22 @@ private void CreateAssetDatabasesEnum() { string dataPath = AssetDatabase.EnumPath; - EnumCreator.CreateAtPath(dataPath, "AssetDatabases", _assetDatabaseSettings.IncludedAssetDatabases); + if (_assetDatabaseSettings == null) + { + return; + } + + if (_assetDatabaseSettings.IncludedAssetDatabases == null || _assetDatabaseSettings.IncludedAssetDatabases.Count == 0) + { + return; + } + + StaticClassCreator.CreateAtPath(dataPath, "AssetDatabases", _assetDatabaseSettings.IncludedAssetDatabases); + + foreach (AssetDatabase includedAssetDatabase in _assetDatabaseSettings.IncludedAssetDatabases) + { + StaticClassCreator.CreateAtPath(dataPath, includedAssetDatabase.EnumName, includedAssetDatabase.Assets.Values, includedAssetDatabase.EnumNamespaceName); + } } private void UpdateListVisuals() diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index 96508a40ef..eb43933ea5 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -16,7 +16,7 @@ public static class Assets /// /// All loaded databases. /// - private static readonly Dictionary Databases = new(); + private static readonly Dictionary Databases = new(); // TODO: Find a way to automate the getters, this is a nightmare way of doing it. @@ -27,65 +27,10 @@ public static class Assets /// /// /// - public static TAsset Get(int databaseId, int assetId) where TAsset : Object + public static TAsset Get(string databaseId, string assetId) where TAsset : Object { return GetDatabase(databaseId).Get(assetId); } - - public static bool TryGet(int databaseId, int assetId, out TAsset asset) where TAsset : Object - { - if(GetDatabase(databaseId).TryGet(assetId, out asset)) - { - return true; - } - asset= null; - return false; - } - - /// - /// Generic getter, supports all databases and all asset database enums. - /// - /// - /// - /// - /// - public static TAsset Get(Enums.AssetDatabases databaseId, int assetId) where TAsset : Object - { - return GetDatabase(databaseId).Get(assetId); - } - - /// - /// Gets an interaction icon as a Sprite. - /// - /// - /// - public static Sprite Get(InteractionIcons icon) - { - return GetDatabase(Enums.AssetDatabases.InteractionIcons).Get((int)icon); - } - - /// - /// Gets an Item prefab based on an ItemID. - /// - /// - /// - public static GameObject Get(ItemId itemIdId) - { - return GetDatabase(Enums.AssetDatabases.Items).Get((int)itemIdId); - } - - /// - /// Adds an asset to a database, useful for adding stuff on databases at runtime, as in modded versions of the game. - /// - /// - /// The asset database you want to get. - /// The asset type you want returned. - /// The loaded asset in the TAssetType type. - public static void AddAsset(int databaseId, Object asset) where TAsset : Object - { - GetDatabase(databaseId).Add(asset); - } - /// /// Loads the databases in the project from the AssetDatabaseSettings, saves it in a Dictionary for easy & performant access. /// @@ -93,10 +38,12 @@ public static void LoadAssetDatabases() { List assetDatabases = ScriptableSettings.GetOrFind().IncludedAssetDatabases; + Databases.Clear(); + for (int index = 0; index < assetDatabases.Count; index++) { AssetDatabase database = assetDatabases[index]; - Databases.Add(index, database); + Databases.Add(database.name, database); } Log.Information(typeof(Assets), "{assetDatabasesCount} Asset Databases initialized", Logs.Important, assetDatabases.Count); @@ -107,26 +54,14 @@ public static void LoadAssetDatabases() /// /// The enum name used to identify which database to load. /// - public static AssetDatabase GetDatabase(int key) + public static AssetDatabase GetDatabase(string key) { - bool databaseExists = Databases.TryGetValue(key, out AssetDatabase database); - - if (!databaseExists) + if (Databases.Count == 0) { - Log.Warning(typeof(Assets), "Database of type {key} not found", Logs.Important, key); + LoadAssetDatabases(); } - return database; - } - - /// - /// Helper function to find a database in the database list. Used to link the enum to which database to find. - /// - /// The enum name used to identify which database to load. - /// - public static AssetDatabase GetDatabase(Enums.AssetDatabases key) - { - bool databaseExists = Databases.TryGetValue((int)key, out AssetDatabase database); + bool databaseExists = Databases.TryGetValue(key, out AssetDatabase database); if (!databaseExists) { diff --git a/Assets/Scripts/SS3D/Data/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Bodyparts.cs new file mode 100644 index 0000000000..0cde768a10 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Bodyparts.cs @@ -0,0 +1,17 @@ +namespace SS3D.Data +{ + public class Bodyparts + { + /// + /// Generic getter, supports all databases and all asset database enums. + /// + /// + /// + /// + /// + public static TAsset Get(string assetId) where TAsset : UnityEngine.Object + { + return Assets.GetDatabase(nameof(Enums.AssetDatabases.BodyParts)).Get(assetId); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta new file mode 100644 index 0000000000..5e8b1c50f7 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ad67aeb8566e4be8a051e2a356f90f81 +timeCreated: 1695769016 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs index adb074e7ef..25d819fa18 100644 --- a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs @@ -1,16 +1,17 @@ namespace SS3D.Data.Enums { - public enum AssetDatabases + public class AssetDatabases { - CraftingRecipes = 0, - InteractionIcons = 1, - Items = 2, - Materials = 3, - ParticlesEffects = 4, - Scenes = 5, - Settings = 6, - Sounds = 7, - UIElements = 8, + public static string BodyParts = "BodyParts"; + + public static string InteractionIcons = "InteractionIcons"; + + public static string Items = "Items"; + + public static string Scenes = "Scenes"; + + public static string Settings = "Settings"; + } } diff --git a/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs b/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs new file mode 100644 index 0000000000..4d8a68c1e7 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs @@ -0,0 +1,11 @@ +namespace SS3D.Data.Enums +{ + public class BodyPartsIds + { + public static string HumanHandLeft = "HumanHandLeft"; + + public static string HumanHandRight = "HumanHandRight"; + + } +} + diff --git a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs index cd611d7589..ed87fb46b4 100644 --- a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs +++ b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs @@ -1,13 +1,19 @@ namespace SS3D.Data.Enums { - public enum InteractionIcons + public class InteractionIcons { - Power = 0, - Take = 1, - Open = 2, - Discard = 3, - Honk = 4, - Nuke = 5, + public static string Power = "Power"; + + public static string Take = "Take"; + + public static string Open = "Open"; + + public static string Discard = "Discard"; + + public static string Honk = "Honk"; + + public static string Nuke = "Nuke"; + } } diff --git a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs index 962232a1be..b9e40fdf6a 100644 --- a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs +++ b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs @@ -1,77 +1,95 @@ namespace SS3D.Data.Enums { - public enum ItemId + public class ItemId { - BikeHorn = 0, - NuclearAuthenticationDisk = 1, - ToolboxBlue = 2, - SecurityPDA = 3, - SecurityIDCard = 4, - PDA = 5, - IDCard = 6, - Mug = 7, - SodaCanCola = 8, - SodaCanCannedLaughter = 9, - SodaCanCannedAir = 10, - SodaCanTonic = 11, - SodaCanBeepyLime = 12, - SodaCanBeepsSoda = 13, - SodaCanDukePurpleTea = 14, - Poster = 15, - MedicalPatch = 16, - BrutePatch = 17, - BurnPatch = 18, - DonkPocket = 19, - Boombox = 20, - GreyFloorTile = 21, - SteelReinforcedSheet = 22, - SteelSheet = 23, - Crowbar = 24, - ScrewdriverBlue = 25, - Wrench = 26, - FlashlightBlue = 27, - KitchenKnife = 28, - TruckerCap = 29, - Sunglasses = 30, - FacewearGasMask = 31, - GlovesInsulatedLeft = 32, - GlovesInsulatedRight = 33, - JumpsuitBotany = 34, - JumpsuitEngineer = 35, - JumpsuitGrey = 36, - ShoesHiTopsLeft = 37, - ShoesHiTopsRight = 38, - ShoesJackbootsLeft = 39, - ShoesJackbootsRight = 40, - JumpsuitSecurity = 41, - HeadsetLeft = 42, - HeadsetRight = 43, - HumanArmLeft = 44, - HumanArmRight = 45, - HumanEarLeft = 46, - HumanEarRight = 47, - HumanFootLeft = 48, - HumanFootRight = 49, - HumanHandLeft = 50, - HumanHandRight = 51, - HumanHead = 52, - HumanLegLeft = 53, - HumanTorso = 54, - HumanLegRight = 55, - HumanLungRight = 56, - HumanLungLeft = 57, - HumanStomach = 58, - HumanLiver = 59, - HumanIntestineLarge = 60, - HumanEye = 61, - HumanBrain = 62, - Toolbelt = 63, - Backpack = 64, - HumanHeart = 65, - Wirecutters = 66, - Multitool = 67, - PowerCellAdmin = 68, - PowerCell = 69, + public static string BikeHorn = "BikeHorn"; + + public static string NuclearAuthenticationDisk = "NuclearAuthenticationDisk"; + + public static string ToolboxBlue = "ToolboxBlue"; + + public static string SecurityPDA = "SecurityPDA"; + + public static string SecurityIDCard = "SecurityIDCard"; + + public static string PDA = "PDA"; + + public static string IDCard = "IDCard"; + + public static string Mug = "Mug"; + + public static string SodaCanCola = "SodaCanCola"; + + public static string SodaCanCannedLaughter = "SodaCanCannedLaughter"; + + public static string SodaCanCannedAir = "SodaCanCannedAir"; + + public static string SodaCanTonic = "SodaCanTonic"; + + public static string SodaCanBeepyLime = "SodaCanBeepyLime"; + + public static string SodaCanBeepsSoda = "SodaCanBeepsSoda"; + + public static string SodaCanDukePurpleTea = "SodaCanDukePurpleTea"; + + public static string Poster = "Poster"; + + public static string MedicalPatch = "MedicalPatch"; + + public static string BrutePatch = "BrutePatch"; + + public static string BurnPatch = "BurnPatch"; + + public static string DonkPocket = "DonkPocket"; + + public static string Boombox = "Boombox"; + + public static string GreyFloorTile = "GreyFloorTile"; + + public static string SteelReinforcedSheet = "SteelReinforcedSheet"; + + public static string SteelSheet = "SteelSheet"; + + public static string Crowbar = "Crowbar"; + + public static string Screwdriver = "Screwdriver"; + + public static string Wrench = "Wrench"; + + public static string FlashlightBlue = "FlashlightBlue"; + + public static string KitchenKnife = "KitchenKnife"; + + public static string TruckerCap = "TruckerCap"; + + public static string Sunglasses = "Sunglasses"; + + public static string FacewearGasMask = "FacewearGasMask"; + + public static string GlovesInsulatedLeft = "GlovesInsulatedLeft"; + + public static string GlovesInsulatedRight = "GlovesInsulatedRight"; + + public static string JumpsuitBotany = "JumpsuitBotany"; + + public static string JumpsuitEngineer = "JumpsuitEngineer"; + + public static string JumpsuitGrey = "JumpsuitGrey"; + + public static string ShoesHiTopsLeft = "ShoesHiTopsLeft"; + + public static string ShoesHiTopsRight = "ShoesHiTopsRight"; + + public static string ShoesJackbootsLeft = "ShoesJackbootsLeft"; + + public static string ShoesJackbootsRight = "ShoesJackbootsRight"; + + public static string JumpsuitSecurity = "JumpsuitSecurity"; + + public static string HeadsetLeft = "HeadsetLeft"; + + public static string HeadsetRight = "HeadsetRight"; + } } diff --git a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs index 750310ec5a..81e27d3b6f 100644 --- a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs +++ b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs @@ -1,11 +1,15 @@ namespace SS3D.Data.Enums { - public enum Scenes + public class Scenes { - Boot = 0, - Game = 1, - Launcher = 2, - Intro = 3, + public static string Boot = "Boot"; + + public static string Game = "Game"; + + public static string Launcher = "Launcher"; + + public static string Intro = "Intro"; + } } diff --git a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs index 364d0bcb53..e74a873318 100644 --- a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs +++ b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs @@ -1,9 +1,11 @@ namespace SS3D.Data.Enums { - public enum SettingsId + public class SettingsId { - ApplicationSettings = 0, - LogSettings = 1, + public static string ApplicationSettings = "ApplicationSettings"; + + public static string LogSettings = "LogSettings"; + } } diff --git a/Assets/Scripts/SS3D/Data/Icons.cs b/Assets/Scripts/SS3D/Data/Icons.cs new file mode 100644 index 0000000000..71daf78fd5 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Icons.cs @@ -0,0 +1,17 @@ +namespace SS3D.Data +{ + public static class Icons + { + /// + /// Generic getter, supports all databases and all asset database enums. + /// + /// + /// + /// + /// + public static TAsset Get(string assetId) where TAsset : UnityEngine.Object + { + return Assets.GetDatabase(nameof(Enums.AssetDatabases.InteractionIcons)).Get(assetId); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Icons.cs.meta b/Assets/Scripts/SS3D/Data/Icons.cs.meta new file mode 100644 index 0000000000..c317df3e9a --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Icons.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: afc88707d4d04f56b8ebe2fd36c9fc7a +timeCreated: 1695768471 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Items.cs b/Assets/Scripts/SS3D/Data/Items.cs new file mode 100644 index 0000000000..340de7db36 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Items.cs @@ -0,0 +1,17 @@ +namespace SS3D.Data +{ + public static class Items + { + /// + /// Generic getter, supports all databases and all asset database enums. + /// + /// + /// + /// + /// + public static TAsset Get(string assetId) where TAsset : UnityEngine.Object + { + return Assets.GetDatabase(nameof(Enums.AssetDatabases.Items)).Get(assetId); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Items.cs.meta b/Assets/Scripts/SS3D/Data/Items.cs.meta new file mode 100644 index 0000000000..a11f0f86a5 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Items.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4fdcc0a62a20459dbb267b976b5bdf7c +timeCreated: 1695768393 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs index bb738d3d2a..2926dc10a4 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs @@ -8,28 +8,24 @@ namespace SS3D.SceneManagement.Editor { public static class EditorSceneUtils { - private static string _sceneToOpen; + private static string SceneToOpen; - public static void StartScene(Scenes sceneName) - { - StartScene(sceneName.ToString()); - EditorApplication.update += OnUpdate; - } - - private static void StartScene(string sceneName) + public static void StartScene(string sceneName) { + EditorApplication.update += OnUpdate; + if (EditorApplication.isPlaying) { EditorApplication.isPlaying = false; } - _sceneToOpen = sceneName; + SceneToOpen = sceneName; EditorApplication.update += OnUpdate; } private static void OnUpdate() { - if (_sceneToOpen == null || + if (SceneToOpen == null || EditorApplication.isPlaying || EditorApplication.isPaused || EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode) { @@ -42,7 +38,7 @@ private static void OnUpdate() { // need to get scene via search because the path to the scene // file contains the package version so it'll change over time - string[] guids = AssetDatabase.FindAssets("t:scene " + _sceneToOpen, null); + string[] guids = AssetDatabase.FindAssets("t:scene " + SceneToOpen, null); if (guids.Length == 0) { Debug.LogWarning("Couldn't find scene file"); @@ -54,7 +50,7 @@ private static void OnUpdate() } } - _sceneToOpen = null; + SceneToOpen = null; } } } diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs index fe6d3f9f88..3d21b253b6 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs @@ -39,9 +39,9 @@ private static void OnToolbarGUI() { if (GUILayout.Button(new GUIContent(scene), options)) { - Enum.TryParse(scene, out Scenes sceneEnum); + // Enum.TryParse(scene, out Scenes sceneEnum); - EditorSceneUtils.StartScene(sceneEnum); + EditorSceneUtils.StartScene("sceneEnum"); } } } diff --git a/Assets/Scripts/SS3D/SceneManagement/Scene.cs b/Assets/Scripts/SS3D/SceneManagement/Scene.cs index b65d851af8..809fe12cea 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Scene.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Scene.cs @@ -1,27 +1,32 @@ using JetBrains.Annotations; using SS3D.Data.Enums; -using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; -using UnityEngine; using UnityEngine.SceneManagement; namespace SS3D.SceneManagement { public static class Scene - { - [NotNull] - public static List Names => Enum.GetNames(typeof(Scenes)).ToList(); + { + #if UNITY_EDITOR + [NotNull] + public static List Names => new List() + { + Scenes.Boot, + Scenes.Intro, + Scenes.Game, + Scenes.Launcher, + }; + #endif - public static void Load(Scenes scenes) + public static void Load(string scenes) { - SceneManager.LoadScene(scenes.ToString()); + SceneManager.LoadScene(scenes); } - public static async Task LoadAsync(Scenes scene) + public static async Task LoadAsync(string scene) { - SceneManager.LoadSceneAsync(scene.ToString()); + SceneManager.LoadSceneAsync(scene); } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs index e8eb1eee04..e463759ac5 100644 --- a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs @@ -23,7 +23,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Nuke); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Nuke); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Entities/EntitySystem.cs b/Assets/Scripts/SS3D/Systems/Entities/EntitySystem.cs index 554cddf2f4..a4dcc9cc37 100644 --- a/Assets/Scripts/SS3D/Systems/Entities/EntitySystem.cs +++ b/Assets/Scripts/SS3D/Systems/Entities/EntitySystem.cs @@ -11,7 +11,7 @@ using SS3D.Core.Settings; using SS3D.Logging; using SS3D.Systems.Entities.Events; -using SS3D.Systems.PlayerControl; +using SS3D.Systems.Roles; using SS3D.Systems.Rounds; using SS3D.Systems.Rounds.Events; using SS3D.Utils; @@ -200,6 +200,8 @@ private void SpawnPlayer(Player player) createdMind.SetPlayer(player); entity.SetMind(createdMind); + Subsystems.Get().GiveRoleLoadoutToPlayer(entity); + _spawnedPlayers.Add(entity); RpcInvokeClientSpawned(entity.Owner); diff --git a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs index 55ebacfa18..68da0a914a 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs @@ -35,7 +35,7 @@ public override bool CanInteract(InteractionEvent interactionEvent) /// public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Take); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); } /// diff --git a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs index c149ca310b..b3dc9d20b9 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs @@ -32,7 +32,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Open); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs index 2a948ae9c7..3e8a417dc3 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs @@ -23,7 +23,7 @@ public void Detonate() IInteraction[] IInteractionTarget.CreateTargetInteractions(InteractionEvent interactionEvent) { - _sprite = Assets.Get(AssetDatabases.InteractionIcons, (int)InteractionIcons.Nuke); + _sprite = Icons.Get(InteractionIcons.Nuke); return new IInteraction[] { new NukeDetonateInteraction { Icon = _sprite } }; } diff --git a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs index fdf51993a9..cbdacc41d9 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs @@ -31,7 +31,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Open); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs index 4d4e503794..6e25e11746 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs @@ -22,7 +22,7 @@ public class VendingMachine : InteractionSource, IInteractionTarget /// TODO: Make a new struct for different products, and to support multiple products. /// [SerializeField] - private ItemId _productToDispense; + private GameObject _productToDispense; /// /// The transform representation of where the dispensed products should spawn at. @@ -48,7 +48,7 @@ public void DispenseProduct() ItemSystem itemSystem = Subsystems.Get(); Quaternion quaternion = Quaternion.Euler(new Vector3(Random.Range(0, 360), Random.Range(0, 360), Random.Range(0, 360))); - itemSystem.SpawnItem(_productToDispense, _dispensingTransform.position, quaternion); + itemSystem.SpawnItem(_productToDispense.name, _dispensingTransform.position, quaternion); } /// @@ -58,7 +58,7 @@ public IInteraction[] CreateTargetInteractions(InteractionEvent interactionEvent { new DispenseProductInteraction { - Icon = Assets.Get(InteractionIcons.Take) + Icon = Icons.Get(InteractionIcons.Take) } }; } diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs index bf987494e7..4fb7627df3 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs @@ -28,15 +28,37 @@ private record CalculatedValues(Player Player, Entity Entity, Vector3 Position, public override string Perform(string[] args, NetworkConnection conn) { - if (!ReceiveCheckResponse(args, out CheckArgsResponse response, out CalculatedValues values)) return response.InvalidArgs; - - GameObject leftHandPrefab = Assets.Get((int)AssetDatabases.Items, (int)ItemId.HumanHandLeft); - GameObject leftHandObject = GameObject.Instantiate(leftHandPrefab, values.Entity.transform); - leftHandObject.transform.localPosition = values.Position; - leftHandObject.transform.localEulerAngles = values.Rotation; - InstanceFinder.ServerManager.Spawn(leftHandObject, values.Player.Owner); - values.Entity.GetComponent().TryAddContainer(leftHandObject.GetComponent()); - values.Entity.GetComponent().AddHand(leftHandObject.GetComponent()); + CheckArgsResponse checkArgsResponse = CheckArgs(args); + if (checkArgsResponse.IsValid == false) + return checkArgsResponse.InvalidArgs; + + string ckey = args[0]; + + // default transform for hand. + Vector3 position = new Vector3(0.5f, 0.7f, 0); + Vector3 rotation = new Vector3(-50, -270, 90); + + if (args.Length > 1) + { + position = new Vector3(float.Parse(args[1]), float.Parse(args[2]), float.Parse(args[3])); + rotation = new Vector3(float.Parse(args[4]), float.Parse(args[5]), float.Parse(args[6])); + } + + Player Player = Subsystems.Get().GetPlayer(ckey); + Entity entity = Subsystems.Get().GetSpawnedEntity(Player); + + GameObject leftHandPrefab = Bodyparts.Get(BodyPartsIds.HumanHandLeft); + GameObject leftHandObject = GameObject.Instantiate(leftHandPrefab, entity.transform); + leftHandObject.transform.localPosition = position; + leftHandObject.transform.localEulerAngles = rotation; + + Hand leftHand = leftHandObject.GetComponent(); + InstanceFinder.ServerManager.Spawn(leftHandObject, Player.Owner); + + Hands hands = entity.GetComponent(); + HumanInventory inventory = entity.GetComponent(); + inventory.TryAddContainer(leftHandObject.GetComponent()); + hands.AddHand(leftHand); return "hand added"; } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs index 27b7c2dce5..e433c953ca 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs @@ -31,18 +31,18 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac StoreInteraction storeInteraction = new(attachedContainer) { - Icon = Assets.Get(InteractionIcons.Take) + Icon = Icons.Get(InteractionIcons.Take) }; TakeFirstInteraction takeFirstInteraction = new(attachedContainer) { - Icon = Assets.Get(InteractionIcons.Take) + Icon = Icons.Get(InteractionIcons.Take) }; ViewContainerInteraction view = new(attachedContainer) { MaxDistance = attachedContainer.MaxDistance, Icon = _viewContainerIcon }; - view.Icon = Assets.Get(InteractionIcons.Open); + view.Icon = Icons.Get(InteractionIcons.Open); // Pile or Normal the Store Interaction will always appear, but View only appears in Normal containers if (IsOpen() | !attachedContainer.OnlyStoreWhenOpen | !attachedContainer.IsOpenable) @@ -66,7 +66,7 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac OpenInteraction openInteraction = new(attachedContainer) { - Icon = Assets.Get(InteractionIcons.Open) + Icon = Icons.Get(InteractionIcons.Open) }; openInteraction.OnOpenStateChanged += OpenStateChanged; interactions.Add(openInteraction); diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs index e8c5a6b87b..e94876eec8 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs @@ -129,7 +129,10 @@ public override void OnStartClient() Hands.SetInventory(this); SetupView(); - Subsystems.Get().GiveRoleLoadoutToPlayer(Body); + } + + public void TriggerInventorySetup() + { OnInventorySetUp?.Invoke(); } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs index 22d6fcdad5..c5048a5d22 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs @@ -19,7 +19,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Discard); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Discard); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs index 73d8935915..d731df132e 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs @@ -41,7 +41,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Open); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs index ce8579925c..53037fc3e5 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs @@ -22,7 +22,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Take); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs index c42e419a85..61d2fb5787 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs @@ -25,7 +25,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Discard); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Discard); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs index d96e591eb2..ee70ec2504 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs @@ -6,6 +6,7 @@ using SS3D.Systems.Inventory.Items; using System.Linq; using UnityEngine; +using UnityEngine.UI; namespace SS3D.Systems.Inventory.Interactions { @@ -26,7 +27,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Take); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs index ea4e945bd8..0ef4fe2ad0 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs @@ -26,7 +26,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Open); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs index b8b1e03eb7..bb511094fc 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs @@ -20,7 +20,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Honk); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Honk); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs index efacb976cf..e16c3e8003 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs @@ -24,7 +24,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Nuke); + return Icon != null ? Icon : Icons.Get(InteractionIcons.Nuke); } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs index 884b5bbc12..81385ee5ad 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs @@ -16,42 +16,6 @@ namespace SS3D.Systems.Inventory.Items /// public sealed class ItemSystem : NetworkSystem { - /// - /// A dictionary of all the preloaded prefabs using the ItemIDs as key. - /// - private readonly Dictionary _itemPrefabs = new(); - - protected override void OnStart() - { - base.OnStart(); - - LoadItemPrefabs(); - } - - /// - /// Loads the item prefabs into memory with the item id and setting up the item ids variable in the items. - /// - private void LoadItemPrefabs() - { - AssetDatabase items = Assets.GetDatabase((int)AssetDatabases.Items); - - for (int index = 0; index < items.Assets.Count; index++) - { - ItemId id = (ItemId)index; - - GameObject itemObject = Assets.Get(id); - if(itemObject.TryGetComponent(out Item item)) - { - item.ItemId = id; - _itemPrefabs.Add(id, item); - } - else - { - Log.Error(this, $"gameobject {itemObject} doesn't have any item component"); - } - } - } - /// /// Requests to spawn an item. /// @@ -59,7 +23,7 @@ private void LoadItemPrefabs() /// The desired position to spawn. /// The desired rotation to apply. [ServerRpc(RequireOwnership = false)] - public void CmdSpawnItem(ItemId id, Vector3 position, Quaternion rotation) + public void CmdSpawnItem(string id, Vector3 position, Quaternion rotation) { SpawnItem(id, position, rotation); } @@ -73,15 +37,9 @@ public void CmdSpawnItem(ItemId id, Vector3 position, Quaternion rotation) /// The desired position to spawn. /// The desired rotation to apply. [Server] - public Item SpawnItem(ItemId id, Vector3 position, Quaternion rotation) + public Item SpawnItem(string id, Vector3 position, Quaternion rotation) { - bool hasValue = _itemPrefabs.TryGetValue(id, out Item itemPrefab); - - if (!hasValue) - { - Log.Error(this, "No item with ID {id} was found", Logs.ServerOnly, id.ToString()); - return null; - } + Item itemPrefab = Data.Items.Get(id).GetComponent(); Item itemInstance = Instantiate(itemPrefab, position, rotation); ServerManager.Spawn(itemInstance.GameObject); @@ -112,15 +70,9 @@ public void CmdSpawnItemInContainer(ItemId id, AttachedContainer attachedContain /// The item ID to spawn. /// The container to spawn into. [Server] - public Item SpawnItemInContainer(ItemId id, AttachedContainer attachedContainer) + public Item SpawnItemInContainer(string id, AttachedContainer attachedContainer) { - bool hasValue = _itemPrefabs.TryGetValue(id, out Item itemPrefab); - - if (!hasValue) - { - Log.Error(this, "No item with ID {id} was found", Logs.ServerOnly, id.ToString()); - return null; - } + Item itemPrefab = Data.Items.Get(id); if (attachedContainer is null) { @@ -128,7 +80,20 @@ public Item SpawnItemInContainer(ItemId id, AttachedContainer attachedContainer) return null; } - Item itemInstance = Instantiate(itemPrefab, Vector3.zero, Quaternion.identity); + return SpawnItemInContainer(itemPrefab.GameObject, attachedContainer); + } + + // + /// Spawns an Item inside a container. + /// + /// TODO: Create a ItemSpawnOptions struct. + /// + /// The item ID to spawn. + /// The container to spawn into. + [Server] + public Item SpawnItemInContainer(GameObject item, AttachedContainer attachedContainer) + { + Item itemInstance = Instantiate(item, Vector3.zero, Quaternion.identity).GetComponent(); ServerManager.Spawn(itemInstance.GameObject); attachedContainer.AddItem(itemInstance); diff --git a/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs b/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs deleted file mode 100644 index 261a3ec279..0000000000 --- a/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs +++ /dev/null @@ -1,129 +0,0 @@ -using SS3D.Data.Enums; -using SS3D.Systems.Roles; -using UnityEditor; - -/// -/// Class handling the inspector display of a roleLoadout. -/// It will only show the ItemID fields if the booleans are set to true -/// -[CustomEditor(typeof(RoleLoadout))] -public class RoleLoadoutEditor : Editor -{ - private RoleLoadout roleLoadout; - - private SerializedProperty sp; - - public void OnEnable() - { - roleLoadout = (RoleLoadout)target; - } - - public override void OnInspectorGUI() - { - - - serializedObject.Update(); - - HandleBools("LeftHand", roleLoadout.LeftHand); - HandleBools("RightHand", roleLoadout.RightHand); - HandleBools("LeftPocket", roleLoadout.LeftPocket); - HandleBools("RightPocket", roleLoadout.RightPocket); - HandleBools("LeftGlove", roleLoadout.LeftGlove); - HandleBools("RightGlove", roleLoadout.RightGlove); - HandleBools("LeftShoe", roleLoadout.LeftShoe); - HandleBools("RightShoe", roleLoadout.RightShoe); - HandleBools("Jumpsuit", roleLoadout.Jumpsuit); - HandleBools("Glasses", roleLoadout.Glasses); - HandleBools("LeftEar", roleLoadout.LeftEar); - HandleBools("RightEar", roleLoadout.RightEar); - HandleBools("Hat", roleLoadout.Hat); - - if (roleLoadout.LeftHand) - { - roleLoadout.LeftHandItem = (ItemId)EditorGUILayout. - EnumPopup("Left Hand Item:", roleLoadout.LeftHandItem); - } - - if (roleLoadout.RightHand) - { - roleLoadout.RightHandItem = (ItemId)EditorGUILayout. - EnumPopup("Right Hand Item:", roleLoadout.RightHandItem); - } - - if (roleLoadout.LeftPocket) - { - roleLoadout.LeftPocketItem = (ItemId)EditorGUILayout. - EnumPopup("Left Pocket Item:", roleLoadout.LeftPocketItem); - } - - if (roleLoadout.RightPocket) - { - roleLoadout.RightPocketItem = (ItemId)EditorGUILayout. - EnumPopup("Right Pocket Item:", roleLoadout.RightPocketItem); - } - - if (roleLoadout.LeftGlove) - { - roleLoadout.LeftGloveItem = (ItemId)EditorGUILayout. - EnumPopup("Left Glove Item:", roleLoadout.LeftGloveItem); - } - - if (roleLoadout.LeftShoe) - { - roleLoadout.LeftShoeItem = (ItemId)EditorGUILayout. - EnumPopup("Left Shoe Item:", roleLoadout.LeftShoeItem); - } - - if (roleLoadout.RightShoe) - { - roleLoadout.RightShoeItem = (ItemId)EditorGUILayout. - EnumPopup("Right Shoe Item:", roleLoadout.RightShoeItem); - } - - if (roleLoadout.RightGlove) - { - roleLoadout.RightGloveItem = (ItemId)EditorGUILayout. - EnumPopup("Right Glove Item:", roleLoadout.RightGloveItem); - } - - - if (roleLoadout.LeftEar) - { - roleLoadout.LeftEarItem = (ItemId)EditorGUILayout. - EnumPopup("Left Ear Item:", roleLoadout.LeftEarItem); - } - - if (roleLoadout.RightEar) - { - roleLoadout.RightEarItem = (ItemId)EditorGUILayout. - EnumPopup("Right Ear Item:", roleLoadout.RightEarItem); - } - - if (roleLoadout.Jumpsuit) - { - roleLoadout.JumpsuitItem = (ItemId)EditorGUILayout. - EnumPopup("Jumpsuit Item:", roleLoadout.JumpsuitItem); - } - - if (roleLoadout.Hat) - { - roleLoadout.HatItem = (ItemId)EditorGUILayout. - EnumPopup("Hat Item:", roleLoadout.HatItem); - } - - if (roleLoadout.Glasses) - { - roleLoadout.GlassesItem = (ItemId)EditorGUILayout. - EnumPopup("Glasses Item:", roleLoadout.GlassesItem); - } - } - - public void HandleBools(string name, bool loadContainer) - { - sp = serializedObject.FindProperty(name); - sp.boolValue = EditorGUILayout.Toggle(name, loadContainer); - serializedObject.ApplyModifiedProperties(); - } - - -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs.meta b/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs.meta deleted file mode 100644 index c148817776..0000000000 --- a/Assets/Scripts/SS3D/Systems/Roles/Editor/RoleLoadoutEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 48a21c5dc47f8464a8cc9634f5366dc9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs index 9b9764c62b..d3ed3f1489 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs @@ -14,14 +14,14 @@ namespace SS3D.Systems.Roles public class RoleData : ScriptableObject { [SerializeField] private string _roleName; - [SerializeField] private ItemId _pdaPrefab; - [SerializeField] private ItemId _idCardPrefab; + [SerializeField] private GameObject _pdaPrefab; + [SerializeField] private GameObject _idCardPrefab; [SerializeField] private List _permissions = new List(); [SerializeField] private RoleLoadout _loadout; public string Name => _roleName; - public ItemId IDCardPrefab => _idCardPrefab; - public ItemId PDAPrefab => _pdaPrefab; + public GameObject IDCardPrefab => _idCardPrefab; + public GameObject PDAPrefab => _pdaPrefab; public List Permissions => _permissions; public RoleLoadout Loadout => _loadout; } diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs index 0c4fa6ca6e..248999b258 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs @@ -1,8 +1,9 @@ -using SS3D.Data.Enums; -using SS3D.Systems.Inventory.Items; -using System.Collections; +using Coimbra; +using SS3D.Data.Enums; +using SS3D.Systems.Inventory.Containers; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Serialization; namespace SS3D.Systems.Roles { @@ -12,32 +13,10 @@ namespace SS3D.Systems.Roles [CreateAssetMenu(fileName = "Loadout", menuName = "Roles/Loadout")] public class RoleLoadout : ScriptableObject { - public bool LeftHand; - public bool RightHand; - public bool LeftPocket; - public bool RightPocket; - public bool LeftGlove; - public bool RightGlove; - public bool LeftShoe; - public bool RightShoe; - public bool Hat; - public bool Glasses; - public bool LeftEar; - public bool RightEar; - public bool Jumpsuit; + public GameObject HandLeft; + public GameObject HandRight; - public ItemId LeftHandItem; - public ItemId RightHandItem; - public ItemId LeftPocketItem; - public ItemId RightPocketItem; - public ItemId LeftGloveItem; - public ItemId RightGloveItem; - public ItemId LeftShoeItem; - public ItemId RightShoeItem; - public ItemId HatItem; - public ItemId GlassesItem; - public ItemId LeftEarItem; - public ItemId RightEarItem; - public ItemId JumpsuitItem; + [FormerlySerializedAs("ItemsToEquip")] + public SerializableDictionary Equipment; } } diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs index e05cc010c4..c2a3f91b0c 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs @@ -169,12 +169,11 @@ private void SpawnIdentificationItems(Entity entity, RoleData role) if (!inventory.TryGetTypeContainer(ContainerType.Identification, 0, out AttachedContainer container)) return; Item pdaItem = itemSystem.SpawnItemInContainer(role.PDAPrefab, container); - Item idCardItem = itemSystem.SpawnItem(role.IDCardPrefab, Vector3.zero, Quaternion.identity); + Item idCardItem = itemSystem.SpawnItem(role.IDCardPrefab.name, Vector3.zero, Quaternion.identity); PDA pda = (PDA)pdaItem; IDCard idCard = (IDCard)idCardItem; - // Set up ID Card data idCard.OwnerName = entity.Ckey; idCard.RoleName = role.Name; @@ -197,42 +196,44 @@ private void SpawnLoadoutItems(Entity entity, RoleLoadout loadout) Hands hands = entity.GetComponent(); HumanInventory inventory = entity.GetComponent(); - SpawnItemInSlot(loadout.LeftHandItem, loadout.LeftHand, hands.HandContainers[0]); - SpawnItemInSlot(loadout.RightHandItem, loadout.RightHand, hands.HandContainers[1]); - - if (inventory.TryGetTypeContainer(ContainerType.ShoeRight, 0, out AttachedContainer ShoeRightContainer)) - SpawnItemInSlot(loadout.RightShoeItem, loadout.RightShoe, ShoeRightContainer); - - if (inventory.TryGetTypeContainer(ContainerType.ShoeLeft, 0, out AttachedContainer ShoeLeftContainer)) - SpawnItemInSlot(loadout.LeftShoeItem, loadout.LeftShoe, ShoeLeftContainer); - - if (inventory.TryGetTypeContainer(ContainerType.Jumpsuit, 0, out AttachedContainer JumpsuitContainer)) - SpawnItemInSlot(loadout.JumpsuitItem, loadout.Jumpsuit, JumpsuitContainer); - - if (inventory.TryGetTypeContainer(ContainerType.GloveLeft, 0, out AttachedContainer LeftGloveContainer)) - SpawnItemInSlot(loadout.LeftGloveItem, loadout.LeftGlove, LeftGloveContainer); + Dictionary containers = new Dictionary(); + List handContainers = hands.HandContainers; - if (inventory.TryGetTypeContainer(ContainerType.GloveRight, 0, out AttachedContainer RightGloveContainer)) - SpawnItemInSlot(loadout.RightGloveItem, loadout.RightGlove, RightGloveContainer); - - if (inventory.TryGetTypeContainer(ContainerType.Head, 0, out AttachedContainer HatContainer)) - SpawnItemInSlot(loadout.HatItem, loadout.Hat, HatContainer); + foreach (AttachedContainer inventoryContainer in inventory.Containers) + { + if (inventoryContainer.ContainerType == ContainerType.Hand) + { + continue; + } - if (inventory.TryGetTypeContainer(ContainerType.Glasses, 0, out AttachedContainer GlassesContainer)) - SpawnItemInSlot(loadout.GlassesItem, loadout.Glasses, GlassesContainer); + containers.Add(inventoryContainer.ContainerType, inventoryContainer); + } - if (inventory.TryGetTypeContainer(ContainerType.Pocket, 0, out AttachedContainer leftPocketContainer)) - SpawnItemInSlot(loadout.LeftPocketItem, loadout.LeftPocket, leftPocketContainer); + foreach (KeyValuePair itemToEquip in loadout.Equipment) + { + if (itemToEquip.Value == null) + { + continue; + } - if (inventory.TryGetTypeContainer(ContainerType.Pocket, 1, out AttachedContainer rightPocketContainer)) - SpawnItemInSlot(loadout.RightPocketItem, loadout.RightPocket, rightPocketContainer); + if (containers.TryGetValue(itemToEquip.Key, out AttachedContainer container)) + { + SpawnItemInSlot(itemToEquip.Value, true, container); + } + } - if (inventory.TryGetTypeContainer(ContainerType.EarRight, 0, out AttachedContainer EarRightContainer)) - SpawnItemInSlot(loadout.RightEarItem, loadout.RightEar, EarRightContainer); + if (loadout.HandLeft != null) + { + SpawnItemInSlot(loadout.HandLeft, true, handContainers[0]); + } - if (inventory.TryGetTypeContainer(ContainerType.EarLeft, 0, out AttachedContainer EarLeftContainer)) - SpawnItemInSlot(loadout.LeftEarItem, loadout.LeftEar, EarLeftContainer); + if (loadout.HandRight != null) + { + SpawnItemInSlot(loadout.HandRight, true, handContainers[1]); + } + + inventory.TriggerInventorySetup(); } /// @@ -241,7 +242,7 @@ private void SpawnLoadoutItems(Entity entity, RoleLoadout loadout) /// The id of the item to be spawned /// Condition indicating if the item should be spawned /// Container the item will be spawned in - private void SpawnItemInSlot(ItemId itemId, bool shouldSpawn, AttachedContainer container) + private void SpawnItemInSlot(GameObject itemId, bool shouldSpawn, AttachedContainer container) { if (!shouldSpawn) { diff --git a/Assets/Scripts/Tests/Asset Audit/AssetDataTests.cs b/Assets/Scripts/Tests/Asset Audit/AssetDataTests.cs index ad7a268794..5669ca32be 100644 --- a/Assets/Scripts/Tests/Asset Audit/AssetDataTests.cs +++ b/Assets/Scripts/Tests/Asset Audit/AssetDataTests.cs @@ -2,6 +2,7 @@ using Coimbra; using NUnit.Framework; using SS3D.Data.AssetDatabases; +using System.Linq; using UnityEngine; namespace AssetAudit @@ -80,9 +81,10 @@ public void IncludedAssetDatabasesDoNotContainNullObjects(AssetDatabase assetDat bool hasNullAssets = false; Dictionary> assetDatabasesNullRefIndexes = new(); + for (int index = 0; index < assetDatabase.Assets.Count; index++) { - Object asset = assetDatabase.Assets[index]; + Object asset = assetDatabase.Assets.Values.ToList()[index]; if (asset != null) { From 08c4252647fd6e34c0789a98136194c0605a5b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:03:36 -0300 Subject: [PATCH 02/32] Rework the asset data system again --- .../Scripts/SS3D/CodeGeneration/Creators.meta | 3 + .../Creators/DatabaseAssetCreator.cs | 35 +++++ .../Creators/DatabaseAssetCreator.cs.meta | 3 + .../{ => Creators}/EnumCreator.cs | 0 .../{ => Creators}/EnumCreator.cs.meta | 0 .../{ => Creators}/StaticClassCreator.cs | 0 .../{ => Creators}/StaticClassCreator.cs.meta | 0 .../Scripts/SS3D/CodeGeneration/Writers.meta | 3 + .../{ => Writers}/CodeWriter.cs | 0 .../{ => Writers}/CodeWriter.cs.meta | 0 .../Writers/DatabaseAssetWriter.cs | 48 ++++++ .../Writers/DatabaseAssetWriter.cs.meta | 3 + .../{ => Writers}/StaticClassWriter.cs | 0 .../{ => Writers}/StaticClassWriter.cs.meta | 0 Assets/Scripts/SS3D/Core/LogManager.cs | 2 +- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 14 ++ .../AssetDatabases/AssetDatabaseSettings.cs | 24 +++ .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 49 +++++++ .../Data/AssetDatabases/DatabaseAsset.cs.meta | 3 + .../AssetDatabaseInspectorEditor.cs | 19 ++- .../AssetDatabaseSettingsInspectorEditor.cs | 8 +- Assets/Scripts/SS3D/Data/Bodyparts.cs | 17 --- Assets/Scripts/SS3D/Data/Bodyparts.cs.meta | 3 - .../Scripts/SS3D/Data/Enums/AssetDatabases.cs | 20 ++- .../Scripts/SS3D/Data/Enums/BodyPartsIds.cs | 11 +- .../SS3D/Data/Enums/InteractionIcons.cs | 23 ++- Assets/Scripts/SS3D/Data/Enums/ItemId.cs | 137 ++++++------------ Assets/Scripts/SS3D/Data/Enums/Scenes.cs | 17 +-- Assets/Scripts/SS3D/Data/Enums/SettingsId.cs | 11 +- Assets/Scripts/SS3D/Data/Icons.cs | 17 --- Assets/Scripts/SS3D/Data/Icons.cs.meta | 3 - Assets/Scripts/SS3D/Data/Items.cs | 17 --- Assets/Scripts/SS3D/Data/Items.cs.meta | 3 - .../Scripts/SS3D/Launcher/LauncherSystem.cs | 2 +- .../Combat/Interactions/HitInteraction.cs | 2 +- .../Furniture/DispenseProductInteraction.cs | 2 +- .../Furniture/LockLockerInteraction.cs | 2 +- Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs | 6 +- .../Furniture/UnlockLockerInteraction.cs | 2 +- .../SS3D/Systems/Furniture/VendingMachine.cs | 2 +- .../Gamemodes/Objectives/GetItemObjective.cs | 12 +- .../Commands/AddHandCommand.cs | 2 +- .../Containers/ContainerInteractive.cs | 9 +- .../Inventory/Interactions/DropInteraction.cs | 2 +- .../Inventory/Interactions/OpenInteraction.cs | 2 +- .../Interactions/PickupInteraction.cs | 2 +- .../Interactions/StoreInteraction.cs | 2 +- .../Interactions/TakeFirstInteraction.cs | 2 +- .../Interactions/ViewContainerInteraction.cs | 2 +- .../Items/Generic/HonkInteraction.cs | 2 +- .../Items/Generic/NukeDetonateInteraction.cs | 2 +- .../SS3D/Systems/Inventory/Items/Item.cs | 2 +- .../Systems/Inventory/Items/ItemSystem.cs | 4 +- Assets/Settings/AssetDatabaseSettings.asset | 1 + 54 files changed, 319 insertions(+), 238 deletions(-) create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators.meta create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs.meta rename Assets/Scripts/SS3D/CodeGeneration/{ => Creators}/EnumCreator.cs (100%) rename Assets/Scripts/SS3D/CodeGeneration/{ => Creators}/EnumCreator.cs.meta (100%) rename Assets/Scripts/SS3D/CodeGeneration/{ => Creators}/StaticClassCreator.cs (100%) rename Assets/Scripts/SS3D/CodeGeneration/{ => Creators}/StaticClassCreator.cs.meta (100%) create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers.meta rename Assets/Scripts/SS3D/CodeGeneration/{ => Writers}/CodeWriter.cs (100%) rename Assets/Scripts/SS3D/CodeGeneration/{ => Writers}/CodeWriter.cs.meta (100%) create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs create mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs.meta rename Assets/Scripts/SS3D/CodeGeneration/{ => Writers}/StaticClassWriter.cs (100%) rename Assets/Scripts/SS3D/CodeGeneration/{ => Writers}/StaticClassWriter.cs.meta (100%) create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Bodyparts.cs delete mode 100644 Assets/Scripts/SS3D/Data/Bodyparts.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Icons.cs delete mode 100644 Assets/Scripts/SS3D/Data/Icons.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Items.cs delete mode 100644 Assets/Scripts/SS3D/Data/Items.cs.meta diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators.meta new file mode 100644 index 0000000000..2ce1147f0d --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: fba6560f1765438c86d25bb6b165295b +timeCreated: 1695825896 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs new file mode 100644 index 0000000000..4ac1c5e451 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace SS3D.CodeGeneration +{ + public static class DatabaseAssetCreator + { + #if UNITY_EDITOR + /// + /// Creates an enum in the object path, with the defined enum name and using a list of provided assets as its elements. + /// + /// + /// + /// + public static void CreateAtPath(string path, Type classType, string className, IEnumerable assets, string namespaceName = "SS3D.Data.Enums") + { + IEnumerable enums = assets.Select(reference => reference.name); + + string dataPath = Application.dataPath; + string fullPath = dataPath + path; + + DatabaseAssetWriter.Write(fullPath, classType, className, enums, namespaceName); + + if (EditorWindow.focusedWindow != null) + { + EditorWindow.focusedWindow.ShowNotification(new GUIContent($"All assets loaded and {namespaceName}.{className} class created at {path}.")); + } + } +#endif + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs.meta new file mode 100644 index 0000000000..e45e3aedc7 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 291e1e83bf664e5e82feb4af64eb192c +timeCreated: 1695826073 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs rename to Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs diff --git a/Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/EnumCreator.cs.meta rename to Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs rename to Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/StaticClassCreator.cs.meta rename to Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers.meta new file mode 100644 index 0000000000..240285dd12 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Writers.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: dcd478b35f8d4dec85ffa264ca1ac439 +timeCreated: 1695825886 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/CodeWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/CodeWriter.cs rename to Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs diff --git a/Assets/Scripts/SS3D/CodeGeneration/CodeWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/CodeWriter.cs.meta rename to Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs new file mode 100644 index 0000000000..ac9f76e416 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace SS3D.CodeGeneration +{ + public class DatabaseAssetWriter + { + public static void Write(string filePath, Type classType, string className, IEnumerable items, string namespaceName = "SS3D.Data.Enums") + { + IEnumerable filtered = items.GroupBy(name => name).Select(nameGroup => nameGroup.Key); + + SourceFile sourceFile = new(); + + sourceFile.AppendLine($"using {classType.Namespace}\n;"); + + using (new NamespaceScope(sourceFile, namespaceName)) + { + sourceFile.AppendLine($"// This class is autogenerated. Do not modify manually."); + sourceFile.AppendLine($"public static class {className}"); + + using (new BracesScope(sourceFile)) + { + for (int index = 0; index < filtered.ToList().Count; index++) + { + string member = filtered.ToList()[index]; + + if (string.IsNullOrWhiteSpace(member)) + { + continue; + } + + char[] corrected = member.ToCharArray(); + corrected[0] = corrected[0].ToString().ToUpper()[0]; + + StringBuilder stringBuilder = new(); + stringBuilder.Append(corrected); + + sourceFile.AppendLine($"public static {classType.Name} {stringBuilder} = new {classType.Name}(\"{stringBuilder}\", \"{className}\");"); } + } + } + + File.WriteAllText(filePath + "/" + className + ".cs", sourceFile.ToString()); + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs.meta new file mode 100644 index 0000000000..6436b8bd19 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c32e6f0bc5724207ad956828d932b99e +timeCreated: 1695825753 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs rename to Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs diff --git a/Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/CodeGeneration/StaticClassWriter.cs.meta rename to Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index 50359f6775..7ef7bd0277 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -34,7 +34,7 @@ static LogManager() if (Application.isPlaying) { - settings = Assets.Get(AssetDatabases.Settings, SettingsId.LogSettings); + settings = SettingsId.LogSettings; } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index 82d59dd8bd..5e2d44aa78 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Object = UnityEngine.Object; using SS3D.Attributes; +using SS3D.CodeGeneration; using UnityEditor; using UnityEngine; @@ -122,6 +123,19 @@ public static List FindAllAssetDatabases() return databases; } + + /// + /// Generates a script with the data of this database for easy access. + /// + public void GenerateDatabaseCode() + { + if (AssetDatabaseSettings.SkipCodeGeneration) + { + return; + } + + DatabaseAssetCreator.CreateAtPath(EnumPath, typeof(DatabaseAsset), EnumName, Assets.Values, EnumNamespaceName); + } #endif } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index eb8fa7bf9d..9a620d7ddb 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using Coimbra; using SS3D.Attributes; +using SS3D.CodeGeneration; +using UnityEngine; namespace SS3D.Data.AssetDatabases { @@ -14,5 +16,27 @@ public sealed class AssetDatabaseSettings : ScriptableSettings [ReadOnly] #endif public List IncludedAssetDatabases; + +#if UNITY_EDITOR + [SerializeField] + private bool _skipCodeGeneration; + + public static bool SkipCodeGeneration => GetOrFind()._skipCodeGeneration; +#endif + + /// + /// Generates the script with the data from this database. + /// + public void GenerateCode() + { + if (SkipCodeGeneration) + { + return; + } + + const string dataPath = AssetDatabase.EnumPath; + + DatabaseAssetCreator.CreateAtPath(dataPath, typeof(DatabaseAsset), "AssetDatabases", IncludedAssetDatabases); + } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs new file mode 100644 index 0000000000..359c1e7210 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -0,0 +1,49 @@ +using SS3D.Logging.LogSettings; +using UnityEngine; + +namespace SS3D.Data.AssetDatabases +{ + public class DatabaseAsset + { + public readonly string Name; + + public readonly string DatabaseName; + + public GameObject Prefab => Get(); + + public GameObject New => GameObject.Instantiate(Prefab); + + public DatabaseAsset(string name, string databaseName) + { + Name = name; + DatabaseName = databaseName; + } + + public T Get() + where T : Object + { + return Assets.Get(DatabaseName, Name); + } + + public static implicit operator string(DatabaseAsset asset) + { + return asset.Name; + } + + public static implicit operator GameObject(DatabaseAsset asset) + { + return asset.Get(); + } + + public static implicit operator Sprite(DatabaseAsset asset) + { + return asset.Get(); + } + + public static implicit operator LogSetting(DatabaseAsset asset) + { + return asset.Get(); + + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs.meta b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs.meta new file mode 100644 index 0000000000..c1b0a2ab0d --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 00f88e8cc7e84ebbb3dff19c7aaf199f +timeCreated: 1695825631 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs index e872fd111c..848d309300 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs @@ -32,8 +32,15 @@ private void OnEnable() #if UNITY_EDITOR private void OnValidate() { - _assetDatabase.EnumName = _enumNameTextField.value; - _assetDatabase.AssetGroup = _assetGroupObjectField.value as AddressableAssetGroup; + if (_enumNameTextField != null) + { + _assetDatabase.EnumName = _enumNameTextField.value; + } + + if (_assetGroupObjectField != null) + { + _assetDatabase.AssetGroup = _assetGroupObjectField.value as AddressableAssetGroup; + } } #endif @@ -65,8 +72,7 @@ public override VisualElement CreateInspectorGUI() EditorUtility.SetDirty(_assetDatabase); - string dataPath = AssetDatabase.EnumPath; - StaticClassCreator.CreateAtPath(dataPath, _assetDatabase.EnumName, _assetDatabase.Assets.Values, _assetDatabase.EnumNamespaceName); + _assetDatabase.GenerateDatabaseCode(); if (_assetDatabase.Assets != null) { @@ -90,8 +96,6 @@ private void HandleLoadAssetsButtonPressed() { _assetDatabase.EnumName = _enumNameTextField.value; - string dataPath = AssetDatabase.EnumPath; - _assetDatabase.AssetGroup = _assetGroupObjectField.value as AddressableAssetGroup; _assetDatabase.LoadAssetsFromAssetGroup(); _assetsListView.Clear(); @@ -107,7 +111,8 @@ private void HandleLoadAssetsButtonPressed() } EditorUtility.SetDirty(_assetDatabase); - StaticClassCreator.CreateAtPath(dataPath, _assetDatabase.EnumName, _assetDatabase.Assets.Values, _assetDatabase.EnumNamespaceName); + + _assetDatabase.GenerateDatabaseCode(); } } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index cebd538446..80feee40b5 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -97,18 +97,18 @@ private void CreateAssetDatabasesEnum() if (_assetDatabaseSettings == null) { return; - } - + } + if (_assetDatabaseSettings.IncludedAssetDatabases == null || _assetDatabaseSettings.IncludedAssetDatabases.Count == 0) { return; } - StaticClassCreator.CreateAtPath(dataPath, "AssetDatabases", _assetDatabaseSettings.IncludedAssetDatabases); + _assetDatabaseSettings.GenerateCode(); foreach (AssetDatabase includedAssetDatabase in _assetDatabaseSettings.IncludedAssetDatabases) { - StaticClassCreator.CreateAtPath(dataPath, includedAssetDatabase.EnumName, includedAssetDatabase.Assets.Values, includedAssetDatabase.EnumNamespaceName); + includedAssetDatabase.GenerateDatabaseCode(); } } diff --git a/Assets/Scripts/SS3D/Data/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Bodyparts.cs deleted file mode 100644 index 0cde768a10..0000000000 --- a/Assets/Scripts/SS3D/Data/Bodyparts.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SS3D.Data -{ - public class Bodyparts - { - /// - /// Generic getter, supports all databases and all asset database enums. - /// - /// - /// - /// - /// - public static TAsset Get(string assetId) where TAsset : UnityEngine.Object - { - return Assets.GetDatabase(nameof(Enums.AssetDatabases.BodyParts)).Get(assetId); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta deleted file mode 100644 index 5e8b1c50f7..0000000000 --- a/Assets/Scripts/SS3D/Data/Bodyparts.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ad67aeb8566e4be8a051e2a356f90f81 -timeCreated: 1695769016 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs index 25d819fa18..14be8ee95f 100644 --- a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs @@ -1,17 +1,15 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class AssetDatabases + // This class is autogenerated. Do not modify manually. + public static class AssetDatabases { - public static string BodyParts = "BodyParts"; - - public static string InteractionIcons = "InteractionIcons"; - - public static string Items = "Items"; - - public static string Scenes = "Scenes"; - - public static string Settings = "Settings"; - + public static DatabaseAsset BodyParts = new DatabaseAsset("BodyParts", "AssetDatabases"); + public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); + public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); + public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); + public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); } } diff --git a/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs b/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs index 4d8a68c1e7..7bf5962235 100644 --- a/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs +++ b/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs @@ -1,11 +1,12 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class BodyPartsIds + // This class is autogenerated. Do not modify manually. + public static class BodyPartsIds { - public static string HumanHandLeft = "HumanHandLeft"; - - public static string HumanHandRight = "HumanHandRight"; - + public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "BodyPartsIds"); + public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "BodyPartsIds"); } } diff --git a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs index ed87fb46b4..e713a006d4 100644 --- a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs +++ b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs @@ -1,19 +1,16 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class InteractionIcons + // This class is autogenerated. Do not modify manually. + public static class InteractionIcons { - public static string Power = "Power"; - - public static string Take = "Take"; - - public static string Open = "Open"; - - public static string Discard = "Discard"; - - public static string Honk = "Honk"; - - public static string Nuke = "Nuke"; - + public static DatabaseAsset Power = new DatabaseAsset("Power", "InteractionIcons"); + public static DatabaseAsset Take = new DatabaseAsset("Take", "InteractionIcons"); + public static DatabaseAsset Open = new DatabaseAsset("Open", "InteractionIcons"); + public static DatabaseAsset Discard = new DatabaseAsset("Discard", "InteractionIcons"); + public static DatabaseAsset Honk = new DatabaseAsset("Honk", "InteractionIcons"); + public static DatabaseAsset Nuke = new DatabaseAsset("Nuke", "InteractionIcons"); } } diff --git a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs index b9e40fdf6a..f70d2a4351 100644 --- a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs +++ b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs @@ -1,95 +1,54 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class ItemId + // This class is autogenerated. Do not modify manually. + public static class ItemId { - public static string BikeHorn = "BikeHorn"; - - public static string NuclearAuthenticationDisk = "NuclearAuthenticationDisk"; - - public static string ToolboxBlue = "ToolboxBlue"; - - public static string SecurityPDA = "SecurityPDA"; - - public static string SecurityIDCard = "SecurityIDCard"; - - public static string PDA = "PDA"; - - public static string IDCard = "IDCard"; - - public static string Mug = "Mug"; - - public static string SodaCanCola = "SodaCanCola"; - - public static string SodaCanCannedLaughter = "SodaCanCannedLaughter"; - - public static string SodaCanCannedAir = "SodaCanCannedAir"; - - public static string SodaCanTonic = "SodaCanTonic"; - - public static string SodaCanBeepyLime = "SodaCanBeepyLime"; - - public static string SodaCanBeepsSoda = "SodaCanBeepsSoda"; - - public static string SodaCanDukePurpleTea = "SodaCanDukePurpleTea"; - - public static string Poster = "Poster"; - - public static string MedicalPatch = "MedicalPatch"; - - public static string BrutePatch = "BrutePatch"; - - public static string BurnPatch = "BurnPatch"; - - public static string DonkPocket = "DonkPocket"; - - public static string Boombox = "Boombox"; - - public static string GreyFloorTile = "GreyFloorTile"; - - public static string SteelReinforcedSheet = "SteelReinforcedSheet"; - - public static string SteelSheet = "SteelSheet"; - - public static string Crowbar = "Crowbar"; - - public static string Screwdriver = "Screwdriver"; - - public static string Wrench = "Wrench"; - - public static string FlashlightBlue = "FlashlightBlue"; - - public static string KitchenKnife = "KitchenKnife"; - - public static string TruckerCap = "TruckerCap"; - - public static string Sunglasses = "Sunglasses"; - - public static string FacewearGasMask = "FacewearGasMask"; - - public static string GlovesInsulatedLeft = "GlovesInsulatedLeft"; - - public static string GlovesInsulatedRight = "GlovesInsulatedRight"; - - public static string JumpsuitBotany = "JumpsuitBotany"; - - public static string JumpsuitEngineer = "JumpsuitEngineer"; - - public static string JumpsuitGrey = "JumpsuitGrey"; - - public static string ShoesHiTopsLeft = "ShoesHiTopsLeft"; - - public static string ShoesHiTopsRight = "ShoesHiTopsRight"; - - public static string ShoesJackbootsLeft = "ShoesJackbootsLeft"; - - public static string ShoesJackbootsRight = "ShoesJackbootsRight"; - - public static string JumpsuitSecurity = "JumpsuitSecurity"; - - public static string HeadsetLeft = "HeadsetLeft"; - - public static string HeadsetRight = "HeadsetRight"; - + public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "ItemId"); + public static DatabaseAsset NuclearAuthenticationDisk = new DatabaseAsset("NuclearAuthenticationDisk", "ItemId"); + public static DatabaseAsset ToolboxBlue = new DatabaseAsset("ToolboxBlue", "ItemId"); + public static DatabaseAsset SecurityPDA = new DatabaseAsset("SecurityPDA", "ItemId"); + public static DatabaseAsset SecurityIDCard = new DatabaseAsset("SecurityIDCard", "ItemId"); + public static DatabaseAsset PDA = new DatabaseAsset("PDA", "ItemId"); + public static DatabaseAsset IDCard = new DatabaseAsset("IDCard", "ItemId"); + public static DatabaseAsset Mug = new DatabaseAsset("Mug", "ItemId"); + public static DatabaseAsset SodaCanCola = new DatabaseAsset("SodaCanCola", "ItemId"); + public static DatabaseAsset SodaCanCannedLaughter = new DatabaseAsset("SodaCanCannedLaughter", "ItemId"); + public static DatabaseAsset SodaCanCannedAir = new DatabaseAsset("SodaCanCannedAir", "ItemId"); + public static DatabaseAsset SodaCanTonic = new DatabaseAsset("SodaCanTonic", "ItemId"); + public static DatabaseAsset SodaCanBeepyLime = new DatabaseAsset("SodaCanBeepyLime", "ItemId"); + public static DatabaseAsset SodaCanBeepsSoda = new DatabaseAsset("SodaCanBeepsSoda", "ItemId"); + public static DatabaseAsset SodaCanDukePurpleTea = new DatabaseAsset("SodaCanDukePurpleTea", "ItemId"); + public static DatabaseAsset Poster = new DatabaseAsset("Poster", "ItemId"); + public static DatabaseAsset MedicalPatch = new DatabaseAsset("MedicalPatch", "ItemId"); + public static DatabaseAsset BrutePatch = new DatabaseAsset("BrutePatch", "ItemId"); + public static DatabaseAsset BurnPatch = new DatabaseAsset("BurnPatch", "ItemId"); + public static DatabaseAsset DonkPocket = new DatabaseAsset("DonkPocket", "ItemId"); + public static DatabaseAsset Boombox = new DatabaseAsset("Boombox", "ItemId"); + public static DatabaseAsset GreyFloorTile = new DatabaseAsset("GreyFloorTile", "ItemId"); + public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "ItemId"); + public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "ItemId"); + public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "ItemId"); + public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "ItemId"); + public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "ItemId"); + public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "ItemId"); + public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "ItemId"); + public static DatabaseAsset TruckerCap = new DatabaseAsset("TruckerCap", "ItemId"); + public static DatabaseAsset Sunglasses = new DatabaseAsset("Sunglasses", "ItemId"); + public static DatabaseAsset FacewearGasMask = new DatabaseAsset("FacewearGasMask", "ItemId"); + public static DatabaseAsset GlovesInsulatedLeft = new DatabaseAsset("GlovesInsulatedLeft", "ItemId"); + public static DatabaseAsset GlovesInsulatedRight = new DatabaseAsset("GlovesInsulatedRight", "ItemId"); + public static DatabaseAsset JumpsuitBotany = new DatabaseAsset("JumpsuitBotany", "ItemId"); + public static DatabaseAsset JumpsuitEngineer = new DatabaseAsset("JumpsuitEngineer", "ItemId"); + public static DatabaseAsset JumpsuitGrey = new DatabaseAsset("JumpsuitGrey", "ItemId"); + public static DatabaseAsset ShoesHiTopsLeft = new DatabaseAsset("ShoesHiTopsLeft", "ItemId"); + public static DatabaseAsset ShoesHiTopsRight = new DatabaseAsset("ShoesHiTopsRight", "ItemId"); + public static DatabaseAsset ShoesJackbootsLeft = new DatabaseAsset("ShoesJackbootsLeft", "ItemId"); + public static DatabaseAsset ShoesJackbootsRight = new DatabaseAsset("ShoesJackbootsRight", "ItemId"); + public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "ItemId"); + public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "ItemId"); + public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "ItemId"); } } diff --git a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs index 81e27d3b6f..20d50a40f9 100644 --- a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs +++ b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs @@ -1,15 +1,14 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class Scenes + // This class is autogenerated. Do not modify manually. + public static class Scenes { - public static string Boot = "Boot"; - - public static string Game = "Game"; - - public static string Launcher = "Launcher"; - - public static string Intro = "Intro"; - + public static DatabaseAsset Boot = new DatabaseAsset("Boot", "Scenes"); + public static DatabaseAsset Game = new DatabaseAsset("Game", "Scenes"); + public static DatabaseAsset Launcher = new DatabaseAsset("Launcher", "Scenes"); + public static DatabaseAsset Intro = new DatabaseAsset("Intro", "Scenes"); } } diff --git a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs index e74a873318..04486b8294 100644 --- a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs +++ b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs @@ -1,11 +1,12 @@ +using SS3D.Data.AssetDatabases +; namespace SS3D.Data.Enums { - public class SettingsId + // This class is autogenerated. Do not modify manually. + public static class SettingsId { - public static string ApplicationSettings = "ApplicationSettings"; - - public static string LogSettings = "LogSettings"; - + public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); + public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); } } diff --git a/Assets/Scripts/SS3D/Data/Icons.cs b/Assets/Scripts/SS3D/Data/Icons.cs deleted file mode 100644 index 71daf78fd5..0000000000 --- a/Assets/Scripts/SS3D/Data/Icons.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SS3D.Data -{ - public static class Icons - { - /// - /// Generic getter, supports all databases and all asset database enums. - /// - /// - /// - /// - /// - public static TAsset Get(string assetId) where TAsset : UnityEngine.Object - { - return Assets.GetDatabase(nameof(Enums.AssetDatabases.InteractionIcons)).Get(assetId); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Icons.cs.meta b/Assets/Scripts/SS3D/Data/Icons.cs.meta deleted file mode 100644 index c317df3e9a..0000000000 --- a/Assets/Scripts/SS3D/Data/Icons.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: afc88707d4d04f56b8ebe2fd36c9fc7a -timeCreated: 1695768471 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Items.cs b/Assets/Scripts/SS3D/Data/Items.cs deleted file mode 100644 index 340de7db36..0000000000 --- a/Assets/Scripts/SS3D/Data/Items.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SS3D.Data -{ - public static class Items - { - /// - /// Generic getter, supports all databases and all asset database enums. - /// - /// - /// - /// - /// - public static TAsset Get(string assetId) where TAsset : UnityEngine.Object - { - return Assets.GetDatabase(nameof(Enums.AssetDatabases.Items)).Get(assetId); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Items.cs.meta b/Assets/Scripts/SS3D/Data/Items.cs.meta deleted file mode 100644 index a11f0f86a5..0000000000 --- a/Assets/Scripts/SS3D/Data/Items.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 4fdcc0a62a20459dbb267b976b5bdf7c -timeCreated: 1695768393 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs index 08829aa5a9..f819cfcfbd 100644 --- a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs +++ b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs @@ -33,7 +33,7 @@ public void LaunchGame(NetworkType networkType, string ckey, string ip, string p networkSettings.ServerAddress = ip; networkSettings.ServerPort = Convert.ToUInt16(port); - Scene.LoadAsync(Scenes.Intro); + Scene.LoadAsync(Scenes.Intro.Name); } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs index e463759ac5..7f6673be07 100644 --- a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs @@ -23,7 +23,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Nuke); + return Icon != null ? Icon : InteractionIcons.Nuke; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs index 68da0a914a..0ea085b15e 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs @@ -35,7 +35,7 @@ public override bool CanInteract(InteractionEvent interactionEvent) /// public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); + return Icon != null ? Icon : InteractionIcons.Take; } /// diff --git a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs index b3dc9d20b9..d8326ea38c 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs @@ -32,7 +32,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); + return Icon != null ? Icon : InteractionIcons.Open; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs index 3e8a417dc3..440454b52a 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs @@ -12,8 +12,6 @@ namespace SS3D.Systems.Furniture { public class Nuke : InteractionSource, IInteractionTarget { - [SerializeField] private Sprite _sprite; - [ServerRpc(RequireOwnership = false)] public void Detonate() { @@ -23,9 +21,7 @@ public void Detonate() IInteraction[] IInteractionTarget.CreateTargetInteractions(InteractionEvent interactionEvent) { - _sprite = Icons.Get(InteractionIcons.Nuke); - - return new IInteraction[] { new NukeDetonateInteraction { Icon = _sprite } }; + return new IInteraction[] { new NukeDetonateInteraction { Icon = InteractionIcons.Nuke } }; } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs index cbdacc41d9..f5762791b3 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs @@ -31,7 +31,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); + return Icon != null ? Icon : InteractionIcons.Open; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs index 6e25e11746..4123a1614c 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs @@ -58,7 +58,7 @@ public IInteraction[] CreateTargetInteractions(InteractionEvent interactionEvent { new DispenseProductInteraction { - Icon = Icons.Get(InteractionIcons.Take) + Icon = InteractionIcons.Take } }; } diff --git a/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs b/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs index 3df9cd3739..4464e248d4 100644 --- a/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs +++ b/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs @@ -15,12 +15,12 @@ public class GetItemObjective : GamemodeObjective /// /// The item id required to complete the objective. /// - [FormerlySerializedAs("_targetItemIdId")] [FormerlySerializedAs("_targetItemId")] [SerializeField] private Data.Enums.ItemId _targetItemIdId; + [SerializeField] private GameObject _targetItem; /// /// The item that was picked up. /// - private Data.Enums.ItemId _caughtItemIdId; + private GameObject _caughtItem; /// /// The player that picked up the item. @@ -37,7 +37,7 @@ public override void AddEventListeners() public override void FinalizeObjective() { // Confirm correct item has been picked up by the correct player - if (!_caughtItemIdId.Equals(_targetItemIdId) || !_caughtPlayerCkey.Equals(AssigneeCkey)) + if (!_caughtItem.Equals(_targetItem) || !_caughtPlayerCkey.Equals(AssigneeCkey)) { return; } @@ -46,12 +46,12 @@ public override void FinalizeObjective() private void HandleItemPickedUpEvent(ref EventContext context, in ItemPickedUpEvent e) { - Data.Enums.ItemId itemIdId = e.Item.ItemId; + GameObject itemIdId = e.Item.ItemId; string playerCkey = e.Player; - if (itemIdId == _targetItemIdId && playerCkey.Equals(AssigneeCkey)) + if (itemIdId == _targetItem && playerCkey.Equals(AssigneeCkey)) { - _caughtItemIdId = itemIdId; + _caughtItem = itemIdId; _caughtPlayerCkey = playerCkey; FinalizeObjective(); diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs index 4fb7627df3..0f616611cc 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs @@ -47,7 +47,7 @@ public override string Perform(string[] args, NetworkConnection conn) Player Player = Subsystems.Get().GetPlayer(ckey); Entity entity = Subsystems.Get().GetSpawnedEntity(Player); - GameObject leftHandPrefab = Bodyparts.Get(BodyPartsIds.HumanHandLeft); + GameObject leftHandPrefab = BodyPartsIds.HumanHandLeft; GameObject leftHandObject = GameObject.Instantiate(leftHandPrefab, entity.transform); leftHandObject.transform.localPosition = position; leftHandObject.transform.localEulerAngles = rotation; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs index e433c953ca..73a88d7810 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs @@ -31,18 +31,18 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac StoreInteraction storeInteraction = new(attachedContainer) { - Icon = Icons.Get(InteractionIcons.Take) + Icon = InteractionIcons.Take }; TakeFirstInteraction takeFirstInteraction = new(attachedContainer) { - Icon = Icons.Get(InteractionIcons.Take) + Icon = InteractionIcons.Take }; ViewContainerInteraction view = new(attachedContainer) { MaxDistance = attachedContainer.MaxDistance, Icon = _viewContainerIcon }; - view.Icon = Icons.Get(InteractionIcons.Open); + view.Icon = InteractionIcons.Open; // Pile or Normal the Store Interaction will always appear, but View only appears in Normal containers if (IsOpen() | !attachedContainer.OnlyStoreWhenOpen | !attachedContainer.IsOpenable) @@ -66,7 +66,7 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac OpenInteraction openInteraction = new(attachedContainer) { - Icon = Icons.Get(InteractionIcons.Open) + Icon = InteractionIcons.Open }; openInteraction.OnOpenStateChanged += OpenStateChanged; interactions.Add(openInteraction); @@ -74,7 +74,6 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac return interactions.ToArray(); } - protected override void OpenStateChanged(object sender, bool e) { base.OpenStateChanged(sender, e); diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs index c5048a5d22..4f0315a13d 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs @@ -19,7 +19,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Discard); + return Icon != null ? Icon : InteractionIcons.Discard; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs index d731df132e..fdc0f6c843 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs @@ -41,7 +41,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); + return Icon != null ? Icon : InteractionIcons.Open; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs index 53037fc3e5..187a9fcc00 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs @@ -22,7 +22,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); + return Icon != null ? Icon : InteractionIcons.Take; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs index 61d2fb5787..387558f101 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs @@ -25,7 +25,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Discard); + return Icon != null ? Icon : InteractionIcons.Discard; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs index ee70ec2504..b03b96489a 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs @@ -27,7 +27,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Take); + return Icon != null ? Icon : InteractionIcons.Take; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs index 0ef4fe2ad0..a3838ef81e 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs @@ -26,7 +26,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Open); + return Icon != null ? Icon : InteractionIcons.Open; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs index bb511094fc..b6e7bcd163 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs @@ -20,7 +20,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Honk); + return Icon != null ? Icon : InteractionIcons.Honk; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs index e16c3e8003..1a197ded55 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs @@ -24,7 +24,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Icons.Get(InteractionIcons.Nuke); + return Icon != null ? Icon : InteractionIcons.Nuke; } public override bool CanInteract(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs index 211777c127..fdde59e911 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs @@ -68,7 +68,7 @@ public class Item : InteractionSource, IInteractionTarget private AttachedContainer _container; public string Name => _name; - public ItemId ItemId { get; set; } + public GameObject ItemId { get; set; } public ReadOnlyCollection Traits => ((List) _traits.Collection).AsReadOnly(); public AttachedContainer Container => _container; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs index 81385ee5ad..8a46cf32f6 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs @@ -39,7 +39,7 @@ public void CmdSpawnItem(string id, Vector3 position, Quaternion rotation) [Server] public Item SpawnItem(string id, Vector3 position, Quaternion rotation) { - Item itemPrefab = Data.Items.Get(id).GetComponent(); + Item itemPrefab = Assets.Get(AssetDatabases.Items, id).GetComponent(); Item itemInstance = Instantiate(itemPrefab, position, rotation); ServerManager.Spawn(itemInstance.GameObject); @@ -72,7 +72,7 @@ public void CmdSpawnItemInContainer(ItemId id, AttachedContainer attachedContain [Server] public Item SpawnItemInContainer(string id, AttachedContainer attachedContainer) { - Item itemPrefab = Data.Items.Get(id); + Item itemPrefab = Assets.Get(AssetDatabases.Items, id).GetComponent(); if (attachedContainer is null) { diff --git a/Assets/Settings/AssetDatabaseSettings.asset b/Assets/Settings/AssetDatabaseSettings.asset index 5fa30508fb..2a590cb973 100644 --- a/Assets/Settings/AssetDatabaseSettings.asset +++ b/Assets/Settings/AssetDatabaseSettings.asset @@ -24,3 +24,4 @@ MonoBehaviour: - {fileID: 11400000, guid: 99157bc96fcf5694e856e4d5092c39df, type: 2} - {fileID: 11400000, guid: 43b69e36c49203a44bf20042cd83de81, type: 2} - {fileID: 11400000, guid: 830650063081cdf4d90087fc2ac74d24, type: 2} + _skipCodeGeneration: 0 From 0d361f05ecbc19005b91ba0c529b2ed153705400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:05:34 -0300 Subject: [PATCH 03/32] Remove auto generated files --- .../Scripts/SS3D/Data/Enums/AssetDatabases.cs | 15 ------ .../SS3D/Data/Enums/AssetDatabases.cs.meta | 11 ---- .../Scripts/SS3D/Data/Enums/BodyPartsIds.cs | 12 ----- .../SS3D/Data/Enums/InteractionIcons.cs | 16 ------ .../SS3D/Data/Enums/InteractionIcons.cs.meta | 11 ---- Assets/Scripts/SS3D/Data/Enums/ItemId.cs | 54 ------------------- Assets/Scripts/SS3D/Data/Enums/ItemId.cs.meta | 11 ---- .../SS3D/Data/Enums/MaterialsIds.cs.meta | 11 ---- Assets/Scripts/SS3D/Data/Enums/Scenes.cs | 14 ----- Assets/Scripts/SS3D/Data/Enums/Scenes.cs.meta | 11 ---- Assets/Scripts/SS3D/Data/Enums/SettingsId.cs | 12 ----- .../SS3D/Data/Enums/SettingsId.cs.meta | 11 ---- 12 files changed, 189 deletions(-) delete mode 100644 Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Enums/ItemId.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/ItemId.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Enums/Scenes.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/Scenes.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Enums/SettingsId.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/SettingsId.cs.meta diff --git a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs deleted file mode 100644 index 14be8ee95f..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class AssetDatabases - { - public static DatabaseAsset BodyParts = new DatabaseAsset("BodyParts", "AssetDatabases"); - public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); - public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); - public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); - public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs.meta b/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs.meta deleted file mode 100644 index 5028677b42..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/AssetDatabases.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a65b788abbe199c40bb86201fcdae6ed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs b/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs deleted file mode 100644 index 7bf5962235..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/BodyPartsIds.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class BodyPartsIds - { - public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "BodyPartsIds"); - public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "BodyPartsIds"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs deleted file mode 100644 index e713a006d4..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs +++ /dev/null @@ -1,16 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class InteractionIcons - { - public static DatabaseAsset Power = new DatabaseAsset("Power", "InteractionIcons"); - public static DatabaseAsset Take = new DatabaseAsset("Take", "InteractionIcons"); - public static DatabaseAsset Open = new DatabaseAsset("Open", "InteractionIcons"); - public static DatabaseAsset Discard = new DatabaseAsset("Discard", "InteractionIcons"); - public static DatabaseAsset Honk = new DatabaseAsset("Honk", "InteractionIcons"); - public static DatabaseAsset Nuke = new DatabaseAsset("Nuke", "InteractionIcons"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs.meta b/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs.meta deleted file mode 100644 index ec196b4685..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/InteractionIcons.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 76c989311baea5e4e94e6b5f60000688 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs deleted file mode 100644 index f70d2a4351..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs +++ /dev/null @@ -1,54 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class ItemId - { - public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "ItemId"); - public static DatabaseAsset NuclearAuthenticationDisk = new DatabaseAsset("NuclearAuthenticationDisk", "ItemId"); - public static DatabaseAsset ToolboxBlue = new DatabaseAsset("ToolboxBlue", "ItemId"); - public static DatabaseAsset SecurityPDA = new DatabaseAsset("SecurityPDA", "ItemId"); - public static DatabaseAsset SecurityIDCard = new DatabaseAsset("SecurityIDCard", "ItemId"); - public static DatabaseAsset PDA = new DatabaseAsset("PDA", "ItemId"); - public static DatabaseAsset IDCard = new DatabaseAsset("IDCard", "ItemId"); - public static DatabaseAsset Mug = new DatabaseAsset("Mug", "ItemId"); - public static DatabaseAsset SodaCanCola = new DatabaseAsset("SodaCanCola", "ItemId"); - public static DatabaseAsset SodaCanCannedLaughter = new DatabaseAsset("SodaCanCannedLaughter", "ItemId"); - public static DatabaseAsset SodaCanCannedAir = new DatabaseAsset("SodaCanCannedAir", "ItemId"); - public static DatabaseAsset SodaCanTonic = new DatabaseAsset("SodaCanTonic", "ItemId"); - public static DatabaseAsset SodaCanBeepyLime = new DatabaseAsset("SodaCanBeepyLime", "ItemId"); - public static DatabaseAsset SodaCanBeepsSoda = new DatabaseAsset("SodaCanBeepsSoda", "ItemId"); - public static DatabaseAsset SodaCanDukePurpleTea = new DatabaseAsset("SodaCanDukePurpleTea", "ItemId"); - public static DatabaseAsset Poster = new DatabaseAsset("Poster", "ItemId"); - public static DatabaseAsset MedicalPatch = new DatabaseAsset("MedicalPatch", "ItemId"); - public static DatabaseAsset BrutePatch = new DatabaseAsset("BrutePatch", "ItemId"); - public static DatabaseAsset BurnPatch = new DatabaseAsset("BurnPatch", "ItemId"); - public static DatabaseAsset DonkPocket = new DatabaseAsset("DonkPocket", "ItemId"); - public static DatabaseAsset Boombox = new DatabaseAsset("Boombox", "ItemId"); - public static DatabaseAsset GreyFloorTile = new DatabaseAsset("GreyFloorTile", "ItemId"); - public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "ItemId"); - public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "ItemId"); - public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "ItemId"); - public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "ItemId"); - public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "ItemId"); - public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "ItemId"); - public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "ItemId"); - public static DatabaseAsset TruckerCap = new DatabaseAsset("TruckerCap", "ItemId"); - public static DatabaseAsset Sunglasses = new DatabaseAsset("Sunglasses", "ItemId"); - public static DatabaseAsset FacewearGasMask = new DatabaseAsset("FacewearGasMask", "ItemId"); - public static DatabaseAsset GlovesInsulatedLeft = new DatabaseAsset("GlovesInsulatedLeft", "ItemId"); - public static DatabaseAsset GlovesInsulatedRight = new DatabaseAsset("GlovesInsulatedRight", "ItemId"); - public static DatabaseAsset JumpsuitBotany = new DatabaseAsset("JumpsuitBotany", "ItemId"); - public static DatabaseAsset JumpsuitEngineer = new DatabaseAsset("JumpsuitEngineer", "ItemId"); - public static DatabaseAsset JumpsuitGrey = new DatabaseAsset("JumpsuitGrey", "ItemId"); - public static DatabaseAsset ShoesHiTopsLeft = new DatabaseAsset("ShoesHiTopsLeft", "ItemId"); - public static DatabaseAsset ShoesHiTopsRight = new DatabaseAsset("ShoesHiTopsRight", "ItemId"); - public static DatabaseAsset ShoesJackbootsLeft = new DatabaseAsset("ShoesJackbootsLeft", "ItemId"); - public static DatabaseAsset ShoesJackbootsRight = new DatabaseAsset("ShoesJackbootsRight", "ItemId"); - public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "ItemId"); - public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "ItemId"); - public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "ItemId"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs.meta b/Assets/Scripts/SS3D/Data/Enums/ItemId.cs.meta deleted file mode 100644 index 65f9ab8968..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/ItemId.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 639a8d384aad93648a6ad0385b7301aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs.meta b/Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs.meta deleted file mode 100644 index 27384d7258..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6820f2a28e45dc04d9a3d5dfd92d614b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs deleted file mode 100644 index 20d50a40f9..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs +++ /dev/null @@ -1,14 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class Scenes - { - public static DatabaseAsset Boot = new DatabaseAsset("Boot", "Scenes"); - public static DatabaseAsset Game = new DatabaseAsset("Game", "Scenes"); - public static DatabaseAsset Launcher = new DatabaseAsset("Launcher", "Scenes"); - public static DatabaseAsset Intro = new DatabaseAsset("Intro", "Scenes"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs.meta b/Assets/Scripts/SS3D/Data/Enums/Scenes.cs.meta deleted file mode 100644 index ba9de16cb4..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/Scenes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ac402fe32ffb14409804421c9bd99ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs deleted file mode 100644 index 04486b8294..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class SettingsId - { - public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); - public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs.meta b/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs.meta deleted file mode 100644 index 1edee4a0be..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/SettingsId.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 801e4fd72f6233245b786be555270c23 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From 65a0392ac3394aae8b057d6c4e7f6d48414f3b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:20:43 -0300 Subject: [PATCH 04/32] Change namespace used for generated scripts --- .../Content/Data/Icons/InteractionIcons.asset | 1 - Assets/Content/Data/Items.asset | 1 - Assets/Content/Data/Scenes.asset | 1 - Assets/Content/Data/Settings.asset | 1 - .../Creators/DatabaseAssetCreator.cs | 6 ++ .../SS3D/Core/ApplicationInitializerSystem.cs | 2 +- Assets/Scripts/SS3D/Core/LogManager.cs | 3 +- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 4 +- .../AssetDatabaseSettingsInspectorEditor.cs | 2 - Assets/Scripts/SS3D/Data/Enums.meta | 3 - Assets/Scripts/SS3D/Data/Generated.meta | 8 +++ .../SS3D/Data/Generated/AssetDatabases.cs | 15 +++++ .../Data/Generated/AssetDatabases.cs.meta | 11 ++++ .../Scripts/SS3D/Data/Generated/Bodyparts.cs | 12 ++++ .../SS3D/Data/Generated/Bodyparts.cs.meta | 11 ++++ .../SS3D/Data/Generated/InteractionIcons.cs | 16 ++++++ .../Data/Generated/InteractionIcons.cs.meta | 11 ++++ Assets/Scripts/SS3D/Data/Generated/Items.cs | 54 ++++++++++++++++++ .../Scripts/SS3D/Data/Generated/Items.cs.meta | 11 ++++ Assets/Scripts/SS3D/Data/Generated/Scenes.cs | 14 +++++ .../SS3D/Data/Generated/Scenes.cs.meta | 11 ++++ .../Scripts/SS3D/Data/Generated/SettingsId.cs | 12 ++++ .../SS3D/Data/Generated/SettingsId.cs.meta | 11 ++++ .../Scripts/SS3D/Launcher/LauncherSystem.cs | 1 + Assets/Scripts/SS3D/SceneManagement/Scene.cs | 2 +- .../Combat/Interactions/HitInteraction.cs | 1 + .../Furniture/DispenseProductInteraction.cs | 1 + .../Furniture/LockLockerInteraction.cs | 1 + Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs | 1 + .../Furniture/UnlockLockerInteraction.cs | 1 + .../SS3D/Systems/Furniture/VendingMachine.cs | 1 + .../Commands/AddHandCommand.cs | 55 ++++++++----------- .../Containers/ContainerInteractive.cs | 1 + .../Inventory/Interactions/DropInteraction.cs | 1 + .../Inventory/Interactions/OpenInteraction.cs | 1 + .../Interactions/PickupInteraction.cs | 1 + .../Interactions/StoreInteraction.cs | 1 + .../Interactions/TakeFirstInteraction.cs | 1 + .../Interactions/ViewContainerInteraction.cs | 1 + .../Items/Generic/HonkInteraction.cs | 1 + .../Items/Generic/NukeDetonateInteraction.cs | 1 + 41 files changed, 248 insertions(+), 46 deletions(-) delete mode 100644 Assets/Scripts/SS3D/Data/Enums.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta diff --git a/Assets/Content/Data/Icons/InteractionIcons.asset b/Assets/Content/Data/Icons/InteractionIcons.asset index b139b9b6e4..1f8a1eff10 100644 --- a/Assets/Content/Data/Icons/InteractionIcons.asset +++ b/Assets/Content/Data/Icons/InteractionIcons.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: InteractionIcons m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums EnumName: InteractionIcons AssetGroup: {fileID: 11400000, guid: 43f5c5834bd38014f9dbacb0f51bcc54, type: 2} Assets: diff --git a/Assets/Content/Data/Items.asset b/Assets/Content/Data/Items.asset index ffbd0d0130..ec049bd858 100644 --- a/Assets/Content/Data/Items.asset +++ b/Assets/Content/Data/Items.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Items m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums EnumName: ItemId AssetGroup: {fileID: 11400000, guid: 8e95016540bf27c4eb11580ec096568a, type: 2} Assets: diff --git a/Assets/Content/Data/Scenes.asset b/Assets/Content/Data/Scenes.asset index fb6c9e1a74..d00a17a986 100644 --- a/Assets/Content/Data/Scenes.asset +++ b/Assets/Content/Data/Scenes.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Scenes m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums EnumName: Scenes AssetGroup: {fileID: 11400000, guid: bacca0c47905ef441803065410c8978e, type: 2} Assets: diff --git a/Assets/Content/Data/Settings.asset b/Assets/Content/Data/Settings.asset index 917df0cad8..081414448a 100644 --- a/Assets/Content/Data/Settings.asset +++ b/Assets/Content/Data/Settings.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Settings m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums EnumName: SettingsId AssetGroup: {fileID: 11400000, guid: 9bfbc9d4c2c1bb944942108648547da2, type: 2} Assets: diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs index 4ac1c5e451..4d2d32f5d6 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using UnityEditor; using UnityEngine; @@ -23,6 +24,11 @@ public static void CreateAtPath(string path, Type classType, string className, I string dataPath = Application.dataPath; string fullPath = dataPath + path; + if (!Directory.Exists(fullPath)) + { + Directory.CreateDirectory(fullPath); + } + DatabaseAssetWriter.Write(fullPath, classType, className, enums, namespaceName); if (EditorWindow.focusedWindow != null) diff --git a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs index 28ae1bd38e..c21f7e49d7 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs @@ -4,7 +4,7 @@ using SS3D.Core.Utils; using SS3D.Data; using SS3D.Data.Enums; -using SS3D.Data.Management; +using SS3D.Data.Generated; using SS3D.Logging; using SS3D.SceneManagement; using UDiscord; diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index 7ef7bd0277..29e5a09ef7 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -8,7 +8,8 @@ using SS3D.Logging.LogSettings; using SS3D.Logging; using SS3D.Data; -using Log = Serilog.Log; +using SS3D.Data.Enums; +using SS3D.Data.Generated; namespace SS3D.Core diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index 5e2d44aa78..2582b70058 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -23,12 +23,12 @@ public class AssetDatabase : ScriptableObject /// /// The path that the enum will be generated to. /// - public const string EnumPath = @"\Scripts\SS3D\Data\Enums"; + public const string EnumPath = @"\Scripts\SS3D\Data\Generated"; /// /// The namespace that will be included on the generated Enum. /// - public string EnumNamespaceName = "SS3D.Data.Enums"; + public const string EnumNamespaceName = "SS3D.Data.Generated"; /// /// The name that the generated enum will have; diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index 80feee40b5..f925997231 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -92,8 +92,6 @@ private void FindAndLoadAllAssetsDatabasesAddressablesGroups() private void CreateAssetDatabasesEnum() { - string dataPath = AssetDatabase.EnumPath; - if (_assetDatabaseSettings == null) { return; diff --git a/Assets/Scripts/SS3D/Data/Enums.meta b/Assets/Scripts/SS3D/Data/Enums.meta deleted file mode 100644 index 36b670d4de..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 29abb6e289cd4336aecc76867aac7f56 -timeCreated: 1672887802 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Generated.meta b/Assets/Scripts/SS3D/Data/Generated.meta new file mode 100644 index 0000000000..96087e3951 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6f9c9559d66d19646aebfee98fc54802 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs new file mode 100644 index 0000000000..e0158b406f --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -0,0 +1,15 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Enums +{ + // This class is autogenerated. Do not modify manually. + public static class AssetDatabases + { + public static DatabaseAsset Bodyparts = new DatabaseAsset("Bodyparts", "AssetDatabases"); + public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); + public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); + public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); + public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta new file mode 100644 index 0000000000..597b5679b8 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bcd440ab388c334cada11588f379e2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs new file mode 100644 index 0000000000..dfdddb6cac --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Bodyparts + { + public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "Bodyparts"); + public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "Bodyparts"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta new file mode 100644 index 0000000000..8c3e3447c4 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f868fcd3cf3ca04c999f52a026de965 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs new file mode 100644 index 0000000000..a937e0c016 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs @@ -0,0 +1,16 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class InteractionIcons + { + public static DatabaseAsset Power = new DatabaseAsset("Power", "InteractionIcons"); + public static DatabaseAsset Take = new DatabaseAsset("Take", "InteractionIcons"); + public static DatabaseAsset Open = new DatabaseAsset("Open", "InteractionIcons"); + public static DatabaseAsset Discard = new DatabaseAsset("Discard", "InteractionIcons"); + public static DatabaseAsset Honk = new DatabaseAsset("Honk", "InteractionIcons"); + public static DatabaseAsset Nuke = new DatabaseAsset("Nuke", "InteractionIcons"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta new file mode 100644 index 0000000000..830e88568a --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7668bd64f5ecb104b861fc5fea6bceb5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs new file mode 100644 index 0000000000..9619ed164d --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs @@ -0,0 +1,54 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Items + { + public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "ItemId"); + public static DatabaseAsset NuclearAuthenticationDisk = new DatabaseAsset("NuclearAuthenticationDisk", "ItemId"); + public static DatabaseAsset ToolboxBlue = new DatabaseAsset("ToolboxBlue", "ItemId"); + public static DatabaseAsset SecurityPDA = new DatabaseAsset("SecurityPDA", "ItemId"); + public static DatabaseAsset SecurityIDCard = new DatabaseAsset("SecurityIDCard", "ItemId"); + public static DatabaseAsset PDA = new DatabaseAsset("PDA", "ItemId"); + public static DatabaseAsset IDCard = new DatabaseAsset("IDCard", "ItemId"); + public static DatabaseAsset Mug = new DatabaseAsset("Mug", "ItemId"); + public static DatabaseAsset SodaCanCola = new DatabaseAsset("SodaCanCola", "ItemId"); + public static DatabaseAsset SodaCanCannedLaughter = new DatabaseAsset("SodaCanCannedLaughter", "ItemId"); + public static DatabaseAsset SodaCanCannedAir = new DatabaseAsset("SodaCanCannedAir", "ItemId"); + public static DatabaseAsset SodaCanTonic = new DatabaseAsset("SodaCanTonic", "ItemId"); + public static DatabaseAsset SodaCanBeepyLime = new DatabaseAsset("SodaCanBeepyLime", "ItemId"); + public static DatabaseAsset SodaCanBeepsSoda = new DatabaseAsset("SodaCanBeepsSoda", "ItemId"); + public static DatabaseAsset SodaCanDukePurpleTea = new DatabaseAsset("SodaCanDukePurpleTea", "ItemId"); + public static DatabaseAsset Poster = new DatabaseAsset("Poster", "ItemId"); + public static DatabaseAsset MedicalPatch = new DatabaseAsset("MedicalPatch", "ItemId"); + public static DatabaseAsset BrutePatch = new DatabaseAsset("BrutePatch", "ItemId"); + public static DatabaseAsset BurnPatch = new DatabaseAsset("BurnPatch", "ItemId"); + public static DatabaseAsset DonkPocket = new DatabaseAsset("DonkPocket", "ItemId"); + public static DatabaseAsset Boombox = new DatabaseAsset("Boombox", "ItemId"); + public static DatabaseAsset GreyFloorTile = new DatabaseAsset("GreyFloorTile", "ItemId"); + public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "ItemId"); + public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "ItemId"); + public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "ItemId"); + public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "ItemId"); + public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "ItemId"); + public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "ItemId"); + public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "ItemId"); + public static DatabaseAsset TruckerCap = new DatabaseAsset("TruckerCap", "ItemId"); + public static DatabaseAsset Sunglasses = new DatabaseAsset("Sunglasses", "ItemId"); + public static DatabaseAsset FacewearGasMask = new DatabaseAsset("FacewearGasMask", "ItemId"); + public static DatabaseAsset GlovesInsulatedLeft = new DatabaseAsset("GlovesInsulatedLeft", "ItemId"); + public static DatabaseAsset GlovesInsulatedRight = new DatabaseAsset("GlovesInsulatedRight", "ItemId"); + public static DatabaseAsset JumpsuitBotany = new DatabaseAsset("JumpsuitBotany", "ItemId"); + public static DatabaseAsset JumpsuitEngineer = new DatabaseAsset("JumpsuitEngineer", "ItemId"); + public static DatabaseAsset JumpsuitGrey = new DatabaseAsset("JumpsuitGrey", "ItemId"); + public static DatabaseAsset ShoesHiTopsLeft = new DatabaseAsset("ShoesHiTopsLeft", "ItemId"); + public static DatabaseAsset ShoesHiTopsRight = new DatabaseAsset("ShoesHiTopsRight", "ItemId"); + public static DatabaseAsset ShoesJackbootsLeft = new DatabaseAsset("ShoesJackbootsLeft", "ItemId"); + public static DatabaseAsset ShoesJackbootsRight = new DatabaseAsset("ShoesJackbootsRight", "ItemId"); + public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "ItemId"); + public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "ItemId"); + public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "ItemId"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta new file mode 100644 index 0000000000..0d32e5e5f5 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3d9a644f1c796a4f8d3115591c8ccf7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs new file mode 100644 index 0000000000..10bcee386c --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs @@ -0,0 +1,14 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Scenes + { + public static DatabaseAsset Boot = new DatabaseAsset("Boot", "Scenes"); + public static DatabaseAsset Game = new DatabaseAsset("Game", "Scenes"); + public static DatabaseAsset Launcher = new DatabaseAsset("Launcher", "Scenes"); + public static DatabaseAsset Intro = new DatabaseAsset("Intro", "Scenes"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta new file mode 100644 index 0000000000..e1c460dd65 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57b09b6fe36a93248b9209dc96faf915 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs new file mode 100644 index 0000000000..b4b05d0884 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class SettingsId + { + public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); + public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta new file mode 100644 index 0000000000..dbd3134168 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2991593c72cd4194591137fdd11e150c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs index f819cfcfbd..6c69a69cfb 100644 --- a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs +++ b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs @@ -1,6 +1,7 @@ using Coimbra; using SS3D.Core.Settings; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.SceneManagement; using System; using UnityEngine; diff --git a/Assets/Scripts/SS3D/SceneManagement/Scene.cs b/Assets/Scripts/SS3D/SceneManagement/Scene.cs index 809fe12cea..7ae6e606eb 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Scene.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Scene.cs @@ -1,5 +1,5 @@ using JetBrains.Annotations; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine.SceneManagement; diff --git a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs index 7f6673be07..06a4fd4c6e 100644 --- a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs @@ -7,6 +7,7 @@ using SS3D.Systems.Health; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; namespace SS3D.Systems.Combat.Interactions { diff --git a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs index 0ea085b15e..e3a1fdf40a 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs index d8326ea38c..790d6925f0 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs index 440454b52a..1d05be538e 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs @@ -4,6 +4,7 @@ using SS3D.Core; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Systems.Gamemodes; using SS3D.Systems.Inventory.Items.Generic; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs index f5762791b3..b69dd2fa7e 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs index 4123a1614c..53e4791743 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs @@ -2,6 +2,7 @@ using SS3D.Core; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Interfaces; using SS3D.Systems.Inventory.Items; diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs index 0f616611cc..7f983eee8e 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs @@ -8,7 +8,7 @@ using SS3D.Systems.Inventory.Containers; using FishNet.Connection; using SS3D.Permissions; -using System; +using SS3D.Data.Generated; namespace SS3D.Systems.IngameConsoleSystem.Commands { @@ -19,13 +19,11 @@ namespace SS3D.Systems.IngameConsoleSystem.Commands /// public class AddHandCommand : Command { - public override string ShortDescription => "Add hand to user"; - public override string Usage => "(ckey) [(position) (rotation)] \nPosition and rotation are float arrays and written as x y z"; + public override string LongDescription => "add (ckey) [(position) (rotation)]\n Position and rotation are float arrays and written as x y z"; + public override string ShortDescription => "add hand to user"; public override ServerRoleTypes AccessLevel => ServerRoleTypes.Administrator; + public override CommandType Type => CommandType.Server; - - private record CalculatedValues(Player Player, Entity Entity, Vector3 Position, Vector3 Rotation) : ICalculatedValues; - public override string Perform(string[] args, NetworkConnection conn) { CheckArgsResponse checkArgsResponse = CheckArgs(args); @@ -47,7 +45,7 @@ public override string Perform(string[] args, NetworkConnection conn) Player Player = Subsystems.Get().GetPlayer(ckey); Entity entity = Subsystems.Get().GetSpawnedEntity(Player); - GameObject leftHandPrefab = BodyPartsIds.HumanHandLeft; + GameObject leftHandPrefab = Bodyparts.HumanHandLeft; GameObject leftHandObject = GameObject.Instantiate(leftHandPrefab, entity.transform); leftHandObject.transform.localPosition = position; leftHandObject.transform.localEulerAngles = rotation; @@ -64,37 +62,30 @@ public override string Perform(string[] args, NetworkConnection conn) } protected override CheckArgsResponse CheckArgs(string[] args) { - CheckArgsResponse response = new(); - if (args.Length != 1 && args.Length != 7) return response.MakeInvalid("Invalid number of arguments"); - + CheckArgsResponse response = new CheckArgsResponse(); + if (args.Length != 1 && args.Length != 7) + { + response.IsValid = false; + response.InvalidArgs = "Invalid number of arguments"; + return response; + } string ckey = args[0]; Player player = Subsystems.Get().GetPlayer(ckey); - if (player == null) return response.MakeInvalid("This player doesn't exist"); - - Entity entity = Subsystems.Get().GetSpawnedEntity(player); - if (entity == null) return response.MakeInvalid("This entity doesn't exist"); - - Vector3 position; - Vector3 rotation; - if (args.Length > 1) + if (player == null) { - try - { - position = new(float.Parse(args[1]), float.Parse(args[2]), float.Parse(args[3])); - rotation = new(float.Parse(args[4]), float.Parse(args[5]), float.Parse(args[6])); - } - catch (FormatException) - { - return response.MakeInvalid("Incorrect position/rotation format"); - } + response.IsValid = false; + response.InvalidArgs = "This player doesn't exist"; + return response; } - else + Entity entityToKill = Subsystems.Get().GetSpawnedEntity(player); + if (entityToKill == null) { - position = new(0.5f, 0.7f, 0); - rotation = new(-50, -270, 90); + response.IsValid = false; + response.InvalidArgs = "This entity doesn't exist"; + return response; } - - return response.MakeValid(new CalculatedValues(player, entity, position, rotation)); + response.IsValid = true; + return response; } } } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs index 73a88d7810..f9085f0eb6 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs @@ -7,6 +7,7 @@ using SS3D.Systems.Inventory.Items; using UnityEngine; using SS3D.Data.Enums; +using SS3D.Data.Generated; namespace SS3D.Systems.Inventory.Containers { diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs index 4f0315a13d..51ee8b4913 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs @@ -1,6 +1,7 @@ using System; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Systems.Inventory.Containers; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs index fdc0f6c843..08194efc43 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs @@ -1,6 +1,7 @@ using System; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs index 187a9fcc00..887b8f8901 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs @@ -5,6 +5,7 @@ using SS3D.Systems.GameModes.Events; using UnityEngine; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs index 387558f101..2158285b83 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs index b03b96489a..4e30fa6c4c 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Systems.Inventory.Containers; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs index a3838ef81e..31662948aa 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Systems.Entities; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs index b6e7bcd163..1f9a014e78 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs @@ -1,5 +1,6 @@ using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs index 1a197ded55..2f0688e04a 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs @@ -1,6 +1,7 @@ using SS3D.Core; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; From afe450a74a7ba2889a77a36d40cada42552f4c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:23:48 -0300 Subject: [PATCH 05/32] Remove generated code --- .../SS3D/Data/Generated/AssetDatabases.cs | 15 ------ .../Data/Generated/AssetDatabases.cs.meta | 11 ---- .../Scripts/SS3D/Data/Generated/Bodyparts.cs | 12 ----- .../SS3D/Data/Generated/Bodyparts.cs.meta | 11 ---- .../SS3D/Data/Generated/InteractionIcons.cs | 16 ------ .../Data/Generated/InteractionIcons.cs.meta | 11 ---- Assets/Scripts/SS3D/Data/Generated/Items.cs | 54 ------------------- .../Scripts/SS3D/Data/Generated/Items.cs.meta | 11 ---- Assets/Scripts/SS3D/Data/Generated/Scenes.cs | 14 ----- .../SS3D/Data/Generated/Scenes.cs.meta | 11 ---- .../Scripts/SS3D/Data/Generated/SettingsId.cs | 12 ----- .../SS3D/Data/Generated/SettingsId.cs.meta | 11 ---- 12 files changed, 189 deletions(-) delete mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs deleted file mode 100644 index e0158b406f..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ /dev/null @@ -1,15 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Enums -{ - // This class is autogenerated. Do not modify manually. - public static class AssetDatabases - { - public static DatabaseAsset Bodyparts = new DatabaseAsset("Bodyparts", "AssetDatabases"); - public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); - public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); - public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); - public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta deleted file mode 100644 index 597b5679b8..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bcd440ab388c334cada11588f379e2d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs deleted file mode 100644 index dfdddb6cac..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class Bodyparts - { - public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "Bodyparts"); - public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "Bodyparts"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta deleted file mode 100644 index 8c3e3447c4..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f868fcd3cf3ca04c999f52a026de965 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs deleted file mode 100644 index a937e0c016..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs +++ /dev/null @@ -1,16 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class InteractionIcons - { - public static DatabaseAsset Power = new DatabaseAsset("Power", "InteractionIcons"); - public static DatabaseAsset Take = new DatabaseAsset("Take", "InteractionIcons"); - public static DatabaseAsset Open = new DatabaseAsset("Open", "InteractionIcons"); - public static DatabaseAsset Discard = new DatabaseAsset("Discard", "InteractionIcons"); - public static DatabaseAsset Honk = new DatabaseAsset("Honk", "InteractionIcons"); - public static DatabaseAsset Nuke = new DatabaseAsset("Nuke", "InteractionIcons"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta deleted file mode 100644 index 830e88568a..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7668bd64f5ecb104b861fc5fea6bceb5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs deleted file mode 100644 index 9619ed164d..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Items.cs +++ /dev/null @@ -1,54 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class Items - { - public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "ItemId"); - public static DatabaseAsset NuclearAuthenticationDisk = new DatabaseAsset("NuclearAuthenticationDisk", "ItemId"); - public static DatabaseAsset ToolboxBlue = new DatabaseAsset("ToolboxBlue", "ItemId"); - public static DatabaseAsset SecurityPDA = new DatabaseAsset("SecurityPDA", "ItemId"); - public static DatabaseAsset SecurityIDCard = new DatabaseAsset("SecurityIDCard", "ItemId"); - public static DatabaseAsset PDA = new DatabaseAsset("PDA", "ItemId"); - public static DatabaseAsset IDCard = new DatabaseAsset("IDCard", "ItemId"); - public static DatabaseAsset Mug = new DatabaseAsset("Mug", "ItemId"); - public static DatabaseAsset SodaCanCola = new DatabaseAsset("SodaCanCola", "ItemId"); - public static DatabaseAsset SodaCanCannedLaughter = new DatabaseAsset("SodaCanCannedLaughter", "ItemId"); - public static DatabaseAsset SodaCanCannedAir = new DatabaseAsset("SodaCanCannedAir", "ItemId"); - public static DatabaseAsset SodaCanTonic = new DatabaseAsset("SodaCanTonic", "ItemId"); - public static DatabaseAsset SodaCanBeepyLime = new DatabaseAsset("SodaCanBeepyLime", "ItemId"); - public static DatabaseAsset SodaCanBeepsSoda = new DatabaseAsset("SodaCanBeepsSoda", "ItemId"); - public static DatabaseAsset SodaCanDukePurpleTea = new DatabaseAsset("SodaCanDukePurpleTea", "ItemId"); - public static DatabaseAsset Poster = new DatabaseAsset("Poster", "ItemId"); - public static DatabaseAsset MedicalPatch = new DatabaseAsset("MedicalPatch", "ItemId"); - public static DatabaseAsset BrutePatch = new DatabaseAsset("BrutePatch", "ItemId"); - public static DatabaseAsset BurnPatch = new DatabaseAsset("BurnPatch", "ItemId"); - public static DatabaseAsset DonkPocket = new DatabaseAsset("DonkPocket", "ItemId"); - public static DatabaseAsset Boombox = new DatabaseAsset("Boombox", "ItemId"); - public static DatabaseAsset GreyFloorTile = new DatabaseAsset("GreyFloorTile", "ItemId"); - public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "ItemId"); - public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "ItemId"); - public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "ItemId"); - public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "ItemId"); - public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "ItemId"); - public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "ItemId"); - public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "ItemId"); - public static DatabaseAsset TruckerCap = new DatabaseAsset("TruckerCap", "ItemId"); - public static DatabaseAsset Sunglasses = new DatabaseAsset("Sunglasses", "ItemId"); - public static DatabaseAsset FacewearGasMask = new DatabaseAsset("FacewearGasMask", "ItemId"); - public static DatabaseAsset GlovesInsulatedLeft = new DatabaseAsset("GlovesInsulatedLeft", "ItemId"); - public static DatabaseAsset GlovesInsulatedRight = new DatabaseAsset("GlovesInsulatedRight", "ItemId"); - public static DatabaseAsset JumpsuitBotany = new DatabaseAsset("JumpsuitBotany", "ItemId"); - public static DatabaseAsset JumpsuitEngineer = new DatabaseAsset("JumpsuitEngineer", "ItemId"); - public static DatabaseAsset JumpsuitGrey = new DatabaseAsset("JumpsuitGrey", "ItemId"); - public static DatabaseAsset ShoesHiTopsLeft = new DatabaseAsset("ShoesHiTopsLeft", "ItemId"); - public static DatabaseAsset ShoesHiTopsRight = new DatabaseAsset("ShoesHiTopsRight", "ItemId"); - public static DatabaseAsset ShoesJackbootsLeft = new DatabaseAsset("ShoesJackbootsLeft", "ItemId"); - public static DatabaseAsset ShoesJackbootsRight = new DatabaseAsset("ShoesJackbootsRight", "ItemId"); - public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "ItemId"); - public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "ItemId"); - public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "ItemId"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta deleted file mode 100644 index 0d32e5e5f5..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3d9a644f1c796a4f8d3115591c8ccf7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs deleted file mode 100644 index 10bcee386c..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs +++ /dev/null @@ -1,14 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class Scenes - { - public static DatabaseAsset Boot = new DatabaseAsset("Boot", "Scenes"); - public static DatabaseAsset Game = new DatabaseAsset("Game", "Scenes"); - public static DatabaseAsset Launcher = new DatabaseAsset("Launcher", "Scenes"); - public static DatabaseAsset Intro = new DatabaseAsset("Intro", "Scenes"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta deleted file mode 100644 index e1c460dd65..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 57b09b6fe36a93248b9209dc96faf915 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs deleted file mode 100644 index b4b05d0884..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class SettingsId - { - public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); - public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta deleted file mode 100644 index dbd3134168..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2991593c72cd4194591137fdd11e150c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From 7875386ddfe6357956c220e5b362f4a915dccfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 27 Sep 2023 14:38:33 -0300 Subject: [PATCH 06/32] Fix remaining issues --- Assets/Content/Data/Clothing.meta | 8 -------- .../Clothing/ClothingAssetCollection.asset | 18 ------------------ .../ClothingAssetCollection.asset.meta | 8 -------- Assets/Content/Data/Clothing/Entries.meta | 8 -------- .../Data/Clothing/Entries/JumpsuitGrey.asset | 17 ----------------- .../Clothing/Entries/JumpsuitGrey.asset.meta | 8 -------- .../Data/Gamemode/Objectives/GetNukeCard.asset | 2 +- Assets/Content/Data/Items.asset | 2 +- .../SS3D/Core/ApplicationInitializerSystem.cs | 3 +++ .../Core/Events/ApplicationInitializedEvent.cs | 9 +++++++++ .../Events/ApplicationInitializedEvent.cs.meta | 3 +++ Assets/Scripts/SS3D/Core/LogManager.cs | 12 +++++------- .../AssetDatabases/AssetDatabaseSettings.cs | 2 ++ Assets/Scripts/SS3D/Data/Assets.cs | 2 +- .../Inventory/Containers/HumanInventory.cs | 17 ++++++++++------- 15 files changed, 35 insertions(+), 84 deletions(-) delete mode 100644 Assets/Content/Data/Clothing.meta delete mode 100644 Assets/Content/Data/Clothing/ClothingAssetCollection.asset delete mode 100644 Assets/Content/Data/Clothing/ClothingAssetCollection.asset.meta delete mode 100644 Assets/Content/Data/Clothing/Entries.meta delete mode 100644 Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset delete mode 100644 Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset.meta create mode 100644 Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs create mode 100644 Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs.meta diff --git a/Assets/Content/Data/Clothing.meta b/Assets/Content/Data/Clothing.meta deleted file mode 100644 index a911b24830..0000000000 --- a/Assets/Content/Data/Clothing.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ead31dcd0ac01334ab4a5bed028dbd1c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/Clothing/ClothingAssetCollection.asset b/Assets/Content/Data/Clothing/ClothingAssetCollection.asset deleted file mode 100644 index 2985eeb7a2..0000000000 --- a/Assets/Content/Data/Clothing/ClothingAssetCollection.asset +++ /dev/null @@ -1,18 +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: 9074a634cce44db5a2562dea40e86d64, type: 3} - m_Name: ClothingAssetCollection - m_EditorClassIdentifier: - _preload: 1 - _type: 0 - ClothingAssets: - - {fileID: 11400000, guid: d00eb4b713caaa643b222589c637cb69, type: 2} diff --git a/Assets/Content/Data/Clothing/ClothingAssetCollection.asset.meta b/Assets/Content/Data/Clothing/ClothingAssetCollection.asset.meta deleted file mode 100644 index 6ca3f83974..0000000000 --- a/Assets/Content/Data/Clothing/ClothingAssetCollection.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 81c9cd65798d36b48b8de3afc5dcd737 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/Clothing/Entries.meta b/Assets/Content/Data/Clothing/Entries.meta deleted file mode 100644 index 42f64f38d1..0000000000 --- a/Assets/Content/Data/Clothing/Entries.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 18c1c204eae96f742a7679cb1bcc8808 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset b/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset deleted file mode 100644 index ee09b2e0b7..0000000000 --- a/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset +++ /dev/null @@ -1,17 +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: fd53ec33b0054f3eaecd0ab11ff821e4, type: 3} - m_Name: JumpsuitGrey - m_EditorClassIdentifier: - _preload: 1 - _type: 0 - Clothing: {fileID: 2977753779717734204, guid: 90f0d82454244a24881f0772920c7ac0, type: 3} diff --git a/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset.meta b/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset.meta deleted file mode 100644 index 3c56f6fcc7..0000000000 --- a/Assets/Content/Data/Clothing/Entries/JumpsuitGrey.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d00eb4b713caaa643b222589c637cb69 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/Gamemode/Objectives/GetNukeCard.asset b/Assets/Content/Data/Gamemode/Objectives/GetNukeCard.asset index f42097a3a6..53f7b1acd3 100644 --- a/Assets/Content/Data/Gamemode/Objectives/GetNukeCard.asset +++ b/Assets/Content/Data/Gamemode/Objectives/GetNukeCard.asset @@ -17,4 +17,4 @@ MonoBehaviour: _alignmentRequirement: 1 _minAssignees: 1 _maxAssignees: 1 - _targetItemId: nukeCard + _targetItem: {fileID: 919132149155446097, guid: 7fc5df50928c6254ab6a553fe9207656, type: 3} diff --git a/Assets/Content/Data/Items.asset b/Assets/Content/Data/Items.asset index ec049bd858..dfffc546eb 100644 --- a/Assets/Content/Data/Items.asset +++ b/Assets/Content/Data/Items.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Items m_EditorClassIdentifier: - EnumName: ItemId + EnumName: Items AssetGroup: {fileID: 11400000, guid: 8e95016540bf27c4eb11580ec096568a, type: 2} Assets: - {fileID: 6891363543938182813, guid: 11f824c472e04854e95065dda095e8f4, type: 3} diff --git a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs index c21f7e49d7..91f70f465f 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs @@ -1,5 +1,6 @@ using Coimbra; using DG.Tweening; +using SS3D.Core.Events; using SS3D.Core.Settings; using SS3D.Core.Utils; using SS3D.Data; @@ -58,6 +59,8 @@ public void InitializeApplication() InitializeSettings(); InitializeNetworkSession(); + + new ApplicationInitializedEvent().Invoke(this); } /// diff --git a/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs b/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs new file mode 100644 index 0000000000..6448b5c716 --- /dev/null +++ b/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs @@ -0,0 +1,9 @@ +using Coimbra.Services.Events; + +namespace SS3D.Core.Events +{ + public partial struct ApplicationInitializedEvent : IEvent + { + + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs.meta b/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs.meta new file mode 100644 index 0000000000..8a9fabac2f --- /dev/null +++ b/Assets/Scripts/SS3D/Core/Events/ApplicationInitializedEvent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0c6fcb1c9134422883baeaee87813bdc +timeCreated: 1695834387 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index 29e5a09ef7..afcbc083b3 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -1,9 +1,11 @@ -using Serilog; +using Coimbra.Services.Events; +using Serilog; using Serilog.Sinks.Unity3D; using Serilog.Events; using Serilog.Formatting.Compact; using UnityEngine; using FishNet; +using SS3D.Core.Events; using System; using SS3D.Logging.LogSettings; using SS3D.Logging; @@ -32,12 +34,6 @@ static LogManager() { DefaultUnityLogTemplate = "{SourceContext} {Message}{NewLine}{Exception}"; LogFolderPath = Application.dataPath + "/../Logs/"; - - if (Application.isPlaying) - { - settings = SettingsId.LogSettings; - } - } public static void Initialize() @@ -45,6 +41,8 @@ public static void Initialize() if (IsInitialized) return; IsInitialized = true; + settings = SettingsId.LogSettings; + var configuration = new LoggerConfiguration(); if (Application.isPlaying) diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index 9a620d7ddb..c7b93185fd 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -24,6 +24,7 @@ public sealed class AssetDatabaseSettings : ScriptableSettings public static bool SkipCodeGeneration => GetOrFind()._skipCodeGeneration; #endif +#if UNITY_EDITOR /// /// Generates the script with the data from this database. /// @@ -38,5 +39,6 @@ public void GenerateCode() DatabaseAssetCreator.CreateAtPath(dataPath, typeof(DatabaseAsset), "AssetDatabases", IncludedAssetDatabases); } +#endif } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index eb43933ea5..0603772490 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -43,7 +43,7 @@ public static void LoadAssetDatabases() for (int index = 0; index < assetDatabases.Count; index++) { AssetDatabase database = assetDatabases[index]; - Databases.Add(database.name, database); + Databases.Add(database.EnumName, database); } Log.Information(typeof(Assets), "{assetDatabasesCount} Asset Databases initialized", Logs.Important, assetDatabases.Count); diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs index e94876eec8..19d1cca77d 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs @@ -164,13 +164,16 @@ private void SetupView() inventoryView.Setup(this); } - protected override void OnDisabled() - { - base.OnDisabled(); - if (!IsOwner) return; - var inventoryView = ViewLocator.Get().First(); - inventoryView.DestroyAllSlots(); - } + protected override void OnDisabled() + { + base.OnDisabled(); + + if (!IsOwner) return; + + InventoryView inventoryView = ViewLocator.Get().First(); + inventoryView.DestroyAllSlots(); + + } /// /// Add a given container to this inventory, and register to a few events related to the container. From 669b85aeee268ff39e643b544de52b38cf6a15d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Sun, 1 Oct 2023 01:38:38 -0300 Subject: [PATCH 07/32] Add missing settings to project settings, remove stuff from gitignore and fix errors --- .../SS3D/Core/ApplicationInitializerSystem.cs | 4 +- Assets/Scripts/SS3D/Core/LogManager.cs | 5 +- .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 4 +- .../SS3D/Data/Generated/AssetDatabases.cs | 15 ++++++ .../Data/Generated/AssetDatabases.cs.meta | 11 ++++ .../Scripts/SS3D/Data/Generated/Bodyparts.cs | 12 +++++ .../SS3D/Data/Generated/Bodyparts.cs.meta | 11 ++++ .../SS3D/Data/Generated/InteractionIcons.cs | 16 ++++++ .../Data/Generated/InteractionIcons.cs.meta | 11 ++++ Assets/Scripts/SS3D/Data/Generated/Items.cs | 54 +++++++++++++++++++ .../Scripts/SS3D/Data/Generated/Items.cs.meta | 11 ++++ Assets/Scripts/SS3D/Data/Generated/Scenes.cs | 14 +++++ .../SS3D/Data/Generated/Scenes.cs.meta | 11 ++++ .../Scripts/SS3D/Data/Generated/SettingsId.cs | 12 +++++ .../SS3D/Data/Generated/SettingsId.cs.meta | 11 ++++ 15 files changed, 196 insertions(+), 6 deletions(-) create mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Items.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta diff --git a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs index 91f70f465f..ba3e49ca61 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs @@ -6,6 +6,7 @@ using SS3D.Data; using SS3D.Data.Enums; using SS3D.Data.Generated; +using SS3D.Data.Management; using SS3D.Logging; using SS3D.SceneManagement; using UDiscord; @@ -51,8 +52,7 @@ public void InitializeApplication() Log.Information(this, "Initializing application", Logs.Important); DOTween.Init(); - - SaveSystem.Initialize(); + SaveSystem.Initialize(); InitializeDiscordIntegration(); InitializeAssetData(); diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index afcbc083b3..f733dc63b6 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -12,6 +12,7 @@ using SS3D.Data; using SS3D.Data.Enums; using SS3D.Data.Generated; +using Log = Serilog.Log; namespace SS3D.Core @@ -28,7 +29,7 @@ public static class LogManager private static readonly string LogFolderPath; private static bool IsInitialized; - private static readonly LogSettings Settings; + private static LogSettings Settings; static LogManager() { @@ -41,7 +42,7 @@ public static void Initialize() if (IsInitialized) return; IsInitialized = true; - settings = SettingsId.LogSettings; + Settings = SettingsId.LogSettings; var configuration = new LoggerConfiguration(); diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index 359c1e7210..4198d5f4c1 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -40,9 +40,9 @@ public static implicit operator Sprite(DatabaseAsset asset) return asset.Get(); } - public static implicit operator LogSetting(DatabaseAsset asset) + public static implicit operator LogSettings(DatabaseAsset asset) { - return asset.Get(); + return asset.Get(); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs new file mode 100644 index 0000000000..e0158b406f --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -0,0 +1,15 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Enums +{ + // This class is autogenerated. Do not modify manually. + public static class AssetDatabases + { + public static DatabaseAsset Bodyparts = new DatabaseAsset("Bodyparts", "AssetDatabases"); + public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); + public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); + public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); + public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta new file mode 100644 index 0000000000..597b5679b8 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bcd440ab388c334cada11588f379e2d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs new file mode 100644 index 0000000000..dfdddb6cac --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Bodyparts + { + public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "Bodyparts"); + public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "Bodyparts"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta new file mode 100644 index 0000000000..8c3e3447c4 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f868fcd3cf3ca04c999f52a026de965 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs new file mode 100644 index 0000000000..a937e0c016 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs @@ -0,0 +1,16 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class InteractionIcons + { + public static DatabaseAsset Power = new DatabaseAsset("Power", "InteractionIcons"); + public static DatabaseAsset Take = new DatabaseAsset("Take", "InteractionIcons"); + public static DatabaseAsset Open = new DatabaseAsset("Open", "InteractionIcons"); + public static DatabaseAsset Discard = new DatabaseAsset("Discard", "InteractionIcons"); + public static DatabaseAsset Honk = new DatabaseAsset("Honk", "InteractionIcons"); + public static DatabaseAsset Nuke = new DatabaseAsset("Nuke", "InteractionIcons"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta new file mode 100644 index 0000000000..830e88568a --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/InteractionIcons.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7668bd64f5ecb104b861fc5fea6bceb5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs new file mode 100644 index 0000000000..28b5019ca1 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs @@ -0,0 +1,54 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Items + { + public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "Items"); + public static DatabaseAsset NuclearAuthenticationDisk = new DatabaseAsset("NuclearAuthenticationDisk", "Items"); + public static DatabaseAsset ToolboxBlue = new DatabaseAsset("ToolboxBlue", "Items"); + public static DatabaseAsset SecurityPDA = new DatabaseAsset("SecurityPDA", "Items"); + public static DatabaseAsset SecurityIDCard = new DatabaseAsset("SecurityIDCard", "Items"); + public static DatabaseAsset PDA = new DatabaseAsset("PDA", "Items"); + public static DatabaseAsset IDCard = new DatabaseAsset("IDCard", "Items"); + public static DatabaseAsset Mug = new DatabaseAsset("Mug", "Items"); + public static DatabaseAsset SodaCanCola = new DatabaseAsset("SodaCanCola", "Items"); + public static DatabaseAsset SodaCanCannedLaughter = new DatabaseAsset("SodaCanCannedLaughter", "Items"); + public static DatabaseAsset SodaCanCannedAir = new DatabaseAsset("SodaCanCannedAir", "Items"); + public static DatabaseAsset SodaCanTonic = new DatabaseAsset("SodaCanTonic", "Items"); + public static DatabaseAsset SodaCanBeepyLime = new DatabaseAsset("SodaCanBeepyLime", "Items"); + public static DatabaseAsset SodaCanBeepsSoda = new DatabaseAsset("SodaCanBeepsSoda", "Items"); + public static DatabaseAsset SodaCanDukePurpleTea = new DatabaseAsset("SodaCanDukePurpleTea", "Items"); + public static DatabaseAsset Poster = new DatabaseAsset("Poster", "Items"); + public static DatabaseAsset MedicalPatch = new DatabaseAsset("MedicalPatch", "Items"); + public static DatabaseAsset BrutePatch = new DatabaseAsset("BrutePatch", "Items"); + public static DatabaseAsset BurnPatch = new DatabaseAsset("BurnPatch", "Items"); + public static DatabaseAsset DonkPocket = new DatabaseAsset("DonkPocket", "Items"); + public static DatabaseAsset Boombox = new DatabaseAsset("Boombox", "Items"); + public static DatabaseAsset GreyFloorTile = new DatabaseAsset("GreyFloorTile", "Items"); + public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "Items"); + public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "Items"); + public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "Items"); + public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "Items"); + public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "Items"); + public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "Items"); + public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "Items"); + public static DatabaseAsset TruckerCap = new DatabaseAsset("TruckerCap", "Items"); + public static DatabaseAsset Sunglasses = new DatabaseAsset("Sunglasses", "Items"); + public static DatabaseAsset FacewearGasMask = new DatabaseAsset("FacewearGasMask", "Items"); + public static DatabaseAsset GlovesInsulatedLeft = new DatabaseAsset("GlovesInsulatedLeft", "Items"); + public static DatabaseAsset GlovesInsulatedRight = new DatabaseAsset("GlovesInsulatedRight", "Items"); + public static DatabaseAsset JumpsuitBotany = new DatabaseAsset("JumpsuitBotany", "Items"); + public static DatabaseAsset JumpsuitEngineer = new DatabaseAsset("JumpsuitEngineer", "Items"); + public static DatabaseAsset JumpsuitGrey = new DatabaseAsset("JumpsuitGrey", "Items"); + public static DatabaseAsset ShoesHiTopsLeft = new DatabaseAsset("ShoesHiTopsLeft", "Items"); + public static DatabaseAsset ShoesHiTopsRight = new DatabaseAsset("ShoesHiTopsRight", "Items"); + public static DatabaseAsset ShoesJackbootsLeft = new DatabaseAsset("ShoesJackbootsLeft", "Items"); + public static DatabaseAsset ShoesJackbootsRight = new DatabaseAsset("ShoesJackbootsRight", "Items"); + public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "Items"); + public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "Items"); + public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "Items"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta new file mode 100644 index 0000000000..0d32e5e5f5 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3d9a644f1c796a4f8d3115591c8ccf7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs new file mode 100644 index 0000000000..10bcee386c --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs @@ -0,0 +1,14 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Scenes + { + public static DatabaseAsset Boot = new DatabaseAsset("Boot", "Scenes"); + public static DatabaseAsset Game = new DatabaseAsset("Game", "Scenes"); + public static DatabaseAsset Launcher = new DatabaseAsset("Launcher", "Scenes"); + public static DatabaseAsset Intro = new DatabaseAsset("Intro", "Scenes"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta new file mode 100644 index 0000000000..e1c460dd65 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Scenes.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 57b09b6fe36a93248b9209dc96faf915 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs new file mode 100644 index 0000000000..b4b05d0884 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class SettingsId + { + public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); + public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta new file mode 100644 index 0000000000..dbd3134168 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2991593c72cd4194591137fdd11e150c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 3991d3c3b752bc60e8a7d90de07370f37c2dc3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:50:55 -0300 Subject: [PATCH 08/32] Fix merge issues --- Assets/Content/Data/CraftingRecipes.asset | 11 +-- Assets/Content/Data/Settings.asset | 23 ------- Assets/Content/Data/Settings.asset.meta | 8 --- .../{UIElements.asset => WorldSpaceUI.asset} | 10 +-- ...nts.asset.meta => WorldSpaceUI.asset.meta} | 0 Assets/Scripts/SS3D/Core/LogManager.cs | 5 +- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 25 ++++--- .../AssetDatabases/AssetDatabaseSettings.cs | 3 + .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 27 ++++++-- Assets/Scripts/SS3D/Data/Assets.cs | 15 ++-- .../SS3D/Data/Enums/CraftingRecipeIds.cs | 9 --- .../Scripts/SS3D/Data/Enums/UIElementIds.cs | 8 --- .../SS3D/Data/Generated/AssetDatabases.cs | 3 +- .../SS3D/Data/Generated/CraftingRecipes.cs | 12 ++++ .../CraftingRecipes.cs.meta} | 2 +- .../Data/{Enums => Generated}/MaterialsIds.cs | 0 .../ParticlesEffectsIds.cs | 0 .../ParticlesEffectsIds.cs.meta | 0 .../Scripts/SS3D/Data/Generated/SettingsId.cs | 12 ---- .../SS3D/Data/Generated/SettingsId.cs.meta | 11 --- .../Data/{Enums => Generated}/SoundsIds.cs | 0 .../{Enums => Generated}/SoundsIds.cs.meta | 0 .../SS3D/Data/Generated/WorldSpaceUI.cs | 11 +++ .../WorldSpaceUI.cs.meta} | 2 +- .../Interactions/ClientDelayedInteraction.cs | 7 +- .../Systems/Crafting/CraftingInteraction.cs | 2 +- .../SS3D/Systems/Crafting/CraftingRecipe.cs | 39 +++++------ .../SS3D/Systems/Crafting/CraftingSystem.cs | 54 +++++++++------ .../SS3D/Systems/Crafting/SliceInteraction.cs | 3 +- .../Gamemodes/Objectives/GetItemObjective.cs | 2 +- .../Commands/ItemCommands/SpawnItemCommand.cs | 55 ++++++++++----- .../SS3D/Systems/Inventory/Items/Item.cs | 10 +-- .../Systems/Inventory/Items/ItemSystem.cs | 5 +- .../Framework/Helpers/TestHelpers.cs | 68 +++++++++++++------ .../Template Tests/PlaymodeTestRepository.cs | 3 +- Assets/Settings/AssetDatabaseSettings.asset | 4 +- 36 files changed, 241 insertions(+), 208 deletions(-) delete mode 100644 Assets/Content/Data/Settings.asset delete mode 100644 Assets/Content/Data/Settings.asset.meta rename Assets/Content/Data/{UIElements.asset => WorldSpaceUI.asset} (71%) rename Assets/Content/Data/{UIElements.asset.meta => WorldSpaceUI.asset.meta} (100%) delete mode 100644 Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs delete mode 100644 Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs rename Assets/Scripts/SS3D/Data/{Enums/CraftingRecipeIds.cs.meta => Generated/CraftingRecipes.cs.meta} (83%) rename Assets/Scripts/SS3D/Data/{Enums => Generated}/MaterialsIds.cs (100%) rename Assets/Scripts/SS3D/Data/{Enums => Generated}/ParticlesEffectsIds.cs (100%) rename Assets/Scripts/SS3D/Data/{Enums => Generated}/ParticlesEffectsIds.cs.meta (100%) delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta rename Assets/Scripts/SS3D/Data/{Enums => Generated}/SoundsIds.cs (100%) rename Assets/Scripts/SS3D/Data/{Enums => Generated}/SoundsIds.cs.meta (100%) create mode 100644 Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs rename Assets/Scripts/SS3D/Data/{Enums/UIElementIds.cs.meta => Generated/WorldSpaceUI.cs.meta} (83%) diff --git a/Assets/Content/Data/CraftingRecipes.asset b/Assets/Content/Data/CraftingRecipes.asset index bf22c6f15c..edec45cd76 100644 --- a/Assets/Content/Data/CraftingRecipes.asset +++ b/Assets/Content/Data/CraftingRecipes.asset @@ -12,9 +12,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: CraftingRecipes m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: CraftingRecipeIds + EnumName: CraftingRecipes AssetGroup: {fileID: 11400000, guid: ead2cce9e35a7304ab5b8cc67d03347b, type: 2} Assets: - - {fileID: 11400000, guid: 5dafa9029944cdc448a9e1d6d67e438f, type: 2} - - {fileID: 11400000, guid: 5069902a314070f4ca869692cbc791fa, type: 2} + _list: + - _key: SlicedBananas + _value: {fileID: 11400000, guid: 5dafa9029944cdc448a9e1d6d67e438f, type: 2} + - _key: WeirdComplexRecipe + _value: {fileID: 11400000, guid: 5069902a314070f4ca869692cbc791fa, type: 2} + _new: diff --git a/Assets/Content/Data/Settings.asset b/Assets/Content/Data/Settings.asset deleted file mode 100644 index 081414448a..0000000000 --- a/Assets/Content/Data/Settings.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: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} - m_Name: Settings - m_EditorClassIdentifier: - EnumName: SettingsId - AssetGroup: {fileID: 11400000, guid: 9bfbc9d4c2c1bb944942108648547da2, type: 2} - Assets: - _list: - - _key: ApplicationSettings - _value: {fileID: 11400000, guid: 443046479504c5640b8f5902a102c09f, type: 2} - - _key: LogSettings - _value: {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} - _new: diff --git a/Assets/Content/Data/Settings.asset.meta b/Assets/Content/Data/Settings.asset.meta deleted file mode 100644 index 55505c9218..0000000000 --- a/Assets/Content/Data/Settings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 99157bc96fcf5694e856e4d5092c39df -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/UIElements.asset b/Assets/Content/Data/WorldSpaceUI.asset similarity index 71% rename from Assets/Content/Data/UIElements.asset rename to Assets/Content/Data/WorldSpaceUI.asset index 6d970977df..55a931abd3 100644 --- a/Assets/Content/Data/UIElements.asset +++ b/Assets/Content/Data/WorldSpaceUI.asset @@ -10,10 +10,12 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} - m_Name: UIElements + m_Name: WorldSpaceUI m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: UIElementIds + EnumName: WorldSpaceUI AssetGroup: {fileID: 11400000, guid: dd394b793b56e43418a2c11a61130663, type: 2} Assets: - - {fileID: 1998198171871307260, guid: 03bcc1824d3b20748b912ca532f86bb9, type: 3} + _list: + - _key: LoadingBar + _value: {fileID: 1998198171871307260, guid: 03bcc1824d3b20748b912ca532f86bb9, type: 3} + _new: diff --git a/Assets/Content/Data/UIElements.asset.meta b/Assets/Content/Data/WorldSpaceUI.asset.meta similarity index 100% rename from Assets/Content/Data/UIElements.asset.meta rename to Assets/Content/Data/WorldSpaceUI.asset.meta diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index f733dc63b6..25c9904e35 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -1,4 +1,5 @@ -using Coimbra.Services.Events; +using Coimbra; +using Coimbra.Services.Events; using Serilog; using Serilog.Sinks.Unity3D; using Serilog.Events; @@ -42,7 +43,7 @@ public static void Initialize() if (IsInitialized) return; IsInitialized = true; - Settings = SettingsId.LogSettings; + Settings = ScriptableSettings.GetOrFind(); var configuration = new LoggerConfiguration(); diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index 2582b70058..a78c407eaa 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -2,7 +2,6 @@ using JetBrains.Annotations; using System.Collections.Generic; using Object = UnityEngine.Object; -using SS3D.Attributes; using SS3D.CodeGeneration; using UnityEditor; using UnityEngine; @@ -44,7 +43,6 @@ public class AssetDatabase : ScriptableObject /// /// All loaded assets that will be included in the built game. /// - //[ReadOnly] #endif public SerializableDictionary Assets; @@ -74,22 +72,22 @@ public void LoadAssetsFromAssetGroup() /// The type of asset to get. /// [CanBeNull] - public T Get(string id) where T : Object + public T Get([NotNull] string id) + where T : Object { Assets.TryGetValue(id, out Object asset); return asset as T; } - public bool TryGet(int index, out T asset) where T : Object + public bool TryGet([NotNull] string index, [CanBeNull] out T asset) + where T : Object { - if(index >= 0 && index < Assets.Count) - { - asset = Assets[index] as T; - return true; - } - asset = null; - return false; + bool hasValue = Assets.TryGetValue(index, out Object foundValue); + + asset = foundValue as T; + + return hasValue; } /// @@ -97,7 +95,8 @@ public bool TryGet(int index, out T asset) where T : Object /// /// /// - public void Add(Object asset) where TAsset : Object + public void Add(Object asset) + where TAsset : Object { Assets.Add(asset.name, asset as TAsset); } @@ -135,7 +134,7 @@ public void GenerateDatabaseCode() } DatabaseAssetCreator.CreateAtPath(EnumPath, typeof(DatabaseAsset), EnumName, Assets.Values, EnumNamespaceName); - } + } #endif } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index c7b93185fd..5f24f11e36 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -21,6 +21,9 @@ public sealed class AssetDatabaseSettings : ScriptableSettings [SerializeField] private bool _skipCodeGeneration; + /// + /// If ticked the asset data system won't try to generate the generated asset data code. + /// public static bool SkipCodeGeneration => GetOrFind()._skipCodeGeneration; #endif diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index 4198d5f4c1..74e5f7214a 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -3,15 +3,30 @@ namespace SS3D.Data.AssetDatabases { + /// + /// Represents an asset data asset, contains the name of the asset and the related database. + /// public class DatabaseAsset { + /// + /// The name of the asset. + /// public readonly string Name; + /// + /// The database this asset belongs to. + /// public readonly string DatabaseName; + /// + /// Returns the prefab of this asset as a GameObject. + /// public GameObject Prefab => Get(); - - public GameObject New => GameObject.Instantiate(Prefab); + + /// + /// Instantiates a new GameObject of this asset's prefab + /// + public GameObject New() => GameObject.Instantiate(Prefab); public DatabaseAsset(string name, string databaseName) { @@ -19,6 +34,11 @@ public DatabaseAsset(string name, string databaseName) DatabaseName = databaseName; } + /// + /// Gets this asset as T. + /// + /// The type to cast the asset to. + /// The casted asset. public T Get() where T : Object { @@ -28,7 +48,7 @@ public T Get() public static implicit operator string(DatabaseAsset asset) { return asset.Name; - } + } public static implicit operator GameObject(DatabaseAsset asset) { @@ -43,7 +63,6 @@ public static implicit operator Sprite(DatabaseAsset asset) public static implicit operator LogSettings(DatabaseAsset asset) { return asset.Get(); - } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index 0603772490..c7d5ebf2eb 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Coimbra; +using JetBrains.Annotations; using SS3D.Data.AssetDatabases; using SS3D.Data.Enums; using UnityEngine; @@ -23,14 +24,20 @@ public static class Assets /// /// Generic getter, supports all databases and all asset database enums. /// - /// - /// - /// - /// + [CanBeNull] public static TAsset Get(string databaseId, string assetId) where TAsset : Object { return GetDatabase(databaseId).Get(assetId); } + + /// + /// Generic getter, supports all databases and all asset database enums. + /// + public static bool TryGet(string databaseId, string assetId, [CanBeNull] out TAsset asset) where TAsset : Object + { + return GetDatabase(databaseId).TryGet(assetId, out asset); + } + /// /// Loads the databases in the project from the AssetDatabaseSettings, saves it in a Dictionary for easy & performant access. /// diff --git a/Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs b/Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs deleted file mode 100644 index 304771712c..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SS3D.Data.Enums -{ - public enum CraftingRecipeIds - { - SlicedBananas = 0, - WeirdComplexRecipe = 1, - } -} - diff --git a/Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs b/Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs deleted file mode 100644 index 9a75575b67..0000000000 --- a/Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace SS3D.Data.Enums -{ - public enum UIElementIds - { - LoadingBar = 0, - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs index e0158b406f..8372f374e0 100644 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -6,10 +6,11 @@ namespace SS3D.Data.Enums public static class AssetDatabases { public static DatabaseAsset Bodyparts = new DatabaseAsset("Bodyparts", "AssetDatabases"); + public static DatabaseAsset CraftingRecipes = new DatabaseAsset("CraftingRecipes", "AssetDatabases"); public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); - public static DatabaseAsset Settings = new DatabaseAsset("Settings", "AssetDatabases"); + public static DatabaseAsset WorldSpaceUI = new DatabaseAsset("WorldSpaceUI", "AssetDatabases"); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs b/Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs new file mode 100644 index 0000000000..7bd7e94972 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class CraftingRecipes + { + public static DatabaseAsset SlicedBananas = new DatabaseAsset("SlicedBananas", "CraftingRecipes"); + public static DatabaseAsset WeirdComplexRecipe = new DatabaseAsset("WeirdComplexRecipe", "CraftingRecipes"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs.meta similarity index 83% rename from Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs.meta rename to Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs.meta index bcc5f9b098..cd11b3ff8a 100644 --- a/Assets/Scripts/SS3D/Data/Enums/CraftingRecipeIds.cs.meta +++ b/Assets/Scripts/SS3D/Data/Generated/CraftingRecipes.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6c2c32768923adc4b8fbc9ed77f41eb4 +guid: 311ba3aba2da1c54d8a7532473a27e4e MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs b/Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs similarity index 100% rename from Assets/Scripts/SS3D/Data/Enums/MaterialsIds.cs rename to Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs diff --git a/Assets/Scripts/SS3D/Data/Enums/ParticlesEffectsIds.cs b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs similarity index 100% rename from Assets/Scripts/SS3D/Data/Enums/ParticlesEffectsIds.cs rename to Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs diff --git a/Assets/Scripts/SS3D/Data/Enums/ParticlesEffectsIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/Data/Enums/ParticlesEffectsIds.cs.meta rename to Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs.meta diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs deleted file mode 100644 index b4b05d0884..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class SettingsId - { - public static DatabaseAsset ApplicationSettings = new DatabaseAsset("ApplicationSettings", "SettingsId"); - public static DatabaseAsset LogSettings = new DatabaseAsset("LogSettings", "SettingsId"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta deleted file mode 100644 index dbd3134168..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SettingsId.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2991593c72cd4194591137fdd11e150c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Enums/SoundsIds.cs b/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs similarity index 100% rename from Assets/Scripts/SS3D/Data/Enums/SoundsIds.cs rename to Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs diff --git a/Assets/Scripts/SS3D/Data/Enums/SoundsIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta similarity index 100% rename from Assets/Scripts/SS3D/Data/Enums/SoundsIds.cs.meta rename to Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta diff --git a/Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs b/Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs new file mode 100644 index 0000000000..2aab27c614 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs @@ -0,0 +1,11 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class WorldSpaceUI + { + public static DatabaseAsset LoadingBar = new DatabaseAsset("LoadingBar", "WorldSpaceUI"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs.meta similarity index 83% rename from Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs.meta rename to Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs.meta index e30f5cc57d..9a738bacb6 100644 --- a/Assets/Scripts/SS3D/Data/Enums/UIElementIds.cs.meta +++ b/Assets/Scripts/SS3D/Data/Generated/WorldSpaceUI.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9c9795bbbdc3e734791b9549b93e5b5e +guid: 3fbd692f751947548a0adce994eafbed MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs index 4a6782b2c7..0a4dd53628 100644 --- a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs +++ b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs @@ -3,6 +3,7 @@ using SS3D.Interactions.Interfaces; using UnityEngine; using SS3D.Data; +using SS3D.Data.Generated; namespace SS3D.Interactions { @@ -30,9 +31,9 @@ public bool ClientStart(InteractionEvent interactionEvent) return true; } - GameObject loadingBarPrefab = Assets.Get(Data.Enums.AssetDatabases.UIElements, (int)Data.Enums.UIElementIds.LoadingBar); - - _loadingBarInstance = Object.Instantiate(loadingBarPrefab, source.GameObject.transform); + _loadingBarInstance = WorldSpaceUI.LoadingBar.New(); + + _loadingBarInstance.transform.SetParent(source.GameObject.transform); _loadingBarInstance.GetComponent().Duration = Delay; return true; } diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs index a245e07c9a..596eb955ca 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs @@ -44,7 +44,7 @@ public bool CanCraft(InteractionEvent interactionEvent) List closeItemsFromTarget = craftingSystem.GetCloseItemsFromTarget(target); - Dictionary potentialRecipeElements = craftingSystem. + Dictionary potentialRecipeElements = craftingSystem. ItemListToDictionnaryOfRecipeElements(closeItemsFromTarget); if (!craftingSystem.CheckEnoughCloseItemsForRecipe(potentialRecipeElements, recipe)) return false; diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs index 73d29f71ae..047d72f482 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs @@ -14,8 +14,7 @@ namespace SS3D.Systems.Crafting [CreateAssetMenu(fileName = "Recipe", menuName = "SS3D/Crafting/Recipe")] public class CraftingRecipe : ScriptableObject, ISerializationCallbackReceiver { - - private Dictionary _elements = new(); + private Dictionary _elements = new(); [SerializeField] private float _executionTime; @@ -24,16 +23,15 @@ public class CraftingRecipe : ScriptableObject, ISerializationCallbackReceiver private string _interactionName; [SerializeField] - private ItemId _target; + private Item _target; [SerializeField] - private List _result; - + private List _result; /// /// The items and their respective numbers necessary for the recipe. /// - public Dictionary Elements => _elements; + public Dictionary Elements => _elements; /// /// Time it takes in second for the crafting to finish. @@ -48,12 +46,12 @@ public class CraftingRecipe : ScriptableObject, ISerializationCallbackReceiver /// /// The target of the recipe, which is the item on which the player must click to get the crafting interactions. /// - public ItemId Target => _target; + public Item Target => _target; /// /// The result of the crafting. /// - public List Result => _result; + public List Result => _result; public int ElementsNumber => _elements.Sum(x => x.Value); @@ -70,17 +68,10 @@ public void OnAfterDeserialize() { #if UNITY_EDITOR // just transfer things from the list to the dictionnary. - - int enumCount = Enum.GetNames(typeof(ItemId)).Length; - _elements = new Dictionary(); + _elements = new(); foreach (RecipeElement item in _recipeElements) { - int i = 0; - - while (!_elements.TryAdd((ItemId) (((int)item.ItemId + i) % enumCount), item.Count)) - { - i++; - } + _elements.TryAdd(item.ItemId, item.Count); } _recipeElements = null; #endif @@ -90,9 +81,13 @@ public void OnBeforeSerialize() { #if UNITY_EDITOR // just transfer things from the dictionnary to the list. - if (_elements == null) return; + if (_elements == null) + { + return; + } + _recipeElements = new List(); - foreach (ItemId id in _elements.Keys) + foreach (Item id in _elements.Keys) { _recipeElements.Add(new RecipeElement(id, _elements[id])); } @@ -116,13 +111,13 @@ private struct RecipeElement /// Id of the item. /// [SerializeField] - private ItemId _itemId; + private Item _itemId; public int Count => _count; - public ItemId ItemId => _itemId; + public Item ItemId => _itemId; - public RecipeElement(ItemId id, int count) + public RecipeElement(Item id, int count) { _count = count; _itemId = id; diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs index 1ca9b87eef..b983fd4c61 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs @@ -25,7 +25,7 @@ public class CraftingSystem : NetworkSystem /// The string is the name of the interaction. /// The value is a list of craftingRecipe, sorted by their target and needed interactions. /// - private Dictionary> _recipeOrganiser = new(); + private Dictionary> _recipeOrganiser = new(); public override void OnStartNetwork() { @@ -43,7 +43,8 @@ public override void OnStartNetwork() private void FillRecipeOrganiser() { AssetDatabase recipesDataBase = Assets.GetDatabase(AssetDatabases.CraftingRecipes); - foreach(Object asset in recipesDataBase.Assets) + + foreach(Object asset in recipesDataBase.Assets.Values) { if(asset is not CraftingRecipe) { @@ -51,7 +52,7 @@ private void FillRecipeOrganiser() continue; } CraftingRecipe recipe = (CraftingRecipe) asset; - + _recipeOrganiser.TryAdd(recipe.Target, new Dictionary()); _recipeOrganiser[recipe.Target][recipe.InteractionName] = recipe; } @@ -59,19 +60,22 @@ private void FillRecipeOrganiser() public bool TryGetRecipe(Interaction craftingInteraction, Item target, out CraftingRecipe recipe) { - if(!_recipeOrganiser.TryGetValue(target.ItemId, out Dictionary dic)) + if (!_recipeOrganiser.TryGetValue(target, out Dictionary dic)) { recipe = null; + return false; } if (!dic.TryGetValue(craftingInteraction.GetGenericName(), out CraftingRecipe recipeSearched)) { recipe = null; + return false; } recipe = recipeSearched; + return true; } @@ -84,37 +88,42 @@ public bool TryGetRecipe(Interaction craftingInteraction, Item target, out Craft /// /// [Server] - public void Craft(Item target, List itemToConsume, List result) + public void Craft(Item target, List itemToConsume, List result) { target.Despawn(); + foreach (Item item in itemToConsume) { item.Despawn(); } - foreach(ItemId id in result) + + foreach (Item id in result) { - GameObject itemResult = Assets.Get(AssetDatabases.Items, (int)id); + GameObject itemResult = Assets.Get(AssetDatabases.Items, id.Name); GameObject product = Instantiate(itemResult, target.Position, target.Rotation); InstanceFinder.ServerManager.Spawn(product); - } + } } /// /// Build the list of items we want to consume. Don't add more to /// the list than necessary. /// - public List BuildListOfItemToConsume(List closeItemsFromTarget, - CraftingRecipe recipe) + public List BuildListOfItemToConsume(List closeItemsFromTarget, CraftingRecipe recipe) { - List ItemsToConsume = new List(); + List ItemsToConsume = new List(); - Dictionary recipeElements = new Dictionary(recipe.Elements); + Dictionary recipeElements = new Dictionary(recipe.Elements); foreach (Item item in closeItemsFromTarget) { - if (recipeElements.GetValueOrDefault(item.ItemId) <= 0) continue; + if (recipeElements.GetValueOrDefault(item) <= 0) + { + continue; + } + ItemsToConsume.Add(item); - recipeElements[item.ItemId] -= 1; + recipeElements[item] -= 1; } return ItemsToConsume; @@ -137,7 +146,10 @@ public List GetCloseItemsFromTarget(Item target) foreach (Collider hitCollider in hitColliders) { Item item = hitCollider.GetComponentInParent(); - if (item == null) continue; + + if (item == null) + continue; + closeItemsFromTarget.Add(item); } @@ -150,13 +162,13 @@ public List GetCloseItemsFromTarget(Item target) /// Items that can potentially be used /// The recipe for which we want to check items /// - public bool CheckEnoughCloseItemsForRecipe(Dictionary potentialRecipeElements, - CraftingRecipe recipe) + public bool CheckEnoughCloseItemsForRecipe(Dictionary potentialRecipeElements, CraftingRecipe recipe) { // check if there's enough of each item. - foreach (ItemId item in recipe.Elements.Keys.ToList()) + foreach (Item item in recipe.Elements.Keys.ToList()) { int potentialRecipeItemCount = potentialRecipeElements.GetValueOrDefault(item); + if (potentialRecipeItemCount < recipe.Elements[item]) { return false; @@ -166,14 +178,12 @@ public bool CheckEnoughCloseItemsForRecipe(Dictionary potentialReci return true; } - public Dictionary ItemListToDictionnaryOfRecipeElements(List closeItemsFromTarget) + public Dictionary ItemListToDictionnaryOfRecipeElements(List closeItemsFromTarget) { // Transform the list into a dictionnary of itemsID and counts of items. // This is some overhead to allow for fast comparison between recipe and // available items. - Dictionary potentialRecipeElements = closeItemsFromTarget - .GroupBy(item => item.ItemId) - .ToDictionary(group => group.Key, group => group.Count()); + Dictionary potentialRecipeElements = closeItemsFromTarget.GroupBy(item => item).ToDictionary(group => group.Key, group => group.Count()); return potentialRecipeElements; } diff --git a/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs b/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs index 570f4912f4..9cc9f6f01f 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs @@ -3,6 +3,7 @@ using SS3D.Core; using SS3D.Data; using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Logging; @@ -48,7 +49,7 @@ public override bool CanInteract(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { - return Icon != null ? Icon : Assets.Get(InteractionIcons.Take); + return Icon != null ? Icon : InteractionIcons.Take; } public override string GetGenericName() diff --git a/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs b/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs index 4464e248d4..a3678c83c6 100644 --- a/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs +++ b/Assets/Scripts/SS3D/Systems/Gamemodes/Objectives/GetItemObjective.cs @@ -46,7 +46,7 @@ public override void FinalizeObjective() private void HandleItemPickedUpEvent(ref EventContext context, in ItemPickedUpEvent e) { - GameObject itemIdId = e.Item.ItemId; + GameObject itemIdId = e.Item.GameObject; string playerCkey = e.Player; if (itemIdId == _targetItem && playerCkey.Equals(AssigneeCkey)) diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs index 4f99289bc9..990dd40681 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs @@ -12,36 +12,57 @@ namespace SS3D.Systems.IngameConsoleSystem.Commands.ItemCommands { public class SpawnItemCommand : Command { - public override string LongDescription => "Spawn item using item name at the same position as human"; - public override string Usage => "(item name)"; + public override string LongDescription => "Spawn item using item name at the same position as human or at position x,z"; public override string ShortDescription => "Spawn item"; public override ServerRoleTypes AccessLevel => ServerRoleTypes.User; + public override CommandType Type => CommandType.Server; - - private record CalculatedValues(string ItemName) : ICalculatedValues; public override string Perform(string[] args, NetworkConnection conn) { - if (!ReceiveCheckResponse(args, out CheckArgsResponse response, out CalculatedValues values)) return response.InvalidArgs; - - if(!Subsystems.Get().TryGetOwnedEntity(conn, out Entity entity)) + CheckArgsResponse checkArgsResponse = CheckArgs(args); + + if (checkArgsResponse.IsValid == false) + return checkArgsResponse.InvalidArgs; + + string itemName = args[0]; + + if (!Subsystems.Get().TryGetOwnedEntity(conn, out Entity entity)) + { return "Connection does not own any entity registered in entity system."; - + } + ItemSystem itemSystem = Subsystems.Get(); - itemSystem.CmdSpawnItem(values.ItemName.ToEnum(), entity.transform.position, Quaternion.identity); - return $"item {values.ItemName} spawned at position {entity.transform.position}"; + itemSystem.CmdSpawnItem(itemName, entity.transform.position, Quaternion.identity); + + return $"item {itemName} spawned at position {entity.transform.position}"; } protected override CheckArgsResponse CheckArgs(string[] args) { - CheckArgsResponse response = new(); - if (args.Length != 1 && args.Length != 3) return response.MakeInvalid("Invalid number of arguments"); - + CheckArgsResponse response = new CheckArgsResponse(); + + if (args.Length != 1 && args.Length != 3) + { + response.IsValid = false; + response.InvalidArgs = "Invalid number of arguments"; + + return response; + } + string itemName = args[0]; - if(!Assets.TryGet((int) AssetDatabases.Items, (int) itemName.ToEnum(), out Item _)) - return response.MakeInvalid( $"item with name {itemName} not found"); - - return response.MakeValid(new CalculatedValues(itemName)); + + if (!Assets.TryGet(AssetDatabases.Items, itemName, out Item item)) + { + response.IsValid = false; + response.InvalidArgs = $"item with name {itemName} not found"; + + return response; + } + + response.IsValid = true; + + return response; } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs index fdde59e911..48fa0c01fd 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs @@ -68,7 +68,7 @@ public class Item : InteractionSource, IInteractionTarget private AttachedContainer _container; public string Name => _name; - public GameObject ItemId { get; set; } + public string ItemId { get; set; } public ReadOnlyCollection Traits => ((List) _traits.Collection).AsReadOnly(); public AttachedContainer Container => _container; @@ -117,13 +117,7 @@ protected override void OnStart() string itemName = gameObject.name.Split('(')[0]; - if(!Enum.TryParse(itemName, out ItemId id)) - { - Log.Error(this, $"id with name {itemName} not present in ItemId enums"); - return; - } - - ItemId = id; + ItemId = itemName; } public override void OnStartServer() diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs index 8a46cf32f6..695d3dc752 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs @@ -56,12 +56,11 @@ public Item SpawnItem(string id, Vector3 position, Quaternion rotation) /// The desired position to spawn. /// The desired rotation to apply. [ServerRpc(RequireOwnership = false)] - public void CmdSpawnItemInContainer(ItemId id, AttachedContainer attachedContainer) + public void CmdSpawnItemInContainer(Item id, AttachedContainer attachedContainer) { - SpawnItemInContainer(id, attachedContainer); + SpawnItemInContainer(id.Name, attachedContainer); } - /// /// Spawns an Item inside a container. /// diff --git a/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs b/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs index 241cca13b6..c514f6eaa3 100644 --- a/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs +++ b/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs @@ -1,15 +1,15 @@ using FishNet; -using FishNet.Connection; -using FishNet.Managing.Client; using NUnit.Framework; using SS3D.Core; +using SS3D.Data; +using SS3D.Data.Enums; using SS3D.Systems.Entities; using SS3D.Systems.Interactions; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; using SS3D.UI.Buttons; using System.Collections; -using UnityEditor; +using System.Linq; using UnityEngine; using UnityEngine.InputSystem.Controls; using UnityEngine.UI; @@ -41,6 +41,7 @@ public static class TestHelpers public static bool ApproximatelyEqual(float a, float b) { bool result = ((a - b) * (a - b)) < 0.001f; + return result; } @@ -58,27 +59,39 @@ public static IEnumerator StartAndEnterRound(float delay = 0f) /// IEnumerator for yielding in UnityTest. public static IEnumerator StartRound(float delay = 0.5f) { - SetTabActive(ServerSettingsTabName); yield return new WaitForSeconds(delay); - PressButton(StartRoundButtonName); yield return new WaitForSeconds(delay); + SetTabActive(ServerSettingsTabName); + + yield return new WaitForSeconds(delay); + PressButton(StartRoundButtonName); + + yield return new WaitForSeconds(delay); } public static IEnumerator LateJoinRound() { // Fire up the game - SetTabActive(ServerSettingsTabName); yield return new WaitForSeconds(1f); - PressButton(StartRoundButtonName); yield return new WaitForSeconds(1f); + SetTabActive(ServerSettingsTabName); + + yield return new WaitForSeconds(1f); + PressButton(StartRoundButtonName); + + yield return new WaitForSeconds(1f); // Give a few moments pause before we try and late join yield return new WaitForSeconds(5f); // Now we join. - PressButton(EmbarkButtonName); yield return new WaitForSeconds(3f); + PressButton(EmbarkButtonName); + + yield return new WaitForSeconds(3f); } public static IEnumerator Embark() { - PressButton(EmbarkButtonName); yield return new WaitForSeconds(3f); + PressButton(EmbarkButtonName); + + yield return new WaitForSeconds(3f); } public static IEnumerator ContinueFreePlayUntilControlAltBackspacePressed() @@ -108,11 +121,16 @@ public static IEnumerator FinishAndExitRound() //TODO: ScriptedInput input = UserInput.GetInputService() as ScriptedInput; //input.HandleButton(CancelButton, true); yield return null; + //input.HandleButton(CancelButton, false); // Change to the server settings tab, and cancel the round - SetTabActive(ServerSettingsTabName); yield return new WaitForSeconds(1f); - PressButton(StartRoundButtonName); yield return new WaitForSeconds(1f); + SetTabActive(ServerSettingsTabName); + + yield return new WaitForSeconds(1f); + PressButton(StartRoundButtonName); + + yield return new WaitForSeconds(1f); // Give a moment's pause before test formally concludes. (It takes a while for the round to reset). yield return new WaitForSeconds(4f); @@ -127,18 +145,22 @@ public static IEnumerator PressButtonWhenAvailable(string buttonName, float time { LabelButton button = GetButton(buttonName); float startTime = Time.time; + while (button == null) { Assert.IsTrue(Time.time < startTime + timeout, $"Timeout of {timeout} reached when trying to press {buttonName} button"); + yield return new WaitForSeconds(1f); button = GetButton(buttonName); } + button.Press(); } public static LabelButton GetButton(string buttonName) { LabelButton button = GameObject.Find(buttonName)?.GetComponent(); + return button; } @@ -161,29 +183,32 @@ public static IEnumerator MoveInDirection(PlayModeTest fixture, float xInput = 0 fixture.Set((AxisControl)fixture.InputDevice["Movement/y"], 0); } - public static AttachedContainer LocalPlayerSpawnItemInFirstHandAvailable(Data.Enums.ItemId item) + public static AttachedContainer LocalPlayerSpawnItemInFirstHandAvailable(string item) { ItemSystem itemSystem = Subsystems.Get(); EntitySystem entitySystem = Subsystems.Get(); - entitySystem.TryGetOwnedEntity( InstanceFinder.ClientManager.Connection ,out Entity entity); + entitySystem.TryGetOwnedEntity(InstanceFinder.ClientManager.Connection, out Entity entity); HumanInventory inventory = entity.gameObject.GetComponent(); - foreach(Hand hand in inventory.Hands.PlayerHands) + + foreach (Hand hand in inventory.Hands.PlayerHands.Where(hand => hand.Container.Empty)) { - if (!hand.Container.Empty) continue; - else - { - itemSystem.CmdSpawnItemInContainer(item, hand.Container); - return hand.Container; - } + Item itemToSpawn = Assets.Get(AssetDatabases.Items, item).GetComponent(); + + itemSystem.CmdSpawnItemInContainer(itemToSpawn, hand.Container); + + return hand.Container; } + Debug.Log("No free hands."); + return null; } public static InteractionController GetLocalInteractionController() { EntitySystem entitySystem = Subsystems.Get(); - entitySystem.TryGetOwnedEntity(InstanceFinder.ClientManager.Connection ,out Entity entity); + entitySystem.TryGetOwnedEntity(InstanceFinder.ClientManager.Connection, out Entity entity); + return entity.gameObject.GetComponent(); } @@ -191,6 +216,7 @@ public static Vector3 GetLocalPlayerPosition() { EntitySystem entitySystem = Subsystems.Get(); entitySystem.TryGetOwnedEntity(InstanceFinder.ClientManager.Connection, out Entity entity); + return entity.gameObject.transform.position; } } diff --git a/Assets/Scripts/Tests/Play Mode/Framework/Template Tests/PlaymodeTestRepository.cs b/Assets/Scripts/Tests/Play Mode/Framework/Template Tests/PlaymodeTestRepository.cs index c63a48befa..1d121c88ca 100644 --- a/Assets/Scripts/Tests/Play Mode/Framework/Template Tests/PlaymodeTestRepository.cs +++ b/Assets/Scripts/Tests/Play Mode/Framework/Template Tests/PlaymodeTestRepository.cs @@ -1,5 +1,6 @@ using NUnit.Framework; using SS3D.Core; +using SS3D.Data.Generated; using SS3D.Systems.Entities; using SS3D.Systems.Entities.Humanoid; using SS3D.Systems.Rounds; @@ -115,7 +116,7 @@ public static IEnumerator ReadyToggleButtonCorrectlyFunctionsWhenClicked() public static IEnumerator PlayerCanDropAndPickUpItem(PlayModeTest fixture) { // Get local player position, interaction controller and put bikehorn in first hand available. - var hand = TestHelpers.LocalPlayerSpawnItemInFirstHandAvailable(Data.Enums.ItemId.PDA); + var hand = TestHelpers.LocalPlayerSpawnItemInFirstHandAvailable(Items.PDA); var playerPosition = TestHelpers.GetLocalPlayerPosition(); yield return new WaitForSeconds(0.2f); diff --git a/Assets/Settings/AssetDatabaseSettings.asset b/Assets/Settings/AssetDatabaseSettings.asset index 2a590cb973..969e5a491c 100644 --- a/Assets/Settings/AssetDatabaseSettings.asset +++ b/Assets/Settings/AssetDatabaseSettings.asset @@ -15,13 +15,11 @@ MonoBehaviour: _preload: 1 _type: 2 IncludedAssetDatabases: + - {fileID: 11400000, guid: ca2c2a0941deb144b88d6d8cbf4252ee, type: 2} - {fileID: 11400000, guid: c8a3b9b514b2f7543a544259c3c97b81, type: 2} - {fileID: 11400000, guid: cdf9511d9049fa14ab0433934f3537ec, type: 2} - {fileID: 11400000, guid: c2644d7b34e956743a0bc485e7ca5e37, type: 2} - - {fileID: 11400000, guid: 51c28dd8b59ae0540a4e2cbcceb4999e, type: 2} - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} - {fileID: 11400000, guid: 3fc0db940ed0bd14cb905a5e15dd32fe, type: 2} - - {fileID: 11400000, guid: 99157bc96fcf5694e856e4d5092c39df, type: 2} - - {fileID: 11400000, guid: 43b69e36c49203a44bf20042cd83de81, type: 2} - {fileID: 11400000, guid: 830650063081cdf4d90087fc2ac74d24, type: 2} _skipCodeGeneration: 0 From 1930f8bf1e3ba20ff1c8e4433c2e93af6a3ed3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:52:56 -0300 Subject: [PATCH 09/32] Move database assets to a folder --- .../Data/{Containers.meta => Databases.meta} | 2 +- Assets/Content/Data/Databases/BodyParts.asset | 21 +++++++++++++++++++ .../BodyParts.asset.meta} | 6 +++--- .../{ => Databases}/CraftingRecipes.asset | 0 .../CraftingRecipes.asset.meta | 0 .../InteractionIcons.asset | 0 .../InteractionIcons.asset.meta | 0 .../Content/Data/{ => Databases}/Items.asset | 0 .../Data/{ => Databases}/Items.asset.meta | 0 .../Content/Data/{ => Databases}/Scenes.asset | 0 .../Data/{ => Databases}/Scenes.asset.meta | 0 .../Data/{ => Databases}/WorldSpaceUI.asset | 0 .../{ => Databases}/WorldSpaceUI.asset.meta | 0 13 files changed, 25 insertions(+), 4 deletions(-) rename Assets/Content/Data/{Containers.meta => Databases.meta} (77%) create mode 100644 Assets/Content/Data/Databases/BodyParts.asset rename Assets/Content/Data/{Icons.meta => Databases/BodyParts.asset.meta} (52%) rename Assets/Content/Data/{ => Databases}/CraftingRecipes.asset (100%) rename Assets/Content/Data/{ => Databases}/CraftingRecipes.asset.meta (100%) rename Assets/Content/Data/{Icons => Databases}/InteractionIcons.asset (100%) rename Assets/Content/Data/{Icons => Databases}/InteractionIcons.asset.meta (100%) rename Assets/Content/Data/{ => Databases}/Items.asset (100%) rename Assets/Content/Data/{ => Databases}/Items.asset.meta (100%) rename Assets/Content/Data/{ => Databases}/Scenes.asset (100%) rename Assets/Content/Data/{ => Databases}/Scenes.asset.meta (100%) rename Assets/Content/Data/{ => Databases}/WorldSpaceUI.asset (100%) rename Assets/Content/Data/{ => Databases}/WorldSpaceUI.asset.meta (100%) diff --git a/Assets/Content/Data/Containers.meta b/Assets/Content/Data/Databases.meta similarity index 77% rename from Assets/Content/Data/Containers.meta rename to Assets/Content/Data/Databases.meta index acc6f10fdd..97876f20bf 100644 --- a/Assets/Content/Data/Containers.meta +++ b/Assets/Content/Data/Databases.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4d7039edb0aacb741b09de1dc3171f28 +guid: b19ab1b6baab7dd4cb0fe808f1f50538 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Content/Data/Databases/BodyParts.asset b/Assets/Content/Data/Databases/BodyParts.asset new file mode 100644 index 0000000000..531da208e7 --- /dev/null +++ b/Assets/Content/Data/Databases/BodyParts.asset @@ -0,0 +1,21 @@ +%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: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} + m_Name: Materials + m_EditorClassIdentifier: + EnumNamespaceName: SS3D.Data.Enums + EnumName: MaterialsIds + AssetGroup: {fileID: 11400000, guid: 2caa591261a883b4183d04829ce705fd, type: 2} + Assets: + - {fileID: 2100000, guid: ed5a1263eb564c94abc6407ac0919ea7, type: 2} + - {fileID: 2100000, guid: e9b99cfb2e59ffa40a062c2f4b88b729, type: 2} + - {fileID: 2100000, guid: 6d2a18aa72cbaf94694dce9f8451160b, type: 2} diff --git a/Assets/Content/Data/Icons.meta b/Assets/Content/Data/Databases/BodyParts.asset.meta similarity index 52% rename from Assets/Content/Data/Icons.meta rename to Assets/Content/Data/Databases/BodyParts.asset.meta index 70a7876e08..5fdb8ffd31 100644 --- a/Assets/Content/Data/Icons.meta +++ b/Assets/Content/Data/Databases/BodyParts.asset.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7268d2d937bee234e835e6d04b695f15 -folderAsset: yes -DefaultImporter: +guid: 51c28dd8b59ae0540a4e2cbcceb4999e +NativeFormatImporter: externalObjects: {} + mainObjectFileID: 11400000 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Content/Data/CraftingRecipes.asset b/Assets/Content/Data/Databases/CraftingRecipes.asset similarity index 100% rename from Assets/Content/Data/CraftingRecipes.asset rename to Assets/Content/Data/Databases/CraftingRecipes.asset diff --git a/Assets/Content/Data/CraftingRecipes.asset.meta b/Assets/Content/Data/Databases/CraftingRecipes.asset.meta similarity index 100% rename from Assets/Content/Data/CraftingRecipes.asset.meta rename to Assets/Content/Data/Databases/CraftingRecipes.asset.meta diff --git a/Assets/Content/Data/Icons/InteractionIcons.asset b/Assets/Content/Data/Databases/InteractionIcons.asset similarity index 100% rename from Assets/Content/Data/Icons/InteractionIcons.asset rename to Assets/Content/Data/Databases/InteractionIcons.asset diff --git a/Assets/Content/Data/Icons/InteractionIcons.asset.meta b/Assets/Content/Data/Databases/InteractionIcons.asset.meta similarity index 100% rename from Assets/Content/Data/Icons/InteractionIcons.asset.meta rename to Assets/Content/Data/Databases/InteractionIcons.asset.meta diff --git a/Assets/Content/Data/Items.asset b/Assets/Content/Data/Databases/Items.asset similarity index 100% rename from Assets/Content/Data/Items.asset rename to Assets/Content/Data/Databases/Items.asset diff --git a/Assets/Content/Data/Items.asset.meta b/Assets/Content/Data/Databases/Items.asset.meta similarity index 100% rename from Assets/Content/Data/Items.asset.meta rename to Assets/Content/Data/Databases/Items.asset.meta diff --git a/Assets/Content/Data/Scenes.asset b/Assets/Content/Data/Databases/Scenes.asset similarity index 100% rename from Assets/Content/Data/Scenes.asset rename to Assets/Content/Data/Databases/Scenes.asset diff --git a/Assets/Content/Data/Scenes.asset.meta b/Assets/Content/Data/Databases/Scenes.asset.meta similarity index 100% rename from Assets/Content/Data/Scenes.asset.meta rename to Assets/Content/Data/Databases/Scenes.asset.meta diff --git a/Assets/Content/Data/WorldSpaceUI.asset b/Assets/Content/Data/Databases/WorldSpaceUI.asset similarity index 100% rename from Assets/Content/Data/WorldSpaceUI.asset rename to Assets/Content/Data/Databases/WorldSpaceUI.asset diff --git a/Assets/Content/Data/WorldSpaceUI.asset.meta b/Assets/Content/Data/Databases/WorldSpaceUI.asset.meta similarity index 100% rename from Assets/Content/Data/WorldSpaceUI.asset.meta rename to Assets/Content/Data/Databases/WorldSpaceUI.asset.meta From 4e6e89cf161a2eb92223592dba33ad54fcfe0e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 10 Oct 2023 15:00:42 -0300 Subject: [PATCH 10/32] Fix recipes --- .../Content/Data/Recipes/SlicedBananas.asset | 7 +- .../Data/Recipes/WeirdComplexRecipe.asset | 18 +- .../SS3D/Systems/Crafting/CraftingRecipe.cs | 170 ++++++------------ 3 files changed, 67 insertions(+), 128 deletions(-) diff --git a/Assets/Content/Data/Recipes/SlicedBananas.asset b/Assets/Content/Data/Recipes/SlicedBananas.asset index a487e68c5e..45a4a5e229 100644 --- a/Assets/Content/Data/Recipes/SlicedBananas.asset +++ b/Assets/Content/Data/Recipes/SlicedBananas.asset @@ -14,6 +14,9 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 2 _interactionName: Slice - _target: 29 - _result: 0e000000190000000d000000 + _target: {fileID: -1938953542191470901, guid: 1ef3c21a685ec2d4e9f0876719839d5f, type: 3} + _result: + - {fileID: 5987248117953462373, guid: 177428b73bad0fb4a89d1a64b85629bf, type: 3} + - {fileID: 6800495836141411361, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3} + - {fileID: 8032254855245068578, guid: f490a74616c067c4f83995017e10b420, type: 3} _recipeElements: [] diff --git a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset index 0c28e48881..512951b0e3 100644 --- a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset +++ b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset @@ -14,10 +14,14 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 0 _interactionName: Slice - _target: 0 - _result: 2000000021000000 - _recipeElements: - - _count: 2 - _itemId: 7 - - _count: 1 - _itemId: 30 + _target: {fileID: 5398674181771020985, guid: 11f824c472e04854e95065dda095e8f4, type: 3} + _result: + - {fileID: 983871327887632920, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3} + - {fileID: 6984312597055688722, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3} + _elements: + _list: + - _key: {fileID: 3278785340214204199, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3} + _value: 2 + - _key: {fileID: -2012658674781697945, guid: 9b9f6bd470226a74b903e74dbe9e423a, type: 3} + _value: 1 + _new: {fileID: 0} diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs index 047d72f482..9f9344f051 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs @@ -1,5 +1,7 @@ -using SS3D.Data.Enums; +using Coimbra; +using SS3D.Data.Enums; using SS3D.Systems.Inventory.Items; +using SS3D.Utils; using System; using System.Collections; using System.Collections.Generic; @@ -8,123 +10,53 @@ namespace SS3D.Systems.Crafting { - /// - /// Crafting recipes allow to replace a bunch of item by another, using a specific interaction. - /// - [CreateAssetMenu(fileName = "Recipe", menuName = "SS3D/Crafting/Recipe")] - public class CraftingRecipe : ScriptableObject, ISerializationCallbackReceiver - { - private Dictionary _elements = new(); - - [SerializeField] - private float _executionTime; - - [SerializeField] - private string _interactionName; - - [SerializeField] - private Item _target; - - [SerializeField] - private List _result; - - /// - /// The items and their respective numbers necessary for the recipe. - /// - public Dictionary Elements => _elements; - - /// - /// Time it takes in second for the crafting to finish. - /// - public float ExecutionTime => _executionTime; - - /// - /// Name of the necessary interaction to perform the recipe. - /// - public string InteractionName => _interactionName; - - /// - /// The target of the recipe, which is the item on which the player must click to get the crafting interactions. - /// - public Item Target => _target; - - /// - /// The result of the crafting. - /// - public List Result => _result; - - public int ElementsNumber => _elements.Sum(x => x.Value); - -#if UNITY_EDITOR - /// - /// Necessary to be able to edit in editor recipe elements. - /// Not straightforward since they are in a Hashset. - /// - [SerializeField] - private List _recipeElements; -#endif - - public void OnAfterDeserialize() - { -#if UNITY_EDITOR - // just transfer things from the list to the dictionnary. - _elements = new(); - foreach (RecipeElement item in _recipeElements) - { - _elements.TryAdd(item.ItemId, item.Count); - } - _recipeElements = null; -#endif - } - - public void OnBeforeSerialize() - { -#if UNITY_EDITOR - // just transfer things from the dictionnary to the list. - if (_elements == null) - { - return; - } - - _recipeElements = new List(); - foreach (Item id in _elements.Keys) - { - _recipeElements.Add(new RecipeElement(id, _elements[id])); - } -#endif - } - -#if UNITY_EDITOR - /// - /// A recipe element is simply describing an item and a number of it. - /// - [System.Serializable] - private struct RecipeElement - { - /// - /// Number of items. - /// - [SerializeField] - private int _count; - - /// - /// Id of the item. - /// - [SerializeField] - private Item _itemId; - - public int Count => _count; - - public Item ItemId => _itemId; - - public RecipeElement(Item id, int count) - { - _count = count; - _itemId = id; - } - } -#endif - } - + /// + /// Crafting recipes allow to replace a bunch of item by another, using a specific interaction. + /// + [CreateAssetMenu(fileName = "Recipe", menuName = "SS3D/Crafting/Recipe")] + public class CraftingRecipe : ScriptableObject + { + [SerializeField] + private float _executionTime; + + [SerializeField] + private string _interactionName; + + [SerializeField] + private Item _target; + + [SerializeField] + private List _result; + + [SerializeField] + private SerializableDictionary _elements = new(); + + /// + /// The items and their respective numbers necessary for the recipe. + /// + public Dictionary Elements => _elements; + + /// + /// Time it takes in second for the crafting to finish. + /// + public float ExecutionTime => _executionTime; + + /// + /// Name of the necessary interaction to perform the recipe. + /// + public string InteractionName => _interactionName; + + /// + /// The target of the recipe, which is the item on which the player must click to get the crafting interactions. + /// + public Item Target => _target; + + /// + /// The result of the crafting. + /// + public List Result => _result; + + public int ElementsNumber => _elements.Sum(x => x.Value); + } } From 78d7a9b23ccea970b33d2685ccb1083e47e336f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:19:07 -0300 Subject: [PATCH 11/32] Create a new system to reference world assets into inspector fields --- .../Content/Data/Recipes/SlicedBananas.asset | 12 +++-- .../Data/Recipes/WeirdComplexRecipe.asset | 10 ++-- .../Data/WorldObjectAssetReferences.meta | 8 +++ .../WorldObjectAssetReferences/BikeHorn.asset | 16 ++++++ .../BikeHorn.asset.meta | 8 +++ .../WorldObjectAssetReferences/Boombox.asset | 16 ++++++ .../Boombox.asset.meta | 8 +++ .../BrutePatch.asset | 16 ++++++ .../BrutePatch.asset.meta | 8 +++ .../BurnPatch.asset | 16 ++++++ .../BurnPatch.asset.meta | 8 +++ .../WorldObjectAssetReferences/Crowbar.asset | 16 ++++++ .../Crowbar.asset.meta | 8 +++ .../DonkPocket.asset | 16 ++++++ .../DonkPocket.asset.meta | 8 +++ .../FacewearGasMask.asset | 16 ++++++ .../FacewearGasMask.asset.meta | 8 +++ .../FlashlightBlue.asset | 16 ++++++ .../FlashlightBlue.asset.meta | 8 +++ .../GlovesInsulatedLeft.asset | 16 ++++++ .../GlovesInsulatedLeft.asset.meta | 8 +++ .../GlovesInsulatedRight.asset | 16 ++++++ .../GlovesInsulatedRight.asset.meta | 8 +++ .../GreyFloorTile.asset | 16 ++++++ .../GreyFloorTile.asset.meta | 8 +++ .../HeadsetLeft.asset | 16 ++++++ .../HeadsetLeft.asset.meta | 8 +++ .../HeadsetRight.asset | 16 ++++++ .../HeadsetRight.asset.meta | 8 +++ .../HumanHandLeft.asset | 16 ++++++ .../HumanHandLeft.asset.meta | 8 +++ .../HumanHandRight.asset | 16 ++++++ .../HumanHandRight.asset.meta | 8 +++ .../WorldObjectAssetReferences/IDCard.asset | 16 ++++++ .../IDCard.asset.meta | 8 +++ .../JumpsuitBotany.asset | 16 ++++++ .../JumpsuitBotany.asset.meta | 8 +++ .../JumpsuitEngineer.asset | 16 ++++++ .../JumpsuitEngineer.asset.meta | 8 +++ .../JumpsuitGrey.asset | 16 ++++++ .../JumpsuitGrey.asset.meta | 8 +++ .../JumpsuitSecurity.asset | 16 ++++++ .../JumpsuitSecurity.asset.meta | 8 +++ .../KitchenKnife.asset | 16 ++++++ .../KitchenKnife.asset.meta | 8 +++ .../LoadingBar.asset | 16 ++++++ .../LoadingBar.asset.meta | 8 +++ .../MedicalPatch.asset | 16 ++++++ .../MedicalPatch.asset.meta | 8 +++ .../Data/WorldObjectAssetReferences/Mug.asset | 16 ++++++ .../WorldObjectAssetReferences/Mug.asset.meta | 8 +++ .../NuclearAuthenticationDisk.asset | 16 ++++++ .../NuclearAuthenticationDisk.asset.meta | 8 +++ .../Data/WorldObjectAssetReferences/PDA.asset | 16 ++++++ .../WorldObjectAssetReferences/PDA.asset.meta | 8 +++ .../WorldObjectAssetReferences/Poster.asset | 16 ++++++ .../Poster.asset.meta | 8 +++ .../Screwdriver.asset | 16 ++++++ .../Screwdriver.asset.meta | 8 +++ .../SecurityIDCard.asset | 16 ++++++ .../SecurityIDCard.asset.meta | 8 +++ .../SecurityPDA.asset | 16 ++++++ .../SecurityPDA.asset.meta | 8 +++ .../ShoesHiTopsLeft.asset | 16 ++++++ .../ShoesHiTopsLeft.asset.meta | 8 +++ .../ShoesHiTopsRight.asset | 16 ++++++ .../ShoesHiTopsRight.asset.meta | 8 +++ .../ShoesJackbootsLeft.asset | 16 ++++++ .../ShoesJackbootsLeft.asset.meta | 8 +++ .../ShoesJackbootsRight.asset | 16 ++++++ .../ShoesJackbootsRight.asset.meta | 8 +++ .../SodaCanBeepsSoda.asset | 16 ++++++ .../SodaCanBeepsSoda.asset.meta | 8 +++ .../SodaCanBeepyLime.asset | 16 ++++++ .../SodaCanBeepyLime.asset.meta | 8 +++ .../SodaCanCannedAir.asset | 16 ++++++ .../SodaCanCannedAir.asset.meta | 8 +++ .../SodaCanCannedLaughter.asset | 16 ++++++ .../SodaCanCannedLaughter.asset.meta | 8 +++ .../SodaCanCola.asset | 16 ++++++ .../SodaCanCola.asset.meta | 8 +++ .../SodaCanDukePurpleTea.asset | 16 ++++++ .../SodaCanDukePurpleTea.asset.meta | 8 +++ .../SodaCanTonic.asset | 16 ++++++ .../SodaCanTonic.asset.meta | 8 +++ .../SteelReinforcedSheet.asset | 16 ++++++ .../SteelReinforcedSheet.asset.meta | 8 +++ .../SteelSheet.asset | 16 ++++++ .../SteelSheet.asset.meta | 8 +++ .../Sunglasses.asset | 16 ++++++ .../Sunglasses.asset.meta | 8 +++ .../ToolboxBlue.asset | 16 ++++++ .../ToolboxBlue.asset.meta | 8 +++ .../TruckerCap.asset | 16 ++++++ .../TruckerCap.asset.meta | 8 +++ .../WorldObjectAssetReferences/Wrench.asset | 16 ++++++ .../Wrench.asset.meta | 8 +++ .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 2 +- .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 2 +- .../AssetDatabaseSettingsInspectorEditor.cs | 49 +++++++++++++++---- .../WorldObjectAssetReference.cs | 26 ++++++++++ .../WorldObjectAssetReference.cs.meta | 3 ++ .../Systems/Crafting/CraftingInteraction.cs | 5 +- .../SS3D/Systems/Crafting/CraftingRecipe.cs | 26 +++++++--- .../SS3D/Systems/Crafting/CraftingSystem.cs | 6 +-- 105 files changed, 1244 insertions(+), 33 deletions(-) create mode 100644 Assets/Content/Data/WorldObjectAssetReferences.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Mug.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PDA.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Poster.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs.meta diff --git a/Assets/Content/Data/Recipes/SlicedBananas.asset b/Assets/Content/Data/Recipes/SlicedBananas.asset index 45a4a5e229..9262cef998 100644 --- a/Assets/Content/Data/Recipes/SlicedBananas.asset +++ b/Assets/Content/Data/Recipes/SlicedBananas.asset @@ -14,9 +14,11 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 2 _interactionName: Slice - _target: {fileID: -1938953542191470901, guid: 1ef3c21a685ec2d4e9f0876719839d5f, type: 3} + _target: {fileID: 11400000, guid: 9a6240bc8a7465a4b9ff2949fe1a91ec, type: 2} _result: - - {fileID: 5987248117953462373, guid: 177428b73bad0fb4a89d1a64b85629bf, type: 3} - - {fileID: 6800495836141411361, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3} - - {fileID: 8032254855245068578, guid: f490a74616c067c4f83995017e10b420, type: 3} - _recipeElements: [] + - {fileID: 11400000, guid: 4acff5047a23ca546892f6983df848da, type: 2} + - {fileID: 11400000, guid: d5582d2058d277645819b17209031fd5, type: 2} + - {fileID: 11400000, guid: 5f9d538d2b1db574ea0d87ef391eb3fd, type: 2} + _elements: + _list: [] + _new: {fileID: 0} diff --git a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset index 512951b0e3..704b143cab 100644 --- a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset +++ b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset @@ -14,14 +14,14 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 0 _interactionName: Slice - _target: {fileID: 5398674181771020985, guid: 11f824c472e04854e95065dda095e8f4, type: 3} + _target: {fileID: 11400000, guid: d39cddb29d447124aa73725a47e02f78, type: 2} _result: - - {fileID: 983871327887632920, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3} - - {fileID: 6984312597055688722, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3} + - {fileID: 11400000, guid: d9b0944d3ed02ea479b0af556a3cab64, type: 2} + - {fileID: 11400000, guid: 20ad2279ce787e64fb77393b42cffc6a, type: 2} _elements: _list: - - _key: {fileID: 3278785340214204199, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3} + - _key: {fileID: 11400000, guid: a5be2a47daccf6a449459d092254a0bc, type: 2} _value: 2 - - _key: {fileID: -2012658674781697945, guid: 9b9f6bd470226a74b903e74dbe9e423a, type: 3} + - _key: {fileID: 11400000, guid: 801a4613a54051e47a57bc2bc7287c19, type: 2} _value: 1 _new: {fileID: 0} diff --git a/Assets/Content/Data/WorldObjectAssetReferences.meta b/Assets/Content/Data/WorldObjectAssetReferences.meta new file mode 100644 index 0000000000..23506f1f8d --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8aa4d9cbc69d48e47ab1d7cbb27ad31d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset new file mode 100644 index 0000000000..f9fd133c1e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: BikeHorn + m_EditorClassIdentifier: + Id: BikeHorn + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta new file mode 100644 index 0000000000..76264c5df8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d39cddb29d447124aa73725a47e02f78 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset new file mode 100644 index 0000000000..ff4c1d6b63 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Boombox + m_EditorClassIdentifier: + Id: Boombox + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta new file mode 100644 index 0000000000..56c9ef7025 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1b3f700e7546e0489fd6e5f71abf8d3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset new file mode 100644 index 0000000000..0efc57064b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: BrutePatch + m_EditorClassIdentifier: + Id: BrutePatch + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta new file mode 100644 index 0000000000..64aa2936b8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8adf177e87ba8dc4a867b30fc5676a71 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset new file mode 100644 index 0000000000..a8ba9ff89e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: BurnPatch + m_EditorClassIdentifier: + Id: BurnPatch + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta new file mode 100644 index 0000000000..727977e51b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: df9cd9916d9c1254589eb99b8b830ed8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset new file mode 100644 index 0000000000..0f5f70b711 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Crowbar + m_EditorClassIdentifier: + Id: Crowbar + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta new file mode 100644 index 0000000000..0c9de0fce9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1b4ccdd9b9b331744a5b594dd5f00775 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset new file mode 100644 index 0000000000..65a33b9f0c --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: DonkPocket + m_EditorClassIdentifier: + Id: DonkPocket + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta new file mode 100644 index 0000000000..3fbb4cdeb1 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fed94fb222246a4419af975c7a2c4540 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset new file mode 100644 index 0000000000..f23b2967fc --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: FacewearGasMask + m_EditorClassIdentifier: + Id: FacewearGasMask + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta new file mode 100644 index 0000000000..a74ff6a626 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4de4d85493f8a8b42868cc0597871bcd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset new file mode 100644 index 0000000000..9c84be4ebe --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: FlashlightBlue + m_EditorClassIdentifier: + Id: FlashlightBlue + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta new file mode 100644 index 0000000000..6bde721034 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 413d01e857d1db8468215e17771a95ea +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset new file mode 100644 index 0000000000..1fcbd11504 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: GlovesInsulatedLeft + m_EditorClassIdentifier: + Id: GlovesInsulatedLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta new file mode 100644 index 0000000000..c7ca0a8085 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d9b0944d3ed02ea479b0af556a3cab64 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset new file mode 100644 index 0000000000..cbf19fe957 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: GlovesInsulatedRight + m_EditorClassIdentifier: + Id: GlovesInsulatedRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta new file mode 100644 index 0000000000..4ce291adbe --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 20ad2279ce787e64fb77393b42cffc6a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset new file mode 100644 index 0000000000..db311bc593 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: GreyFloorTile + m_EditorClassIdentifier: + Id: GreyFloorTile + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta new file mode 100644 index 0000000000..a93a38209e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68a5a1b2615760444ae03d706ee505f2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset new file mode 100644 index 0000000000..25ce9d1070 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HeadsetLeft + m_EditorClassIdentifier: + Id: HeadsetLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta new file mode 100644 index 0000000000..3fbe3502dc --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4b4029fe499a52040a5d860a68f2e28e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset new file mode 100644 index 0000000000..30fc124a78 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HeadsetRight + m_EditorClassIdentifier: + Id: HeadsetRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta new file mode 100644 index 0000000000..740a14b621 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 729dbb85ed3724242b2ee1d4da775f4e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset new file mode 100644 index 0000000000..d19b8cd71c --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHandLeft + m_EditorClassIdentifier: + Id: HumanHandLeft + Database: Bodyparts diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta new file mode 100644 index 0000000000..8159c3a2dd --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 565ac8afd5d7f1b48a77eea0dff57e1e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset new file mode 100644 index 0000000000..6bf4ba811f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHandRight + m_EditorClassIdentifier: + Id: HumanHandRight + Database: Bodyparts diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta new file mode 100644 index 0000000000..11f42d4c26 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a13475f95afeda4c83fcdd99d191bfc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset new file mode 100644 index 0000000000..885e41126f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: IDCard + m_EditorClassIdentifier: + Id: IDCard + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta new file mode 100644 index 0000000000..966ada6b11 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0c13483732a160b488fb2b7f669c234f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset new file mode 100644 index 0000000000..f5b59f594e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: JumpsuitBotany + m_EditorClassIdentifier: + Id: JumpsuitBotany + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta new file mode 100644 index 0000000000..2dcb6718a4 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da934006565cc3342bacbece3e87f49c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset new file mode 100644 index 0000000000..6f7a00648b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: JumpsuitEngineer + m_EditorClassIdentifier: + Id: JumpsuitEngineer + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta new file mode 100644 index 0000000000..5fc48c148c --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 673f8808b79583c438b800e934975fc7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset new file mode 100644 index 0000000000..04574d540a --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: JumpsuitGrey + m_EditorClassIdentifier: + Id: JumpsuitGrey + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta new file mode 100644 index 0000000000..df073225d7 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c470b6b3bca8a04ebd73865980deaa7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset new file mode 100644 index 0000000000..61142149ba --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: JumpsuitSecurity + m_EditorClassIdentifier: + Id: JumpsuitSecurity + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta new file mode 100644 index 0000000000..0a7582db95 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 878c1d8b308635044ad201f16f72b3a8 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset new file mode 100644 index 0000000000..9d68fb0950 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: KitchenKnife + m_EditorClassIdentifier: + Id: KitchenKnife + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta new file mode 100644 index 0000000000..c48e47ba22 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51a9d5208dc8a6f4aab4b21b87b91ee6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset new file mode 100644 index 0000000000..9f056f5031 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: LoadingBar + m_EditorClassIdentifier: + Id: LoadingBar + Database: WorldSpaceUI diff --git a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta new file mode 100644 index 0000000000..50b6ddf62e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30a38406d4acd85429ab81954811832d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset new file mode 100644 index 0000000000..bef782a656 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: MedicalPatch + m_EditorClassIdentifier: + Id: MedicalPatch + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta new file mode 100644 index 0000000000..a871eec524 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ed79aacb218d9de4d8652b66fa93e3fe +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset new file mode 100644 index 0000000000..aa04f3d969 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Mug + m_EditorClassIdentifier: + Id: Mug + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta new file mode 100644 index 0000000000..b566ccd5e9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5be2a47daccf6a449459d092254a0bc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset new file mode 100644 index 0000000000..c0d751168a --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: NuclearAuthenticationDisk + m_EditorClassIdentifier: + Id: NuclearAuthenticationDisk + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta new file mode 100644 index 0000000000..16219ca18c --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ca7d8e4c91357b943b78ca96e05b17ef +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset new file mode 100644 index 0000000000..3859976b65 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: PDA + m_EditorClassIdentifier: + Id: PDA + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta new file mode 100644 index 0000000000..471e9f5d7c --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: af026ff75727ddf4da580b4a7ecc7e78 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset new file mode 100644 index 0000000000..8229464a46 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Poster + m_EditorClassIdentifier: + Id: Poster + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta new file mode 100644 index 0000000000..9567509f34 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 93db84e4a22cd5c4ba1635e5591d4dad +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset new file mode 100644 index 0000000000..dea607258f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Screwdriver + m_EditorClassIdentifier: + Id: Screwdriver + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta new file mode 100644 index 0000000000..24679e64f3 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d5582d2058d277645819b17209031fd5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset new file mode 100644 index 0000000000..30de5d5e20 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SecurityIDCard + m_EditorClassIdentifier: + Id: SecurityIDCard + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta new file mode 100644 index 0000000000..ba4b72db86 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8b08c99562254be4b8d19bf506b27f5a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset new file mode 100644 index 0000000000..4bba12839e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SecurityPDA + m_EditorClassIdentifier: + Id: SecurityPDA + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta new file mode 100644 index 0000000000..41acd27d92 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e98d6efeb7277e7478a932dcd7fe4b72 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset new file mode 100644 index 0000000000..3e1f13b1d8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ShoesHiTopsLeft + m_EditorClassIdentifier: + Id: ShoesHiTopsLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta new file mode 100644 index 0000000000..2275d3d4be --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 81cbf243b5519c34686d5a42f677aa11 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset new file mode 100644 index 0000000000..c69c0a5c70 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ShoesHiTopsRight + m_EditorClassIdentifier: + Id: ShoesHiTopsRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta new file mode 100644 index 0000000000..304c88e62d --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ff0e747744f6e424b816eecdc26a9b87 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset new file mode 100644 index 0000000000..7690317920 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ShoesJackbootsLeft + m_EditorClassIdentifier: + Id: ShoesJackbootsLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta new file mode 100644 index 0000000000..897f8ac8e0 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da2f715274cab6f4196acc97ba7968da +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset new file mode 100644 index 0000000000..18de67f74f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ShoesJackbootsRight + m_EditorClassIdentifier: + Id: ShoesJackbootsRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta new file mode 100644 index 0000000000..9f7ebda261 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60bd8e01e60e256438e17b8a15e5fc59 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset new file mode 100644 index 0000000000..e9d92f4692 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanBeepsSoda + m_EditorClassIdentifier: + Id: SodaCanBeepsSoda + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta new file mode 100644 index 0000000000..3b47a52076 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f9d538d2b1db574ea0d87ef391eb3fd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset new file mode 100644 index 0000000000..19dba3b2d9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanBeepyLime + m_EditorClassIdentifier: + Id: SodaCanBeepyLime + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta new file mode 100644 index 0000000000..c47819794f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 32223a760be2a824aa5fe5ba38b81e9e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset new file mode 100644 index 0000000000..0da19ffabe --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanCannedAir + m_EditorClassIdentifier: + Id: SodaCanCannedAir + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta new file mode 100644 index 0000000000..1117a864c7 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b6457d4f679c9014c8af88872826df10 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset new file mode 100644 index 0000000000..b603e8ff15 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanCannedLaughter + m_EditorClassIdentifier: + Id: SodaCanCannedLaughter + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta new file mode 100644 index 0000000000..3d8c206491 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 787272db3e832a24eb2b074df1271ae4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset new file mode 100644 index 0000000000..c520aeb465 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanCola + m_EditorClassIdentifier: + Id: SodaCanCola + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta new file mode 100644 index 0000000000..6543d9156e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1b698689146838645971fa10136cae55 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset new file mode 100644 index 0000000000..1ca5f38a04 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanDukePurpleTea + m_EditorClassIdentifier: + Id: SodaCanDukePurpleTea + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta new file mode 100644 index 0000000000..6e73079119 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4acff5047a23ca546892f6983df848da +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset new file mode 100644 index 0000000000..7c44577f01 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SodaCanTonic + m_EditorClassIdentifier: + Id: SodaCanTonic + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta new file mode 100644 index 0000000000..ab6fa8adb9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 68230819a8f6057499c06f75715ae067 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset new file mode 100644 index 0000000000..531d1e0fb7 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SteelReinforcedSheet + m_EditorClassIdentifier: + Id: SteelReinforcedSheet + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta new file mode 100644 index 0000000000..f919db64d7 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1504e8496fb46cb418e6c45090ef9a87 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset new file mode 100644 index 0000000000..7618cc42bf --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: SteelSheet + m_EditorClassIdentifier: + Id: SteelSheet + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta new file mode 100644 index 0000000000..e9c2e82504 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dca32ba0f238d50459195af118b0435e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset new file mode 100644 index 0000000000..e7928e8ecd --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Sunglasses + m_EditorClassIdentifier: + Id: Sunglasses + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta new file mode 100644 index 0000000000..debacca608 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 801a4613a54051e47a57bc2bc7287c19 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset new file mode 100644 index 0000000000..e6fde2669e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ToolboxBlue + m_EditorClassIdentifier: + Id: ToolboxBlue + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta new file mode 100644 index 0000000000..8a422cd96e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 985ce8ccfd6cf5040b74333c386271f5 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset new file mode 100644 index 0000000000..f131902ee1 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: TruckerCap + m_EditorClassIdentifier: + Id: TruckerCap + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta new file mode 100644 index 0000000000..f81b305538 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9a6240bc8a7465a4b9ff2949fe1a91ec +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset new file mode 100644 index 0000000000..a1b5fc7ca0 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Wrench + m_EditorClassIdentifier: + Id: Wrench + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta new file mode 100644 index 0000000000..2894cc4436 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: efd354e0d4d97df418e2b8df5e349cd0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index a78c407eaa..0c82b453b7 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -17,7 +17,7 @@ namespace SS3D.Data.AssetDatabases /// It is used to find assets using IDs in a very convenient manner throughout the project. /// [CreateAssetMenu(menuName = "SS3D/AssetDatabase", fileName = "AssetDatabase", order = 0)] - public class AssetDatabase : ScriptableObject + public sealed class AssetDatabase : ScriptableObject { /// /// The path that the enum will be generated to. diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index 74e5f7214a..cba408d1b0 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -6,7 +6,7 @@ namespace SS3D.Data.AssetDatabases /// /// Represents an asset data asset, contains the name of the asset and the related database. /// - public class DatabaseAsset + public sealed class DatabaseAsset { /// /// The name of the asset. diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index f925997231..b2c93b79c4 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -1,11 +1,13 @@ #if UNITY_EDITOR using SS3D.CodeGeneration; +using System; using System.Collections.Generic; using UnityEditor; using UnityEditor.AddressableAssets.Settings; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; +using Object = UnityEngine.Object; namespace SS3D.Data.AssetDatabases.InspectorEditor { @@ -25,8 +27,8 @@ private void OnEnable() } public override VisualElement CreateInspectorGUI() - { - FindAndLoadAllAssetsDatabasesAddressablesGroups(); + { + // FindAndLoadAllAssetsDatabasesAddressablesGroups(); return SetupUIToolkitCustomInspectorEditor(); } @@ -40,20 +42,19 @@ public override void OnInspectorGUI() private void SetupCustomInspectorEditor() { - EditorApplication.projectChanged += HandleProjectChanged; + // EditorApplication.projectChanged += HandleProjectChanged; - FindAndLoadAllAssetsDatabasesAddressablesGroups(); + // FindAndLoadAllAssetsDatabasesAddressablesGroups(); if (GUILayout.Button("Find and load asset databases", GUILayout.Width(350))) { - List foundDatabases = AssetDatabase.FindAllAssetDatabases(); - _assetDatabaseSettings.IncludedAssetDatabases = foundDatabases; + HandleLoadDatabasesButtonPressedGUI(); } } private VisualElement SetupUIToolkitCustomInspectorEditor() { - EditorApplication.projectChanged += HandleProjectChanged; + // EditorApplication.projectChanged += HandleProjectChanged; VisualElement root = new(); _assetDatabaseSettingsVisualTree.CloneTree(root); @@ -107,6 +108,30 @@ private void CreateAssetDatabasesEnum() foreach (AssetDatabase includedAssetDatabase in _assetDatabaseSettings.IncludedAssetDatabases) { includedAssetDatabase.GenerateDatabaseCode(); + + string path = "Assets/Content/Data/WorldObjectAssetReferences/"; + + foreach (Object asset in includedAssetDatabase.Assets.Values) + { + if (asset is not GameObject) + { + continue; + } + + WorldObjectAssetReference worldObjectAssetReference = CreateInstance(); + + worldObjectAssetReference.Id = asset.name; + worldObjectAssetReference.Database = includedAssetDatabase.name; + + if (!UnityEditor.AssetDatabase.Contains(worldObjectAssetReference)) + { + UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{path}{worldObjectAssetReference.Id}.asset"); + } + else + { + Destroy(worldObjectAssetReference); + } + } } } @@ -125,16 +150,20 @@ private void UpdateListVisuals() } } - private void HandleProjectChanged() + private void HandleLoadDatabasesButtonPressed() { + LoadDatabases(); + FindAndLoadAllAssetsDatabasesAddressablesGroups(); + + UpdateListVisuals(); } - private void HandleLoadDatabasesButtonPressed() + private void HandleLoadDatabasesButtonPressedGUI() { LoadDatabases(); - UpdateListVisuals(); + FindAndLoadAllAssetsDatabasesAddressablesGroups(); } } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs new file mode 100644 index 0000000000..bdce4fed29 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs @@ -0,0 +1,26 @@ +using SS3D.Attributes; +using UnityEngine; + +namespace SS3D.Data.AssetDatabases +{ + /// + /// This SO is used to reference world object assets in inspector fields without worrying about losing data. + /// World object assets are anything that can be placed in the world as a GameObject, like items and tileobjects. + /// + public sealed class WorldObjectAssetReference : ScriptableObject + { + public GameObject Prefab => Assets.Get(Database, Id); + +#if UNITY_EDITOR + [ReadOnly] +#endif + [Header("This file is auto-generated, do not modify it manually")] + public string Id; + +#if UNITY_EDITOR + [ReadOnly] +#endif + [Header("This file is auto-generated, do not modify it manually")] + public string Database; + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs.meta b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs.meta new file mode 100644 index 0000000000..cfad0dcaac --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d8ba336da0014235becfe02dce35b6ca +timeCreated: 1696962501 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs index 596eb955ca..b539864ee7 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs @@ -1,4 +1,5 @@ -using FishNet.Object; +using Cysharp.Threading.Tasks; +using FishNet.Object; using SS3D.Core; using SS3D.Data.Enums; using SS3D.Interactions; @@ -73,7 +74,7 @@ public void Craft(InteractionEvent interactionEvent) Subsystems.TryGet(out CraftingSystem craftingSystem); Item target = interactionEvent.Target as Item; - craftingSystem.Craft(target, ItemsToConsume, recipe.Result); + craftingSystem.Craft(target, ItemsToConsume, recipe.Result.Select(o => o.GetComponent()).ToList()); } protected override void StartDelayed(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs index 9f9344f051..7fd4be07a4 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs @@ -1,4 +1,5 @@ using Coimbra; +using SS3D.Data.AssetDatabases; using SS3D.Data.Enums; using SS3D.Systems.Inventory.Items; using SS3D.Utils; @@ -23,18 +24,31 @@ public class CraftingRecipe : ScriptableObject private string _interactionName; [SerializeField] - private Item _target; + private WorldObjectAssetReference _target; [SerializeField] - private List _result; + private List _result; [SerializeField] - private SerializableDictionary _elements = new(); + private SerializableDictionary _elements = new(); /// /// The items and their respective numbers necessary for the recipe. /// - public Dictionary Elements => _elements; + public Dictionary Elements + { + get + { + Dictionary elements = new Dictionary(); + + foreach (KeyValuePair keyValuePair in _elements) + { + elements.Add(keyValuePair.Key.Prefab.GetComponent(), keyValuePair.Value); + } + + return elements; + } + } /// /// Time it takes in second for the crafting to finish. @@ -49,12 +63,12 @@ public class CraftingRecipe : ScriptableObject /// /// The target of the recipe, which is the item on which the player must click to get the crafting interactions. /// - public Item Target => _target; + public Item Target => _target.Prefab.GetComponent(); /// /// The result of the crafting. /// - public List Result => _result; + public List Result => _result.Select(reference => reference.Prefab).ToList(); public int ElementsNumber => _elements.Sum(x => x.Value); } diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs index b983fd4c61..f57609fb1b 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs @@ -111,7 +111,7 @@ public void Craft(Item target, List itemToConsume, List result) /// public List BuildListOfItemToConsume(List closeItemsFromTarget, CraftingRecipe recipe) { - List ItemsToConsume = new List(); + List itemsToConsume = new List(); Dictionary recipeElements = new Dictionary(recipe.Elements); @@ -122,11 +122,11 @@ public List BuildListOfItemToConsume(List closeItemsFromTarget, Craf continue; } - ItemsToConsume.Add(item); + itemsToConsume.Add(item); recipeElements[item] -= 1; } - return ItemsToConsume; + return itemsToConsume; } /// From a98271a51ad58466b35b8a048566f3730d83150a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Fri, 13 Oct 2023 11:16:13 -0300 Subject: [PATCH 12/32] Bring back callbacks --- .../CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta | 7 +++++++ .../Tugboat/LiteNetLib/LiteNetLib.csproj.meta | 7 +++++++ .../AssetDatabaseSettingsInspectorEditor.cs | 13 ++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 Assets/Scripts/External/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta create mode 100644 Assets/Scripts/External/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/LiteNetLib.csproj.meta diff --git a/Assets/Scripts/External/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta b/Assets/Scripts/External/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta new file mode 100644 index 0000000000..aa8a077601 --- /dev/null +++ b/Assets/Scripts/External/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 246f31a0e00fea74a93125fec6d80da8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/LiteNetLib.csproj.meta b/Assets/Scripts/External/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/LiteNetLib.csproj.meta new file mode 100644 index 0000000000..f9c48e96e4 --- /dev/null +++ b/Assets/Scripts/External/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/LiteNetLib.csproj.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2ad85b0f43f25f1499c27a4dca23ddd8 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index b2c93b79c4..67f04b37a6 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -28,7 +28,7 @@ private void OnEnable() public override VisualElement CreateInspectorGUI() { - // FindAndLoadAllAssetsDatabasesAddressablesGroups(); + FindAndLoadAllAssetsDatabasesAddressablesGroups(); return SetupUIToolkitCustomInspectorEditor(); } @@ -42,7 +42,7 @@ public override void OnInspectorGUI() private void SetupCustomInspectorEditor() { - // EditorApplication.projectChanged += HandleProjectChanged; + EditorApplication.projectChanged += HandleProjectChanged; // FindAndLoadAllAssetsDatabasesAddressablesGroups(); @@ -54,7 +54,7 @@ private void SetupCustomInspectorEditor() private VisualElement SetupUIToolkitCustomInspectorEditor() { - // EditorApplication.projectChanged += HandleProjectChanged; + EditorApplication.projectChanged += HandleProjectChanged; VisualElement root = new(); _assetDatabaseSettingsVisualTree.CloneTree(root); @@ -159,6 +159,13 @@ private void HandleLoadDatabasesButtonPressed() UpdateListVisuals(); } + public void HandleProjectChanged() + { + LoadDatabases(); + + FindAndLoadAllAssetsDatabasesAddressablesGroups(); + } + private void HandleLoadDatabasesButtonPressedGUI() { LoadDatabases(); From 0811ec4d87659944c96c8256b7c9d5ca2fba5168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:04:02 -0300 Subject: [PATCH 13/32] Fix issues with merge, and add new assets to asset references --- Assets/Content/Data/ParticlesEffects.asset | 11 +++++++---- .../AttackParticles.asset | 16 ++++++++++++++++ .../AttackParticles.asset.meta | 8 ++++++++ .../BleedingParticle.asset | 16 ++++++++++++++++ .../BleedingParticle.asset.meta | 8 ++++++++ .../HumanArmLeftItem.asset | 16 ++++++++++++++++ .../HumanArmLeftItem.asset.meta | 8 ++++++++ .../HumanArmRightItem.asset | 16 ++++++++++++++++ .../HumanArmRightItem.asset.meta | 8 ++++++++ .../HumanBrainItem.asset | 16 ++++++++++++++++ .../HumanBrainItem.asset.meta | 8 ++++++++ .../HumanEarLeftItem.asset | 16 ++++++++++++++++ .../HumanEarLeftItem.asset.meta | 8 ++++++++ .../HumanEarRightItem.asset | 16 ++++++++++++++++ .../HumanEarRightItem.asset.meta | 8 ++++++++ .../HumanFootLeftItem.asset | 16 ++++++++++++++++ .../HumanFootLeftItem.asset.meta | 8 ++++++++ .../HumanFootRightItem.asset | 16 ++++++++++++++++ .../HumanFootRightItem.asset.meta | 8 ++++++++ .../HumanHandLeftItem.asset | 16 ++++++++++++++++ .../HumanHandLeftItem.asset.meta | 8 ++++++++ .../HumanHandRightItem.asset | 16 ++++++++++++++++ .../HumanHandRightItem.asset.meta | 8 ++++++++ .../HumanHeadItem.asset | 16 ++++++++++++++++ .../HumanHeadItem.asset.meta | 8 ++++++++ .../HumanHeartItem.asset | 16 ++++++++++++++++ .../HumanHeartItem.asset.meta | 8 ++++++++ .../HumanLegLeftItem.asset | 16 ++++++++++++++++ .../HumanLegLeftItem.asset.meta | 8 ++++++++ .../HumanLegRightItem.asset | 16 ++++++++++++++++ .../HumanLegRightItem.asset.meta | 8 ++++++++ .../HumanLungLeftItem.asset | 16 ++++++++++++++++ .../HumanLungLeftItem.asset.meta | 8 ++++++++ .../HumanLungRightItem.asset | 16 ++++++++++++++++ .../HumanLungRightItem.asset.meta | 8 ++++++++ .../HumanTorsoItem.asset | 16 ++++++++++++++++ .../HumanTorsoItem.asset.meta | 8 ++++++++ .../SS3D/Data/Generated/AssetDatabases.cs | 1 + Assets/Scripts/SS3D/Data/Generated/Items.cs | 16 ++++++++++++++++ .../SS3D/Data/Generated/ParticlesEffects.cs | 12 ++++++++++++ ...fectsIds.cs.meta => ParticlesEffects.cs.meta} | 2 +- .../SS3D/Data/Generated/ParticlesEffectsIds.cs | 9 --------- .../SS3D/Systems/Health/BleedingBodyPart.cs | 3 ++- Assets/Settings/AssetDatabaseSettings.asset | 2 +- 44 files changed, 472 insertions(+), 16 deletions(-) create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs rename Assets/Scripts/SS3D/Data/Generated/{ParticlesEffectsIds.cs.meta => ParticlesEffects.cs.meta} (83%) delete mode 100644 Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs diff --git a/Assets/Content/Data/ParticlesEffects.asset b/Assets/Content/Data/ParticlesEffects.asset index 446b4f644e..e6d6fac333 100644 --- a/Assets/Content/Data/ParticlesEffects.asset +++ b/Assets/Content/Data/ParticlesEffects.asset @@ -12,9 +12,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: ParticlesEffects m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: ParticlesEffectsIds + EnumName: ParticlesEffects AssetGroup: {fileID: 11400000, guid: d700978032e12a647b8734863a0bf7c2, type: 2} Assets: - - {fileID: 7714517724079113232, guid: 17b0d9163e9cdf14aa557557e7d9d76b, type: 3} - - {fileID: 6016476664605660376, guid: a6a77c26ee7edd94c804f4ddd851c8ba, type: 3} + _list: + - _key: AttackParticles + _value: {fileID: 7714517724079113232, guid: 17b0d9163e9cdf14aa557557e7d9d76b, type: 3} + - _key: BleedingParticle + _value: {fileID: 6016476664605660376, guid: a6a77c26ee7edd94c804f4ddd851c8ba, type: 3} + _new: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset new file mode 100644 index 0000000000..23c97a15eb --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: AttackParticles + m_EditorClassIdentifier: + Id: AttackParticles + Database: ParticlesEffects diff --git a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta new file mode 100644 index 0000000000..5627625faa --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9c372330afcd4bb4a9fbdc757b22abe6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset new file mode 100644 index 0000000000..280dba0a65 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: BleedingParticle + m_EditorClassIdentifier: + Id: BleedingParticle + Database: ParticlesEffects diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta new file mode 100644 index 0000000000..ab3f18cdab --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f4107e792a7e6c47a1dd6f63cff9d70 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset new file mode 100644 index 0000000000..64d55e27d9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanArmLeftItem + m_EditorClassIdentifier: + Id: HumanArmLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta new file mode 100644 index 0000000000..18c229af36 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d91b6d9e71803b04e9ff30caa2f6374f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset new file mode 100644 index 0000000000..98f2044418 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanArmRightItem + m_EditorClassIdentifier: + Id: HumanArmRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta new file mode 100644 index 0000000000..335e3bf0b9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: df9f404fa52ee824794909f08595c028 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset new file mode 100644 index 0000000000..4c71d7755e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanBrainItem + m_EditorClassIdentifier: + Id: HumanBrainItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta new file mode 100644 index 0000000000..8a66820708 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 32c94b1830362bc43b30555d487396af +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset new file mode 100644 index 0000000000..9dda16679f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanEarLeftItem + m_EditorClassIdentifier: + Id: HumanEarLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta new file mode 100644 index 0000000000..1c7e69c1a0 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0a8e3f2b842a9e245a97119b5cef999e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset new file mode 100644 index 0000000000..f7dbcb1e4f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanEarRightItem + m_EditorClassIdentifier: + Id: HumanEarRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta new file mode 100644 index 0000000000..70522ed30b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5bc7d557ce7352244b2bf7f4ed90dc4b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset new file mode 100644 index 0000000000..0604184735 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanFootLeftItem + m_EditorClassIdentifier: + Id: HumanFootLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta new file mode 100644 index 0000000000..3c49925eeb --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b3b2afce6152d964ea581ec25e05094f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset new file mode 100644 index 0000000000..9860ed4fa1 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanFootRightItem + m_EditorClassIdentifier: + Id: HumanFootRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta new file mode 100644 index 0000000000..fad1171a34 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab15f69730e737c499d7e49e0b60828f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset new file mode 100644 index 0000000000..b3bfcea12f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHandLeftItem + m_EditorClassIdentifier: + Id: HumanHandLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta new file mode 100644 index 0000000000..2757c336ff --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 95a17af52b0ee2840bf23d4e4dbadef9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset new file mode 100644 index 0000000000..07653bcf5e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHandRightItem + m_EditorClassIdentifier: + Id: HumanHandRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta new file mode 100644 index 0000000000..0fb704f2c7 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a041cd784cd09f24c8ee54ab5e4f7591 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset new file mode 100644 index 0000000000..8297d706e8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHeadItem + m_EditorClassIdentifier: + Id: HumanHeadItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta new file mode 100644 index 0000000000..4be5b27af4 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ec68376be66eb22488b1bc8833ae1d41 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset new file mode 100644 index 0000000000..6cca825050 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHeartItem + m_EditorClassIdentifier: + Id: HumanHeartItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta new file mode 100644 index 0000000000..3f59ec9727 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7dfc9891a70eca243ba66af9aabdf8ac +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset new file mode 100644 index 0000000000..24adcadda0 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLegLeftItem + m_EditorClassIdentifier: + Id: HumanLegLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta new file mode 100644 index 0000000000..f4444866d6 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4988ba87319d0de4c886d878ef7eeaf0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset new file mode 100644 index 0000000000..b0dfeea001 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLegRightItem + m_EditorClassIdentifier: + Id: HumanLegRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta new file mode 100644 index 0000000000..e2c1c3b443 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4811186b89123754dbfec4228ba53474 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset new file mode 100644 index 0000000000..23bf4eec10 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLungLeftItem + m_EditorClassIdentifier: + Id: HumanLungLeftItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta new file mode 100644 index 0000000000..26617a79f5 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 459280746733a0d4da7480561a520f0a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset new file mode 100644 index 0000000000..6fcfb84790 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLungRightItem + m_EditorClassIdentifier: + Id: HumanLungRightItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta new file mode 100644 index 0000000000..0a665f7b42 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b0c3ba98e7df3f4a9b956e6379c73a1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset new file mode 100644 index 0000000000..e5b9d61e1e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanTorsoItem + m_EditorClassIdentifier: + Id: HumanTorsoItem + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta new file mode 100644 index 0000000000..2a2f5cc273 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c2f98df04da8cb146966e6feb45d762c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs index 8372f374e0..77aef8a057 100644 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -11,6 +11,7 @@ public static class AssetDatabases public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); public static DatabaseAsset WorldSpaceUI = new DatabaseAsset("WorldSpaceUI", "AssetDatabases"); + public static DatabaseAsset ParticlesEffects = new DatabaseAsset("ParticlesEffects", "AssetDatabases"); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs index 28b5019ca1..a667459bd7 100644 --- a/Assets/Scripts/SS3D/Data/Generated/Items.cs +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs @@ -49,6 +49,22 @@ public static class Items public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "Items"); public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "Items"); public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "Items"); + public static DatabaseAsset HumanArmLeftItem = new DatabaseAsset("HumanArmLeftItem", "Items"); + public static DatabaseAsset HumanArmRightItem = new DatabaseAsset("HumanArmRightItem", "Items"); + public static DatabaseAsset HumanBrainItem = new DatabaseAsset("HumanBrainItem", "Items"); + public static DatabaseAsset HumanEarLeftItem = new DatabaseAsset("HumanEarLeftItem", "Items"); + public static DatabaseAsset HumanEarRightItem = new DatabaseAsset("HumanEarRightItem", "Items"); + public static DatabaseAsset HumanFootLeftItem = new DatabaseAsset("HumanFootLeftItem", "Items"); + public static DatabaseAsset HumanFootRightItem = new DatabaseAsset("HumanFootRightItem", "Items"); + public static DatabaseAsset HumanHandLeftItem = new DatabaseAsset("HumanHandLeftItem", "Items"); + public static DatabaseAsset HumanHandRightItem = new DatabaseAsset("HumanHandRightItem", "Items"); + public static DatabaseAsset HumanHeadItem = new DatabaseAsset("HumanHeadItem", "Items"); + public static DatabaseAsset HumanLegLeftItem = new DatabaseAsset("HumanLegLeftItem", "Items"); + public static DatabaseAsset HumanLegRightItem = new DatabaseAsset("HumanLegRightItem", "Items"); + public static DatabaseAsset HumanLungLeftItem = new DatabaseAsset("HumanLungLeftItem", "Items"); + public static DatabaseAsset HumanLungRightItem = new DatabaseAsset("HumanLungRightItem", "Items"); + public static DatabaseAsset HumanTorsoItem = new DatabaseAsset("HumanTorsoItem", "Items"); + public static DatabaseAsset HumanHeartItem = new DatabaseAsset("HumanHeartItem", "Items"); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs new file mode 100644 index 0000000000..116a8058ea --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs @@ -0,0 +1,12 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class ParticlesEffects + { + public static DatabaseAsset AttackParticles = new DatabaseAsset("AttackParticles", "ParticlesEffects"); + public static DatabaseAsset BleedingParticle = new DatabaseAsset("BleedingParticle", "ParticlesEffects"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs.meta similarity index 83% rename from Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs.meta rename to Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs.meta index fd7805562d..7b6a62fc21 100644 --- a/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs.meta +++ b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffects.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3928ca331c55b32438ec98d5b08b18a7 +guid: e2389c756bea5b840bfcb56279a377ca MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs b/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs deleted file mode 100644 index dc8475d2d4..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/ParticlesEffectsIds.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace SS3D.Data.Enums -{ - public enum ParticlesEffectsIds - { - AttackParticles = 0, - BleedingParticle = 1, - } -} - diff --git a/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs b/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs index 07e73fe477..63c9027229 100644 --- a/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs +++ b/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs @@ -4,6 +4,7 @@ using SS3D.Data; using UnityEngine; using Coimbra; +using SS3D.Data.Generated; using System; namespace SS3D.Systems.Health @@ -44,7 +45,7 @@ public void SyncBleedEffect(bool prev, bool next, bool asServer) if (next && _bloodEffect == null) { - GameObject bleedingEffect = Assets.Get(AssetDatabases.ParticlesEffects, (int)ParticlesEffectsIds.BleedingParticle); + GameObject bleedingEffect = ParticlesEffects.BleedingParticle; GameObject bloodDisplayer; Transform bloodParent; if (_bodyPart.BodyCollider != null) diff --git a/Assets/Settings/AssetDatabaseSettings.asset b/Assets/Settings/AssetDatabaseSettings.asset index 969e5a491c..17bd8cc34e 100644 --- a/Assets/Settings/AssetDatabaseSettings.asset +++ b/Assets/Settings/AssetDatabaseSettings.asset @@ -19,7 +19,7 @@ MonoBehaviour: - {fileID: 11400000, guid: c8a3b9b514b2f7543a544259c3c97b81, type: 2} - {fileID: 11400000, guid: cdf9511d9049fa14ab0433934f3537ec, type: 2} - {fileID: 11400000, guid: c2644d7b34e956743a0bc485e7ca5e37, type: 2} - - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} - {fileID: 11400000, guid: 3fc0db940ed0bd14cb905a5e15dd32fe, type: 2} - {fileID: 11400000, guid: 830650063081cdf4d90087fc2ac74d24, type: 2} + - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} _skipCodeGeneration: 0 From d0cc7d6c52a098b6ceb72855d8da83d5d480bc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:51:44 -0300 Subject: [PATCH 14/32] Fix scene buttons --- .../SceneManagement/Editor/EditorSceneUtils.cs | 18 +++++++++--------- .../SceneManagement/Editor/SceneSwitcher.cs | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs index 2926dc10a4..8eebabde0e 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs @@ -11,19 +11,19 @@ public static class EditorSceneUtils private static string SceneToOpen; public static void StartScene(string sceneName) - { + { EditorApplication.update += OnUpdate; - if (EditorApplication.isPlaying) - { - EditorApplication.isPlaying = false; - } + if (EditorApplication.isPlaying) + { + EditorApplication.isPlaying = false; + } - SceneToOpen = sceneName; - EditorApplication.update += OnUpdate; - } + SceneToOpen = sceneName; + EditorApplication.update += OnUpdate; + } - private static void OnUpdate() + private static void OnUpdate() { if (SceneToOpen == null || EditorApplication.isPlaying || EditorApplication.isPaused || diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs index 3d21b253b6..5fb4564aaa 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs @@ -39,9 +39,7 @@ private static void OnToolbarGUI() { if (GUILayout.Button(new GUIContent(scene), options)) { - // Enum.TryParse(scene, out Scenes sceneEnum); - - EditorSceneUtils.StartScene("sceneEnum"); + EditorSceneUtils.StartScene(scene); } } } From 059faf06f232f851ee45de35bf7969af580023f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:54:06 -0300 Subject: [PATCH 15/32] Fix spacing --- .../Editor/EditorSceneUtils.cs | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs index 8eebabde0e..514b53ba44 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs @@ -10,24 +10,22 @@ public static class EditorSceneUtils { private static string SceneToOpen; - public static void StartScene(string sceneName) - { - EditorApplication.update += OnUpdate; + public static void StartScene(string sceneName) + { + EditorApplication.update += OnUpdate; - if (EditorApplication.isPlaying) - { - EditorApplication.isPlaying = false; - } + if (EditorApplication.isPlaying) + { + EditorApplication.isPlaying = false; + } - SceneToOpen = sceneName; - EditorApplication.update += OnUpdate; - } + SceneToOpen = sceneName; + EditorApplication.update += OnUpdate; + } - private static void OnUpdate() + private static void OnUpdate() { - if (SceneToOpen == null || - EditorApplication.isPlaying || EditorApplication.isPaused || - EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode) + if (SceneToOpen == null || EditorApplication.isPlaying || EditorApplication.isPaused || EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode) { return; } @@ -39,6 +37,7 @@ private static void OnUpdate() // need to get scene via search because the path to the scene // file contains the package version so it'll change over time string[] guids = AssetDatabase.FindAssets("t:scene " + SceneToOpen, null); + if (guids.Length == 0) { Debug.LogWarning("Couldn't find scene file"); From df6e9074e79641bf53401e553dd7d664ac03190d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 17 Oct 2023 11:36:05 -0300 Subject: [PATCH 16/32] Documentation general work --- .../{ => Databases}/ParticlesEffects.asset | 0 .../ParticlesEffects.asset.meta | 0 .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 5 +++ .../WorldObjectAssetReference.cs | 7 +++- Assets/Scripts/SS3D/Data/Assets.cs | 32 ++++++++++--------- .../SS3D/Data/Generated/AssetDatabases.cs | 2 +- 6 files changed, 29 insertions(+), 17 deletions(-) rename Assets/Content/Data/{ => Databases}/ParticlesEffects.asset (100%) rename Assets/Content/Data/{ => Databases}/ParticlesEffects.asset.meta (100%) diff --git a/Assets/Content/Data/ParticlesEffects.asset b/Assets/Content/Data/Databases/ParticlesEffects.asset similarity index 100% rename from Assets/Content/Data/ParticlesEffects.asset rename to Assets/Content/Data/Databases/ParticlesEffects.asset diff --git a/Assets/Content/Data/ParticlesEffects.asset.meta b/Assets/Content/Data/Databases/ParticlesEffects.asset.meta similarity index 100% rename from Assets/Content/Data/ParticlesEffects.asset.meta rename to Assets/Content/Data/Databases/ParticlesEffects.asset.meta diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index cba408d1b0..44056d0b98 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -28,6 +28,11 @@ public sealed class DatabaseAsset /// public GameObject New() => GameObject.Instantiate(Prefab); + /// + /// This constructor specifies which databaseID to use and which asset ID, or name, to use. + /// + /// This is used by the AssetData system and is automated, you don't need to create an DatabaseAsset manually. + /// public DatabaseAsset(string name, string databaseName) { Name = name; diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs index bdce4fed29..baae1e24f5 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs @@ -1,4 +1,5 @@ -using SS3D.Attributes; +using JetBrains.Annotations; +using SS3D.Attributes; using UnityEngine; namespace SS3D.Data.AssetDatabases @@ -9,6 +10,10 @@ namespace SS3D.Data.AssetDatabases /// public sealed class WorldObjectAssetReference : ScriptableObject { + /// + /// The prefab of this asset reference. Here for quick access. + /// + [CanBeNull] public GameObject Prefab => Assets.Get(Database, Id); #if UNITY_EDITOR diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index c7d5ebf2eb..7bcc0ca073 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -2,38 +2,38 @@ using Coimbra; using JetBrains.Annotations; using SS3D.Data.AssetDatabases; -using SS3D.Data.Enums; -using UnityEngine; using SS3D.Logging; using Object = UnityEngine.Object; namespace SS3D.Data { /// - /// Assets is used to load assets using enums or ints, with the addition of an enum generator for easy "id" of items. + /// A class to get specific assets on the project, without having to assign them on the inspector or hardcoding Resources.Load. + /// + /// A more concise and in depth explanation on how this system works and how to use is present on the GitBook page for AssetData. /// public static class Assets { /// - /// All loaded databases. + /// A dictionary of the loaded databases, useful to get the databases quickly with the name of it. /// private static readonly Dictionary Databases = new(); - // TODO: Find a way to automate the getters, this is a nightmare way of doing it. - /// - /// Generic getter, supports all databases and all asset database enums. + /// Returns an asset from a database casting the object found to TAsset. /// [CanBeNull] - public static TAsset Get(string databaseId, string assetId) where TAsset : Object + public static TAsset Get([NotNull] string databaseId, [NotNull] string assetId) + where TAsset : Object { return GetDatabase(databaseId).Get(assetId); } /// - /// Generic getter, supports all databases and all asset database enums. + /// Returns an asset from a database casting the object found to TAsset. /// - public static bool TryGet(string databaseId, string assetId, [CanBeNull] out TAsset asset) where TAsset : Object + public static bool TryGet([NotNull] string databaseId, [NotNull] string assetId, [CanBeNull] out TAsset asset) + where TAsset : Object { return GetDatabase(databaseId).TryGet(assetId, out asset); } @@ -57,22 +57,24 @@ public static void LoadAssetDatabases() } /// - /// Helper function to find a database in the database list. Used to link the enum to which database to find. + /// Helper function to find a database in the database dict. /// - /// The enum name used to identify which database to load. + /// The id used to identify which database to load. /// - public static AssetDatabase GetDatabase(string key) + [CanBeNull] + public static AssetDatabase GetDatabase([NotNull] string databaseId) { + // TODO: Move this to the new initialization flow. if (Databases.Count == 0) { LoadAssetDatabases(); } - bool databaseExists = Databases.TryGetValue(key, out AssetDatabase database); + bool databaseExists = Databases.TryGetValue(databaseId, out AssetDatabase database); if (!databaseExists) { - Log.Warning(typeof(Assets), "Database of type {key} not found", Logs.Important, key); + Log.Warning(typeof(Assets), $"Database of type {databaseId} not found", Logs.Important); } return database; diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs index 77aef8a057..76aa8fe328 100644 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -9,9 +9,9 @@ public static class AssetDatabases public static DatabaseAsset CraftingRecipes = new DatabaseAsset("CraftingRecipes", "AssetDatabases"); public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); + public static DatabaseAsset ParticlesEffects = new DatabaseAsset("ParticlesEffects", "AssetDatabases"); public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); public static DatabaseAsset WorldSpaceUI = new DatabaseAsset("WorldSpaceUI", "AssetDatabases"); - public static DatabaseAsset ParticlesEffects = new DatabaseAsset("ParticlesEffects", "AssetDatabases"); } } From a10965ab521e73f49f234bdc78efe764d8c355ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:37:35 -0300 Subject: [PATCH 17/32] Fix issues with naming --- .../CodeGeneration/Creators/DatabaseAssetCreator.cs | 12 +++++------- .../SS3D/CodeGeneration/Creators/EnumCreator.cs | 4 +++- .../CodeGeneration/Creators/StaticClassCreator.cs | 10 ++++------ .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 1 + .../Data/AssetDatabases/AssetDatabaseSettings.cs | 1 + 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs index 4d2d32f5d6..38a16f8b27 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/DatabaseAssetCreator.cs @@ -1,4 +1,5 @@ -using System; +using JetBrains.Annotations; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -6,18 +7,15 @@ using UnityEngine; using Object = UnityEngine.Object; -namespace SS3D.CodeGeneration +namespace SS3D.CodeGeneration.Creators { public static class DatabaseAssetCreator { #if UNITY_EDITOR /// - /// Creates an enum in the object path, with the defined enum name and using a list of provided assets as its elements. + /// Creates a list of database assets in the object path, with the defined class name and using a list of provided assets as its elements. /// - /// - /// - /// - public static void CreateAtPath(string path, Type classType, string className, IEnumerable assets, string namespaceName = "SS3D.Data.Enums") + public static void CreateAtPath(string path, Type classType, string className, [NotNull] IEnumerable assets, string namespaceName = "SS3D.Data.Generated") { IEnumerable enums = assets.Select(reference => reference.name); diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs index 04b9e8878e..2c7f198e50 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs @@ -4,7 +4,7 @@ using UnityEngine; using Object = UnityEngine.Object; -namespace SS3D.CodeGeneration +namespace SS3D.CodeGeneration.Creators { public static class EnumCreator { @@ -20,6 +20,8 @@ public static void CreateAtPath(string path, string enumName, IEnumerable enums = assets.Select(reference => reference.name); List enumerable = enums.ToList(); + + // Added to support the option to not select an enum. enumerable.Insert(0, "None"); string dataPath = Application.dataPath; diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs index d57ee11cd0..12b7727ee0 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using JetBrains.Annotations; +using System.Collections.Generic; using System.Linq; using UnityEditor; using UnityEngine; @@ -9,12 +10,9 @@ public static class StaticClassCreator { #if UNITY_EDITOR /// - /// Creates an enum in the object path, with the defined enum name and using a list of provided assets as its elements. + /// Creates an static class in the object path, with the defined class name and using a list of provided assets as its elements. /// - /// - /// - /// - public static void CreateAtPath(string path, string className, IEnumerable assets, string namespaceName = "SS3D.Data.Enums") + public static void CreateAtPath(string path, string className, [NotNull] IEnumerable assets, string namespaceName = "SS3D.Data.Enums") { IEnumerable enums = assets.Select(reference => reference.name); diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index 0c82b453b7..aa4747e1ec 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Object = UnityEngine.Object; using SS3D.CodeGeneration; +using SS3D.CodeGeneration.Creators; using UnityEditor; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index 5f24f11e36..87905ca7f8 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -2,6 +2,7 @@ using Coimbra; using SS3D.Attributes; using SS3D.CodeGeneration; +using SS3D.CodeGeneration.Creators; using UnityEngine; namespace SS3D.Data.AssetDatabases From 44fc2ba1aaf1a79a6e362601a553aac94d5869d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:35:48 -0300 Subject: [PATCH 18/32] Add automatic ids to Item prefabs, fix crafting system and input issues --- .../Data/Databases/CraftingRecipes.asset | 2 +- .../Data/Databases/InteractionIcons.asset | 2 +- .../Data/Databases/ParticlesEffects.asset | 2 +- Assets/Content/Data/Databases/Scenes.asset | 2 +- .../Content/Data/Databases/WorldSpaceUI.asset | 2 +- .../SS3D/Core/ApplicationInitializerSystem.cs | 1 - Assets/Scripts/SS3D/Core/LogManager.cs | 5 -- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 21 +++-- .../AssetDatabases/AssetDatabaseSettings.cs | 2 +- .../AssetDatabasesCodeGenerator.cs | 82 +++++++++++++++++++ .../AssetDatabasesCodeGenerator.cs.meta | 3 + .../Data/AssetDatabases/IWorldObjectAsset.cs | 7 ++ .../AssetDatabases/IWorldObjectAsset.cs.meta | 3 + .../AssetDatabaseInspectorEditor.cs | 6 +- .../AssetDatabaseSettingsInspectorEditor.cs | 48 +---------- .../WorldObjectAssetReference.cs | 8 ++ Assets/Scripts/SS3D/Data/Assets.cs | 2 +- .../SS3D/Data/Generated/AssetDatabases.cs | 2 +- .../Scripts/SS3D/Launcher/LauncherSystem.cs | 1 - .../Editor/EditorSceneUtils.cs | 1 - .../SceneManagement/Editor/SceneSwitcher.cs | 2 - .../Combat/Interactions/HitInteraction.cs | 2 - .../Systems/Crafting/CraftingInteraction.cs | 6 +- .../SS3D/Systems/Crafting/CraftingRecipe.cs | 4 - .../SS3D/Systems/Crafting/CraftingSystem.cs | 11 +-- Assets/Scripts/SS3D/Systems/Crafting/Slice.cs | 8 +- .../SS3D/Systems/Crafting/SliceInteraction.cs | 14 +--- .../Entities/Humanoid/HumanoidController.cs | 4 + .../Furniture/DispenseProductInteraction.cs | 4 +- .../Furniture/LockLockerInteraction.cs | 5 +- Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs | 3 - .../Furniture/UnlockLockerInteraction.cs | 5 +- .../SS3D/Systems/Furniture/VendingMachine.cs | 2 - .../SS3D/Systems/Health/BleedingBodyPart.cs | 2 - .../Commands/AddHandCommand.cs | 2 - .../Commands/ItemCommands/SpawnItemCommand.cs | 3 +- .../SS3D/Systems/Inputs/InputSystem.cs | 9 +- .../Inventory/Containers/AttachedContainer.cs | 1 + .../Containers/ContainerInteractive.cs | 2 - .../Inventory/Containers/HumanInventory.cs | 8 ++ .../Inventory/Interactions/DropInteraction.cs | 2 - .../Inventory/Interactions/OpenInteraction.cs | 2 - .../Interactions/PickupInteraction.cs | 4 +- .../Interactions/StoreInteraction.cs | 4 +- .../Interactions/TakeFirstInteraction.cs | 5 +- .../Interactions/ViewContainerInteraction.cs | 4 +- .../Items/Generic/HonkInteraction.cs | 4 +- .../Items/Generic/NukeDetonateInteraction.cs | 2 - .../SS3D/Systems/Inventory/Items/Item.cs | 36 +++++--- .../Systems/Inventory/Items/ItemSystem.cs | 6 +- Assets/Scripts/SS3D/Systems/Roles/RoleData.cs | 2 - .../Scripts/SS3D/Systems/Roles/RoleLoadout.cs | 2 - .../Scripts/SS3D/Systems/Roles/RoleSystem.cs | 2 - .../Framework/Helpers/TestHelpers.cs | 2 +- Assets/Settings/AssetDatabaseSettings.asset | 2 +- 55 files changed, 200 insertions(+), 178 deletions(-) create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs create mode 100644 Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs.meta diff --git a/Assets/Content/Data/Databases/CraftingRecipes.asset b/Assets/Content/Data/Databases/CraftingRecipes.asset index edec45cd76..88d8a1cbc6 100644 --- a/Assets/Content/Data/Databases/CraftingRecipes.asset +++ b/Assets/Content/Data/Databases/CraftingRecipes.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: CraftingRecipes m_EditorClassIdentifier: - EnumName: CraftingRecipes + DatabaseName: CraftingRecipes AssetGroup: {fileID: 11400000, guid: ead2cce9e35a7304ab5b8cc67d03347b, type: 2} Assets: _list: diff --git a/Assets/Content/Data/Databases/InteractionIcons.asset b/Assets/Content/Data/Databases/InteractionIcons.asset index 1f8a1eff10..24c1c443b9 100644 --- a/Assets/Content/Data/Databases/InteractionIcons.asset +++ b/Assets/Content/Data/Databases/InteractionIcons.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: InteractionIcons m_EditorClassIdentifier: - EnumName: InteractionIcons + DatabaseName: InteractionIcons AssetGroup: {fileID: 11400000, guid: 43f5c5834bd38014f9dbacb0f51bcc54, type: 2} Assets: _list: diff --git a/Assets/Content/Data/Databases/ParticlesEffects.asset b/Assets/Content/Data/Databases/ParticlesEffects.asset index e6d6fac333..8cf48e8ce0 100644 --- a/Assets/Content/Data/Databases/ParticlesEffects.asset +++ b/Assets/Content/Data/Databases/ParticlesEffects.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: ParticlesEffects m_EditorClassIdentifier: - EnumName: ParticlesEffects + DatabaseName: ParticlesEffects AssetGroup: {fileID: 11400000, guid: d700978032e12a647b8734863a0bf7c2, type: 2} Assets: _list: diff --git a/Assets/Content/Data/Databases/Scenes.asset b/Assets/Content/Data/Databases/Scenes.asset index d00a17a986..91ec55369f 100644 --- a/Assets/Content/Data/Databases/Scenes.asset +++ b/Assets/Content/Data/Databases/Scenes.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Scenes m_EditorClassIdentifier: - EnumName: Scenes + DatabaseName: Scenes AssetGroup: {fileID: 11400000, guid: bacca0c47905ef441803065410c8978e, type: 2} Assets: _list: diff --git a/Assets/Content/Data/Databases/WorldSpaceUI.asset b/Assets/Content/Data/Databases/WorldSpaceUI.asset index 55a931abd3..bb5ead4974 100644 --- a/Assets/Content/Data/Databases/WorldSpaceUI.asset +++ b/Assets/Content/Data/Databases/WorldSpaceUI.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: WorldSpaceUI m_EditorClassIdentifier: - EnumName: WorldSpaceUI + DatabaseName: WorldSpaceUI AssetGroup: {fileID: 11400000, guid: dd394b793b56e43418a2c11a61130663, type: 2} Assets: _list: diff --git a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs index ba3e49ca61..be7fea77b0 100644 --- a/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs +++ b/Assets/Scripts/SS3D/Core/ApplicationInitializerSystem.cs @@ -4,7 +4,6 @@ using SS3D.Core.Settings; using SS3D.Core.Utils; using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Data.Management; using SS3D.Logging; diff --git a/Assets/Scripts/SS3D/Core/LogManager.cs b/Assets/Scripts/SS3D/Core/LogManager.cs index 25c9904e35..edb0793c54 100644 --- a/Assets/Scripts/SS3D/Core/LogManager.cs +++ b/Assets/Scripts/SS3D/Core/LogManager.cs @@ -1,18 +1,13 @@ using Coimbra; -using Coimbra.Services.Events; using Serilog; using Serilog.Sinks.Unity3D; using Serilog.Events; using Serilog.Formatting.Compact; using UnityEngine; using FishNet; -using SS3D.Core.Events; using System; using SS3D.Logging.LogSettings; using SS3D.Logging; -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; using Log = Serilog.Log; diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index aa4747e1ec..d1530b58e5 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -1,11 +1,14 @@ using Coimbra; using JetBrains.Annotations; +using Serilog; using System.Collections.Generic; using Object = UnityEngine.Object; using SS3D.CodeGeneration; using SS3D.CodeGeneration.Creators; +using System.Linq; using UnityEditor; using UnityEngine; +using UnityEngine.Serialization; #if UNITY_EDITOR using UnityEditor.AddressableAssets.Settings; @@ -33,7 +36,8 @@ public sealed class AssetDatabase : ScriptableObject /// /// The name that the generated enum will have; /// - public string EnumName; + [FormerlySerializedAs("EnumName")] + public string DatabaseName; #if UNITY_EDITOR /// @@ -66,8 +70,6 @@ public void LoadAssetsFromAssetGroup() /// /// Gets an asset based on its ID (index). - /// - /// WARNING: Not sure how /// /// Uses the ID of the asset cast into a int to get the asset from a list position. /// The type of asset to get. @@ -76,7 +78,16 @@ public void LoadAssetsFromAssetGroup() public T Get([NotNull] string id) where T : Object { - Assets.TryGetValue(id, out Object asset); + if (!Assets.TryGetValue(id, out Object asset)) + { + Log.Error($"{nameof(AssetDatabase)} Asset of {id} is not found on the {DatabaseName} database."); + return null; + } + + if (typeof(T) != typeof(GameObject) && asset is GameObject gameObject) + { + return gameObject.GetComponent(); + } return asset as T; } @@ -134,7 +145,7 @@ public void GenerateDatabaseCode() return; } - DatabaseAssetCreator.CreateAtPath(EnumPath, typeof(DatabaseAsset), EnumName, Assets.Values, EnumNamespaceName); + DatabaseAssetCreator.CreateAtPath(EnumPath, typeof(DatabaseAsset), DatabaseName, Assets.Values, EnumNamespaceName); } #endif } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index 87905ca7f8..973dfb8cd4 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -32,7 +32,7 @@ public sealed class AssetDatabaseSettings : ScriptableSettings /// /// Generates the script with the data from this database. /// - public void GenerateCode() + public void CreateDatabaseCode() { if (SkipCodeGeneration) { diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs new file mode 100644 index 0000000000..fd0f150457 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -0,0 +1,82 @@ +using Coimbra; +using Serilog; +using System.Collections.Generic; +using UnityEngine; + +namespace SS3D.Data.AssetDatabases +{ + public static class AssetDatabasesCodeGenerator + { + private const string WorldObjectAssetPath = "Assets/Content/Data/WorldObjectAssetReferences/"; + + /// + /// Generates all the code needed for the asset data system to work. + /// + public static void GenerateAssetDatabasesCode() + { + AssetDatabaseSettings settings = ScriptableSettings.GetOrFind(); + + if (settings == null) + { + Log.Error($"{nameof(AssetDatabasesCodeGenerator)} - Asset database settings has not be found"); + return; + } + + if (settings.IncludedAssetDatabases == null || settings.IncludedAssetDatabases.Count == 0) + { + Log.Error($"{nameof(AssetDatabasesCodeGenerator)} - No Databases have been found"); + return; + } + + settings.CreateDatabaseCode(); + + foreach (AssetDatabase includedAssetDatabase in settings.IncludedAssetDatabases) + { + CreateDatabaseCode(includedAssetDatabase); + CreateWorldObjectReferences(includedAssetDatabase); + } + } + + private static void CreateDatabaseCode(AssetDatabase includedAssetDatabase) + { + includedAssetDatabase.GenerateDatabaseCode(); + } + + private static void CreateWorldObjectReferences(AssetDatabase includedAssetDatabase) + { + List worldObjectAssetsToDestroy = new List(); + + foreach (Object asset in includedAssetDatabase.Assets.Values) + { + if (asset is not GameObject gameObject) + { + continue; + } + + WorldObjectAssetReference worldObjectAssetReference = ScriptableObject.CreateInstance(); + + worldObjectAssetReference.Id = gameObject.name; + worldObjectAssetReference.Database = includedAssetDatabase.name; + + if (!UnityEditor.AssetDatabase.Contains(worldObjectAssetReference)) + { + UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset"); + + if (gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) + { + worldObjectAsset.Asset = worldObjectAssetReference; + } + } + else + { + worldObjectAssetsToDestroy.Add(worldObjectAssetReference); + } + } + + foreach (Object asset in worldObjectAssetsToDestroy) + { + Object.DestroyImmediate(asset); + } + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs.meta b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs.meta new file mode 100644 index 0000000000..93e35bd48a --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 419a0231f3fa47e69f46c2c3fdb3a3cb +timeCreated: 1699292054 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs new file mode 100644 index 0000000000..a61bd5552a --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs @@ -0,0 +1,7 @@ +namespace SS3D.Data.AssetDatabases +{ + public interface IWorldObjectAsset + { + public WorldObjectAssetReference Asset { get; set; } + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs.meta b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs.meta new file mode 100644 index 0000000000..ffab4ea192 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8f296c58454a46a6914886f116ce8345 +timeCreated: 1699291555 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs index 848d309300..36b3535e94 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseInspectorEditor.cs @@ -34,7 +34,7 @@ private void OnValidate() { if (_enumNameTextField != null) { - _assetDatabase.EnumName = _enumNameTextField.value; + _assetDatabase.DatabaseName = _enumNameTextField.value; } if (_assetGroupObjectField != null) @@ -65,7 +65,7 @@ public override VisualElement CreateInspectorGUI() _assetsListView = root.Q("assets-list"); _assetDatabaseLabel.text = $"{_assetDatabase.name} ASSET DATABASE"; - _enumNameTextField.value = _assetDatabase.EnumName; + _enumNameTextField.value = _assetDatabase.DatabaseName; _assetGroupObjectField.value = _assetDatabase.AssetGroup; _assetDatabase.LoadAssetsFromAssetGroup(); @@ -94,7 +94,7 @@ public override VisualElement CreateInspectorGUI() private void HandleLoadAssetsButtonPressed() { - _assetDatabase.EnumName = _enumNameTextField.value; + _assetDatabase.DatabaseName = _enumNameTextField.value; _assetDatabase.AssetGroup = _assetGroupObjectField.value as AddressableAssetGroup; _assetDatabase.LoadAssetsFromAssetGroup(); diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index 67f04b37a6..ffe1ee150a 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -1,9 +1,6 @@ #if UNITY_EDITOR -using SS3D.CodeGeneration; -using System; using System.Collections.Generic; using UnityEditor; -using UnityEditor.AddressableAssets.Settings; using UnityEditor.UIElements; using UnityEngine; using UnityEngine.UIElements; @@ -88,51 +85,12 @@ private void FindAndLoadAllAssetsDatabasesAddressablesGroups() assetDatabase.LoadAssetsFromAssetGroup(); } - CreateAssetDatabasesEnum(); + GenerateAssetDatabasesCode(); } - private void CreateAssetDatabasesEnum() + private void GenerateAssetDatabasesCode() { - if (_assetDatabaseSettings == null) - { - return; - } - - if (_assetDatabaseSettings.IncludedAssetDatabases == null || _assetDatabaseSettings.IncludedAssetDatabases.Count == 0) - { - return; - } - - _assetDatabaseSettings.GenerateCode(); - - foreach (AssetDatabase includedAssetDatabase in _assetDatabaseSettings.IncludedAssetDatabases) - { - includedAssetDatabase.GenerateDatabaseCode(); - - string path = "Assets/Content/Data/WorldObjectAssetReferences/"; - - foreach (Object asset in includedAssetDatabase.Assets.Values) - { - if (asset is not GameObject) - { - continue; - } - - WorldObjectAssetReference worldObjectAssetReference = CreateInstance(); - - worldObjectAssetReference.Id = asset.name; - worldObjectAssetReference.Database = includedAssetDatabase.name; - - if (!UnityEditor.AssetDatabase.Contains(worldObjectAssetReference)) - { - UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{path}{worldObjectAssetReference.Id}.asset"); - } - else - { - Destroy(worldObjectAssetReference); - } - } - } + AssetDatabasesCodeGenerator.GenerateAssetDatabasesCode(); } private void UpdateListVisuals() diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs index baae1e24f5..c5046c4129 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs @@ -1,5 +1,6 @@ using JetBrains.Annotations; using SS3D.Attributes; +using UnityEditor.VersionControl; using UnityEngine; namespace SS3D.Data.AssetDatabases @@ -16,6 +17,13 @@ public sealed class WorldObjectAssetReference : ScriptableObject [CanBeNull] public GameObject Prefab => Assets.Get(Database, Id); + /// + /// Short access to the database asset. + /// + public DatabaseAsset Asset => new DatabaseAsset(Id, Database); + + public T Get() where T : Object => Asset.Get(); + #if UNITY_EDITOR [ReadOnly] #endif diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index 7bcc0ca073..bc9fface48 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -50,7 +50,7 @@ public static void LoadAssetDatabases() for (int index = 0; index < assetDatabases.Count; index++) { AssetDatabase database = assetDatabases[index]; - Databases.Add(database.EnumName, database); + Databases.Add(database.DatabaseName, database); } Log.Information(typeof(Assets), "{assetDatabasesCount} Asset Databases initialized", Logs.Important, assetDatabases.Count); diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs index 76aa8fe328..1bcc7a3394 100644 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -1,6 +1,6 @@ using SS3D.Data.AssetDatabases ; -namespace SS3D.Data.Enums +namespace SS3D.Data.Generated { // This class is autogenerated. Do not modify manually. public static class AssetDatabases diff --git a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs index 6c69a69cfb..6983927af0 100644 --- a/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs +++ b/Assets/Scripts/SS3D/Launcher/LauncherSystem.cs @@ -1,6 +1,5 @@ using Coimbra; using SS3D.Core.Settings; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.SceneManagement; using System; diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs index 514b53ba44..faf44e2cf6 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/EditorSceneUtils.cs @@ -1,5 +1,4 @@ #if UNITY_EDITOR -using SS3D.Data.Enums; using UnityEditor; using UnityEditor.SceneManagement; using UnityEngine; diff --git a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs index 5fb4564aaa..33567719ac 100644 --- a/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs +++ b/Assets/Scripts/SS3D/SceneManagement/Editor/SceneSwitcher.cs @@ -1,6 +1,4 @@ #if UNITY_EDITOR -using SS3D.Data.Enums; -using System; using UnityEditor; using UnityEngine; using UnityToolbarExtender; diff --git a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs index 06a4fd4c6e..395e39bea2 100644 --- a/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Combat/Interactions/HitInteraction.cs @@ -5,8 +5,6 @@ using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Entities; using SS3D.Systems.Health; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; namespace SS3D.Systems.Combat.Interactions diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs index b539864ee7..34562d25e7 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingInteraction.cs @@ -1,15 +1,11 @@ -using Cysharp.Threading.Tasks; -using FishNet.Object; +using FishNet.Object; using SS3D.Core; -using SS3D.Data.Enums; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Logging; -using SS3D.Substances; using SS3D.Systems.Inventory.Items; using System.Collections.Generic; using System.Linq; -using UnityEngine; namespace SS3D.Systems.Crafting { diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs index 7fd4be07a4..c8b179c07e 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingRecipe.cs @@ -1,10 +1,6 @@ using Coimbra; using SS3D.Data.AssetDatabases; -using SS3D.Data.Enums; using SS3D.Systems.Inventory.Items; -using SS3D.Utils; -using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs index f57609fb1b..413e2295e4 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs @@ -1,16 +1,11 @@ using FishNet; using FishNet.Object; -using JetBrains.Annotations; using SS3D.Core.Behaviours; using SS3D.Data; using SS3D.Data.AssetDatabases; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; -using SS3D.Logging.LogSettings; -using SS3D.Substances; using SS3D.Systems.Inventory.Items; -using SS3D.Systems.Roles; -using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -60,7 +55,7 @@ private void FillRecipeOrganiser() public bool TryGetRecipe(Interaction craftingInteraction, Item target, out CraftingRecipe recipe) { - if (!_recipeOrganiser.TryGetValue(target, out Dictionary dic)) + if (!_recipeOrganiser.TryGetValue(target.Prefab, out Dictionary dic)) { recipe = null; @@ -99,7 +94,7 @@ public void Craft(Item target, List itemToConsume, List result) foreach (Item id in result) { - GameObject itemResult = Assets.Get(AssetDatabases.Items, id.Name); + GameObject itemResult = id.Prefab.GameObject; GameObject product = Instantiate(itemResult, target.Position, target.Rotation); InstanceFinder.ServerManager.Spawn(product); } diff --git a/Assets/Scripts/SS3D/Systems/Crafting/Slice.cs b/Assets/Scripts/SS3D/Systems/Crafting/Slice.cs index 0de5ab68f1..53af211ec5 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/Slice.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/Slice.cs @@ -1,9 +1,7 @@ -using SS3D.Interactions; +using Serilog; +using SS3D.Interactions; +using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; -using SS3D.Systems.Combat.Interactions; -using SS3D.Systems.Crafting; -using SS3D.Systems.Entities; -using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs b/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs index 9cc9f6f01f..263c193b97 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/SliceInteraction.cs @@ -1,20 +1,8 @@ -using Cysharp.Threading.Tasks.Triggers; -using FishNet.Object; -using SS3D.Core; -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; -using SS3D.Logging; -using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; using UnityEngine; -using static UnityEngine.GraphicsBuffer; namespace SS3D.Systems.Crafting { diff --git a/Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidController.cs b/Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidController.cs index 55f877f8ae..146f2606b5 100644 --- a/Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidController.cs +++ b/Assets/Scripts/SS3D/Systems/Entities/Humanoid/HumanoidController.cs @@ -69,11 +69,15 @@ protected void Setup() { _camera = Subsystems.Get().PlayerCamera; _entity.OnMindChanged += HandleControllingPlayerChanged; + _inputSystem = Subsystems.Get(); + Controls controls = _inputSystem.Inputs; + MovementControls = controls.Movement; HotkeysControls = controls.Hotkeys; MovementControls.ToggleRun.performed += HandleToggleRun; + _inputSystem.ToggleActionMap(MovementControls, true); _inputSystem.ToggleActionMap(HotkeysControls, true); diff --git a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs index e3a1fdf40a..88c3a0d559 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/DispenseProductInteraction.cs @@ -1,6 +1,4 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs index 790d6925f0..e758e59ae1 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/LockLockerInteraction.cs @@ -1,13 +1,10 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; using SS3D.Logging; using SS3D.Systems.Furniture; using SS3D.Systems.Inventory.Containers; -using SS3D.Systems.Inventory.Items; using System; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs index 1d05be538e..e1af32a2f8 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/Nuke.cs @@ -2,12 +2,9 @@ using SS3D.Interactions.Interfaces; using FishNet.Object; using SS3D.Core; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Systems.Gamemodes; using SS3D.Systems.Inventory.Items.Generic; -using UnityEngine; namespace SS3D.Systems.Furniture { diff --git a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs index b69dd2fa7e..2f355c6a94 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/UnlockLockerInteraction.cs @@ -1,13 +1,10 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; using SS3D.Logging; using SS3D.Systems.Furniture; using SS3D.Systems.Inventory.Containers; -using SS3D.Systems.Inventory.Items; using System; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs index 53e4791743..dfd789f889 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/VendingMachine.cs @@ -1,7 +1,5 @@ using FishNet.Object; using SS3D.Core; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs b/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs index 63c9027229..8d22bc0848 100644 --- a/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs +++ b/Assets/Scripts/SS3D/Systems/Health/BleedingBodyPart.cs @@ -1,7 +1,5 @@ using FishNet.Object; using FishNet.Object.Synchronizing; -using SS3D.Data.Enums; -using SS3D.Data; using UnityEngine; using Coimbra; using SS3D.Data.Generated; diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs index 7f983eee8e..b62a4b5f9d 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs @@ -3,8 +3,6 @@ using SS3D.Systems.PlayerControl; using UnityEngine; using FishNet; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Systems.Inventory.Containers; using FishNet.Connection; using SS3D.Permissions; diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs index 990dd40681..dcf2ae3029 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/ItemCommands/SpawnItemCommand.cs @@ -1,11 +1,10 @@ using FishNet.Connection; using SS3D.Core; using SS3D.Data; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Permissions; using SS3D.Systems.Entities; using SS3D.Systems.Inventory.Items; -using SS3D.Utils; using UnityEngine; namespace SS3D.Systems.IngameConsoleSystem.Commands.ItemCommands diff --git a/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs b/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs index 314546470a..4300b6bd1b 100644 --- a/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs @@ -11,7 +11,9 @@ namespace SS3D.Systems.Inputs public class InputSystem : SS3D.Core.Behaviours.System { public Controls Inputs { get; private set; } + public float MouseSensitivity { get; private set; } + private Dictionary _actionDisables; protected override void OnAwake() @@ -22,20 +24,22 @@ protected override void OnAwake() MouseSensitivity = 0.001f; Inputs = new Controls(); + _actionDisables = new(); foreach (InputAction action in Inputs) { _actionDisables.Add(action, 1); } + ToggleActionMap(Inputs.Other, true); } + /// /// Substract one set of actions from another /// /// /// /// - private InputAction[] Exclude(InputAction[] actions, InputAction[] exclude) { if (exclude == null) @@ -47,12 +51,12 @@ private InputAction[] Exclude(InputAction[] actions, InputAction[] exclude) return actions.Where(x => !exclude.Contains(x)).ToArray(); } } + /// /// Set actions to enabled or disabled. If ToggleAction(actions, true) was called less then ToggleAction(actions, false), the actions stay disabled /// /// /// True - enable, false - disable - public void ToggleActions(InputAction[] actions, bool isEnable) { foreach (InputAction action in actions) @@ -175,6 +179,7 @@ public void ToggleCollisions(InputAction[] actions, bool isEnable, InputAction[] } } } + ToggleActions(Exclude(collisions.ToArray(), exclude), isEnable); } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/AttachedContainer.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/AttachedContainer.cs index 124eff5270..f73e6c6fc2 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/AttachedContainer.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/AttachedContainer.cs @@ -192,6 +192,7 @@ protected override void OnEnabled() return; } var inventory = GetComponentInParent(); + if (inventory != null) { inventory.TryAddContainer(this); diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs index f9085f0eb6..948c090ee5 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ContainerInteractive.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using SS3D.Data; using SS3D.Interactions; using SS3D.Interactions.Interfaces; using SS3D.Systems.Inventory.Interactions; using SS3D.Systems.Inventory.Items; using UnityEngine; -using SS3D.Data.Enums; using SS3D.Data.Generated; namespace SS3D.Systems.Inventory.Containers diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs index 19d1cca77d..f96417b341 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/HumanInventory.cs @@ -132,6 +132,14 @@ public override void OnStartClient() } public void TriggerInventorySetup() + { + OnInventorySetUp?.Invoke(); + + RpcInventorySetup(); + } + + [ObserversRpc] + private void RpcInventorySetup() { OnInventorySetUp?.Invoke(); } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs index 51ee8b4913..57c3409036 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/DropInteraction.cs @@ -1,6 +1,4 @@ using System; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs index 08194efc43..9f3e16cd9a 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/OpenInteraction.cs @@ -1,6 +1,4 @@ using System; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs index 887b8f8901..e27b439253 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/PickupInteraction.cs @@ -1,10 +1,8 @@ -using SS3D.Data; -using SS3D.Interactions; +using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; using SS3D.Systems.GameModes.Events; using UnityEngine; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs index 2158285b83..d4392356c2 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/StoreInteraction.cs @@ -1,6 +1,4 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs index 4e30fa6c4c..c818359b6a 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/TakeFirstInteraction.cs @@ -1,13 +1,10 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; using System.Linq; using UnityEngine; -using UnityEngine.UI; namespace SS3D.Systems.Inventory.Interactions { diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs index 31662948aa..a2ae57681b 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Interactions/ViewContainerInteraction.cs @@ -1,6 +1,4 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Systems.Entities; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs index 1f9a014e78..98be8c7f91 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/HonkInteraction.cs @@ -1,6 +1,4 @@ -using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Data.Generated; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs index 2f0688e04a..4f97d9da03 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/NukeDetonateInteraction.cs @@ -1,6 +1,4 @@ using SS3D.Core; -using SS3D.Data; -using SS3D.Data.Enums; using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Extensions; diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs index 48fa0c01fd..75020bcabb 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs @@ -6,18 +6,17 @@ using FishNet.Object; using FishNet.Object.Synchronizing; using SS3D.Attributes; -using SS3D.Data.Enums; +using SS3D.Data.AssetDatabases; using SS3D.Interactions; using SS3D.Interactions.Interfaces; using SS3D.Logging; using SS3D.Systems.Examine; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Interactions; -using SS3D.Systems.Selection; -using SS3D.Utils; using UnityEditor; using UnityEngine; using UnityEngine.Serialization; +using AssetDatabase = UnityEditor.AssetDatabase; #if UNITY_EDITOR #endif @@ -32,11 +31,17 @@ namespace SS3D.Systems.Inventory.Items [RequireComponent(typeof(NetworkTransform))] [RequireComponent(typeof(Selectable))] [RequiredLayer("Items")] - public class Item : InteractionSource, IInteractionTarget + public class Item : InteractionSource, IInteractionTarget, IWorldObjectAsset { + [SerializeField] +#if UNITY_EDITOR + [ReadOnly] + [Header("This field is filled automatically by the AssetData system.")] +#endif + private WorldObjectAssetReference _asset; + #region Item [Header("Item settings")] - [FormerlySerializedAs("Name")] [SerializeField] private string _name; @@ -68,13 +73,28 @@ public class Item : InteractionSource, IInteractionTarget private AttachedContainer _container; public string Name => _name; - public string ItemId { get; set; } + public ReadOnlyCollection Traits => ((List) _traits.Collection).AsReadOnly(); public AttachedContainer Container => _container; private bool _initialised = false; + public WorldObjectAssetReference Asset + { + get => _asset; + set + { + if (Application.isPlaying) + { + Serilog.Log.Warning($"Field {nameof(Asset)} is being modified in runtime. This should not happen in normal conditions."); + } + _asset = value; + } + } + + public Item Prefab => Asset.Get(); + /// /// Initialise this item fields. Can only be called once. /// @@ -114,10 +134,6 @@ protected override void OnStart() { _rigidbody.isKinematic = true; } - - string itemName = gameObject.name.Split('(')[0]; - - ItemId = itemName; } public override void OnStartServer() diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs index 695d3dc752..7b112bf2be 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/ItemSystem.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using FishNet.Object; +using FishNet.Object; using SS3D.Core.Behaviours; using SS3D.Data; -using SS3D.Data.AssetDatabases; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Logging; using SS3D.Systems.Entities; using SS3D.Systems.Inventory.Containers; diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs index d3ed3f1489..536db3a790 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleData.cs @@ -1,6 +1,4 @@ -using SS3D.Data.Enums; using System; -using System.Collections; using System.Collections.Generic; using UnityEngine; diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs index 248999b258..8e3320f079 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleLoadout.cs @@ -1,7 +1,5 @@ using Coimbra; -using SS3D.Data.Enums; using SS3D.Systems.Inventory.Containers; -using System.Collections.Generic; using UnityEngine; using UnityEngine.Serialization; diff --git a/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs b/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs index c2a3f91b0c..6261e8265f 100644 --- a/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs @@ -2,7 +2,6 @@ using SS3D.Core.Behaviours; using SS3D.Systems.PlayerControl; using UnityEngine; -using SS3D.Systems.Entities.Events; using Coimbra.Services.Events; using SS3D.Systems.PlayerControl.Events; using SS3D.Logging; @@ -12,7 +11,6 @@ using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Items; using SS3D.Core; -using SS3D.Data.Enums; using SS3D.Systems.Inventory.Items.Generic; namespace SS3D.Systems.Roles diff --git a/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs b/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs index c514f6eaa3..17b00e2015 100644 --- a/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs +++ b/Assets/Scripts/Tests/Play Mode/Framework/Helpers/TestHelpers.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using SS3D.Core; using SS3D.Data; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Systems.Entities; using SS3D.Systems.Interactions; using SS3D.Systems.Inventory.Containers; diff --git a/Assets/Settings/AssetDatabaseSettings.asset b/Assets/Settings/AssetDatabaseSettings.asset index 17bd8cc34e..969e5a491c 100644 --- a/Assets/Settings/AssetDatabaseSettings.asset +++ b/Assets/Settings/AssetDatabaseSettings.asset @@ -19,7 +19,7 @@ MonoBehaviour: - {fileID: 11400000, guid: c8a3b9b514b2f7543a544259c3c97b81, type: 2} - {fileID: 11400000, guid: cdf9511d9049fa14ab0433934f3537ec, type: 2} - {fileID: 11400000, guid: c2644d7b34e956743a0bc485e7ca5e37, type: 2} + - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} - {fileID: 11400000, guid: 3fc0db940ed0bd14cb905a5e15dd32fe, type: 2} - {fileID: 11400000, guid: 830650063081cdf4d90087fc2ac74d24, type: 2} - - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} _skipCodeGeneration: 0 From 2d27686bc55f03d3a678a45fef8ac39bb0659f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:12:51 -0300 Subject: [PATCH 19/32] Add more documentation --- .../AssetDatabasesCodeGenerator.cs | 54 ++++++++++++++----- .../Data/AssetDatabases/IWorldObjectAsset.cs | 7 +++ .../WorldObjectAssetReference.cs | 7 ++- 3 files changed, 53 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index fd0f150457..7224d1cf78 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -1,12 +1,19 @@ using Coimbra; +using JetBrains.Annotations; using Serilog; using System.Collections.Generic; using UnityEngine; namespace SS3D.Data.AssetDatabases { + /// + /// Calls all the methods for generating code for the AssetData system. + /// public static class AssetDatabasesCodeGenerator { + /// + /// The path in the project where to put the WorldObjectAssetReference assets. + /// private const string WorldObjectAssetPath = "Assets/Content/Data/WorldObjectAssetReferences/"; /// @@ -33,39 +40,37 @@ public static void GenerateAssetDatabasesCode() foreach (AssetDatabase includedAssetDatabase in settings.IncludedAssetDatabases) { CreateDatabaseCode(includedAssetDatabase); - CreateWorldObjectReferences(includedAssetDatabase); + CreateWorldObjectAssetReferences(includedAssetDatabase); } } - private static void CreateDatabaseCode(AssetDatabase includedAssetDatabase) + /// + /// Calls the method to generate all the code for a database. + /// + private static void CreateDatabaseCode(AssetDatabase assetDatabase) { - includedAssetDatabase.GenerateDatabaseCode(); + assetDatabase.GenerateDatabaseCode(); } - private static void CreateWorldObjectReferences(AssetDatabase includedAssetDatabase) + /// + /// Creates all the WorldObjectAssetReferences for a database. + /// + private static void CreateWorldObjectAssetReferences(AssetDatabase assetDatabase) { List worldObjectAssetsToDestroy = new List(); - foreach (Object asset in includedAssetDatabase.Assets.Values) + foreach (Object asset in assetDatabase.Assets.Values) { if (asset is not GameObject gameObject) { continue; } - WorldObjectAssetReference worldObjectAssetReference = ScriptableObject.CreateInstance(); - - worldObjectAssetReference.Id = gameObject.name; - worldObjectAssetReference.Database = includedAssetDatabase.name; + WorldObjectAssetReference worldObjectAssetReference = CreateWorldObjectAssetReference(gameObject, assetDatabase.DatabaseName); if (!UnityEditor.AssetDatabase.Contains(worldObjectAssetReference)) { UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset"); - - if (gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) - { - worldObjectAsset.Asset = worldObjectAssetReference; - } } else { @@ -78,5 +83,26 @@ private static void CreateWorldObjectReferences(AssetDatabase includedAssetDatab Object.DestroyImmediate(asset); } } + + /// + /// Creates the WorldObjectAssetReference asset in the correct path. + /// + /// The asset to include in this WorldObjectAsset. + /// The related database. + [NotNull] + private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObject gameObject, string assetDatabaseName) + { + WorldObjectAssetReference worldObjectAssetReference = ScriptableObject.CreateInstance(); + + worldObjectAssetReference.Id = gameObject.name; + worldObjectAssetReference.Database = assetDatabaseName; + + if (gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) + { + worldObjectAsset.Asset = worldObjectAssetReference; + } + + return worldObjectAssetReference; + } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs index a61bd5552a..edd0f96bcb 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/IWorldObjectAsset.cs @@ -1,7 +1,14 @@ namespace SS3D.Data.AssetDatabases { + /// + /// Interface used to implement methods and fields for WorldObjectAssets. + /// public interface IWorldObjectAsset { + /// + /// The reference to the WorldObjectAssetReference asset, which is a way to identify which asset this is without in a more automated manner. + /// This field is setup by the AssetData system automatically when its implemented on a class. + /// public WorldObjectAssetReference Asset { get; set; } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs index c5046c4129..06675cda16 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs @@ -15,13 +15,18 @@ public sealed class WorldObjectAssetReference : ScriptableObject /// The prefab of this asset reference. Here for quick access. /// [CanBeNull] - public GameObject Prefab => Assets.Get(Database, Id); + public GameObject Prefab => Asset.Get(); /// /// Short access to the database asset. /// public DatabaseAsset Asset => new DatabaseAsset(Id, Database); + /// + /// Short access to the Assets.Get function. + /// + /// + /// public T Get() where T : Object => Asset.Get(); #if UNITY_EDITOR From 943d38b5f8f00d9d58fa5d94a3c24617b637e13d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:15:40 -0300 Subject: [PATCH 20/32] Set prefabs as dirty when the _asset field is changed --- .../Food/Drinks/Soda/SodaCanBeepsSoda.prefab | 8 +++++ .../Food/Drinks/Soda/SodaCanBeepyLime.prefab | 8 +++++ .../Food/Drinks/Soda/SodaCanCannedAir.prefab | 6 +++- .../Drinks/Soda/SodaCanCannedLaughter.prefab | 8 +++++ .../Food/Drinks/Soda/SodaCanCola.prefab | 8 +++++ .../Drinks/Soda/SodaCanDukePurpleTea.prefab | 8 +++++ .../Food/Drinks/Soda/SodaCanTonic.prefab | 8 +++++ .../Food/General/Snacks/DonkPocket.prefab | 17 ++++++++--- .../Items/Functional/Generic/Boombox.prefab | 22 ++++++++++---- .../Functional/Generic/GreyFloorTile.prefab | 22 ++++++++++---- .../Items/Functional/Generic/Poster.prefab | 22 ++++++++++---- .../Materials/SteelReinforcedSheet.prefab | 22 ++++++++++---- .../Functional/Materials/SteelSheet.prefab | 22 ++++++++++---- .../Objects/ToolBoxes/ToolboxBlue.prefab | 29 ++++++++++++++----- .../Functional/Storage/Substances/Mug.prefab | 17 ++++++++--- .../Tools/Generic/FlashlightBlue.prefab | 22 ++++++++++---- .../Tools/Kitchen/KitchenKnife.prefab | 3 +- .../AssetDatabasesCodeGenerator.cs | 4 +++ .../AssetDatabaseSettingsInspectorEditor.cs | 4 +-- .../Interactions/ClientDelayedInteraction.cs | 3 ++ 20 files changed, 207 insertions(+), 56 deletions(-) diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab index 29ca1c5c8b..eda8d3cb6d 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 5f9d538d2b1db574ea0d87ef391eb3fd, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -51,6 +55,10 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 120 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 12829936571484541858 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab index 62df9e866a..e0dc4be77f 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 32223a760be2a824aa5fe5ba38b81e9e, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -55,6 +59,10 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: 1392182379186180254, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 26 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 2862032139539963558 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab index 161c024be8..c1e865bd4c 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: b6457d4f679c9014c8af88872826df10, type: 2} - target: {fileID: -1409642175327164469, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: InitialSubstances.Array.size value: 0 @@ -61,7 +65,7 @@ PrefabInstance: objectReference: {fileID: 5134585307755180686, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField - value: 41 + value: 124 objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab index 60e53213d7..e426ee766b 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 787272db3e832a24eb2b074df1271ae4, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -55,6 +59,10 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: -2423680911938410841, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 88 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 9457341756661644240 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab index 872ac36482..5b5d325c0e 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 1b698689146838645971fa10136cae55, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -55,6 +59,10 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: 614562282549397130, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 15 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 1830246343056172680 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab index a2cf1212e7..4e4a3d87a4 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 4acff5047a23ca546892f6983df848da, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -55,6 +59,10 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: 8420070316573550880, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 4 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 368408746806542760 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab index 2c63500191..8bfb687b86 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab @@ -7,6 +7,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: _asset + value: + objectReference: {fileID: 11400000, guid: 68230819a8f6057499c06f75715ae067, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 @@ -55,6 +59,10 @@ PrefabInstance: propertyPath: m_Mesh value: objectReference: {fileID: 526700187579002054, guid: c1169b60804c0aa41bb17b72ba87985b, type: 3} + - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} + propertyPath: k__BackingField + value: 104 + objectReference: {fileID: 0} - target: {fileID: 5958074810027370513, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: k__BackingField value: 10943239119975098356 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab index 04842b13c4..761d7ffb4c 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab @@ -163,20 +163,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 982355326213879995} - {fileID: 3938643034119177363} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 113 + k__BackingField: 151 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 17362150636051014717 - _sceneNetworkObjects: [] --- !u!114 &982355326213879995 MonoBehaviour: m_ObjectHideFlags: 0 @@ -192,6 +198,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 6810177589324280848} _networkObjectCache: {fileID: 6810177589324280848} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -201,8 +208,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -234,11 +243,11 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6810177589324280848} _networkObjectCache: {fileID: 6810177589324280848} + _asset: {fileID: 11400000, guid: fed94fb222246a4419af975c7a2c4540, type: 2} _name: DonkPocket _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 2748903352563225919} - Prefab: {fileID: 3969530706517246485} AttachmentPoint: {fileID: 8693672357343424519} AttachmentPointAlt: {fileID: 8693672357343424519} + _container: {fileID: 0} diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab index 6f9985ce30..82dc20bc91 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab @@ -241,6 +241,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 6348062478285535548} _networkObjectCache: {fileID: 6348062478285535548} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -250,8 +251,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -282,19 +285,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 1098697026978869413} + - {fileID: 3684970640593888479} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 51 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 5534078634383673453 - _sceneNetworkObjects: [] --- !u!114 &3684970640593888479 MonoBehaviour: m_ObjectHideFlags: 0 @@ -307,17 +317,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 6348062478285535548} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 6348062478285535548} + _asset: {fileID: 11400000, guid: e1b3f700e7546e0489fd6e5f71abf8d3, type: 2} _name: Boombox _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3236041210663208848} - Prefab: {fileID: 8197868818743549203} AttachmentPoint: {fileID: 2804866248626254785} AttachmentPointAlt: {fileID: 2804866248626254785} + _container: {fileID: 0} --- !u!1 &8730915866332464111 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab index b7a80f56da..293c7de590 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab @@ -133,6 +133,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 8767567404870203102} _networkObjectCache: {fileID: 8767567404870203102} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -142,8 +143,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -174,19 +177,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2717170585512287581} + - {fileID: 2885876316184551953} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 23 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 2709704071178511549 - _sceneNetworkObjects: [] --- !u!114 &2885876316184551953 MonoBehaviour: m_ObjectHideFlags: 0 @@ -199,17 +209,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 8767567404870203102} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 8767567404870203102} + _asset: {fileID: 11400000, guid: 68a5a1b2615760444ae03d706ee505f2, type: 2} _name: Grey floor tile _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 8627529163342616406} - Prefab: {fileID: 7125681683583715523} AttachmentPoint: {fileID: 8309000899177645629} AttachmentPointAlt: {fileID: 8309000899177645629} + _container: {fileID: 0} --- !u!1 &8648817992091836969 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab index ba06bd7935..2da8e8d0b0 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab @@ -164,6 +164,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 1491149956516498634} _networkObjectCache: {fileID: 1491149956516498634} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -173,8 +174,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -205,19 +208,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 4134594761787071573} + - {fileID: 1734265040556642174} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 2 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 197814222260010483 - _sceneNetworkObjects: [] --- !u!114 &1734265040556642174 MonoBehaviour: m_ObjectHideFlags: 0 @@ -230,14 +240,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 1491149956516498634} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 1491149956516498634} + _asset: {fileID: 11400000, guid: 93db84e4a22cd5c4ba1635e5591d4dad, type: 2} _name: Poster _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 8712720992454278083} - Prefab: {fileID: 5161561551087789900} AttachmentPoint: {fileID: 104152118591794821} AttachmentPointAlt: {fileID: 104152118591794821} + _container: {fileID: 0} diff --git a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab index ee6ccb35ef..655c8bee06 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab @@ -264,6 +264,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 4037338737721612837} _networkObjectCache: {fileID: 4037338737721612837} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -273,8 +274,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -305,19 +308,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2874730927934163503} + - {fileID: 9006176345843005737} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 5 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 473015190045110106 - _sceneNetworkObjects: [] --- !u!114 &9006176345843005737 MonoBehaviour: m_ObjectHideFlags: 0 @@ -330,17 +340,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 4037338737721612837} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 4037338737721612837} + _asset: {fileID: 11400000, guid: 1504e8496fb46cb418e6c45090ef9a87, type: 2} _name: Steel reinforced sheet _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 1539314608044912900} - Prefab: {fileID: 7125681683583715523} AttachmentPoint: {fileID: 8309000899177645629} AttachmentPointAlt: {fileID: 8309000899177645629} + _container: {fileID: 0} --- !u!1 &7393894785072713980 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab index ad173d3798..14aad8da1d 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab @@ -264,6 +264,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 1773710978803455870} _networkObjectCache: {fileID: 1773710978803455870} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -273,8 +274,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -305,19 +308,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2568864249795578972} + - {fileID: 5296084984690686628} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 36 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 4043983509304968512 - _sceneNetworkObjects: [] --- !u!114 &5296084984690686628 MonoBehaviour: m_ObjectHideFlags: 0 @@ -330,17 +340,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 1773710978803455870} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 1773710978803455870} + _asset: {fileID: 11400000, guid: dca32ba0f238d50459195af118b0435e, type: 2} _name: Steel sheet _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3882670034855778047} - Prefab: {fileID: 7125681683583715523} AttachmentPoint: {fileID: 8309000899177645629} AttachmentPointAlt: {fileID: 8309000899177645629} + _container: {fileID: 0} --- !u!1 &7393894785072713980 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab b/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab index f1d92ba7ab..1c7eb7ceeb 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab @@ -97,7 +97,7 @@ MonoBehaviour: _hasCustomDisplay: 0 _displays: [] _numberDisplay: 0 - _containerName: toolbox + _displayAsSlotInUI: 0 _size: {x: 6, y: 6} _hideItems: 1 _type: -1 @@ -116,19 +116,25 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 1 k__BackingField: 1 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 8518940750606334703} k__BackingField: {fileID: 3258417366846669140} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 65535 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 0 - _sceneNetworkObjects: [] --- !u!114 &3584607129285960603 MonoBehaviour: m_ObjectHideFlags: 0 @@ -426,14 +432,14 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 3258417366846669140} _networkObjectCache: {fileID: 3258417366846669140} + _asset: {fileID: 11400000, guid: 985ce8ccfd6cf5040b74333c386271f5, type: 2} _name: _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 2081909342595332650} - Prefab: {fileID: 5533951594911835035} AttachmentPoint: {fileID: 6311512130502363032} AttachmentPointAlt: {fileID: 2809404673239714095} + _container: {fileID: 0} --- !u!95 &5206759755089209485 Animator: serializedVersion: 4 @@ -469,6 +475,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 3258417366846669140} _networkObjectCache: {fileID: 3258417366846669140} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -478,8 +485,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -510,6 +519,7 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2884915648782529247} - {fileID: 3298710121668139635} @@ -517,15 +527,20 @@ MonoBehaviour: k__BackingField: {fileID: 0} k__BackingField: - {fileID: 57976260605683709} + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 47 + k__BackingField: 109 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 11478259988983769400 - _sceneNetworkObjects: [] --- !u!114 &7199567936746149742 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab b/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab index 6c2cf39cef..dcd8a4bd69 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab @@ -170,6 +170,7 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 8471215545886824119} - {fileID: 874141704920938506} @@ -177,15 +178,20 @@ MonoBehaviour: - {fileID: 3278785340214204199} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 61 + k__BackingField: 134 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 15477425834962603031 - _sceneNetworkObjects: [] --- !u!114 &8471215545886824119 MonoBehaviour: m_ObjectHideFlags: 0 @@ -201,6 +207,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -210,8 +217,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 0 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -387,14 +396,14 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _asset: {fileID: 11400000, guid: a5be2a47daccf6a449459d092254a0bc, type: 2} _name: _weight: 0 - _size: {x: 0, y: 0} _startingTraits: [] _rigidbody: {fileID: 3483542684610536844} - Prefab: {fileID: 5261116577612792016} AttachmentPoint: {fileID: 7760506997891073340} AttachmentPointAlt: {fileID: 4454088359095980686} + _container: {fileID: 0} --- !u!1 &6067700979317892856 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab index 5f785abaaf..c30dbeef2f 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab @@ -82,6 +82,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 7970185317444620997} _networkObjectCache: {fileID: 7970185317444620997} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 1 @@ -91,8 +92,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -123,19 +126,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6577877045480572054} + - {fileID: 1227241197653347230} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: -1 + k__BackingField: 62 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 6806779761786257601 - _sceneNetworkObjects: [] --- !u!114 &1227241197653347230 MonoBehaviour: m_ObjectHideFlags: 0 @@ -148,17 +158,17 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 7970185317444620997} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 7970185317444620997} + _asset: {fileID: 11400000, guid: 413d01e857d1db8468215e17771a95ea, type: 2} _name: Flashlight blue _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 8306720623195580296} - Prefab: {fileID: 833752496874958856} AttachmentPoint: {fileID: 2072336978259344535} AttachmentPointAlt: {fileID: 2072336978259344535} + _container: {fileID: 0} --- !u!1 &3531470905858699050 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab index 5581d246a0..dc0e329b39 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab @@ -224,7 +224,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 6 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -244,6 +244,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 261983550380735922} _networkObjectCache: {fileID: 261983550380735922} + _asset: {fileID: 11400000, guid: 51a9d5208dc8a6f4aab4b21b87b91ee6, type: 2} _name: Kitchen knife _weight: 1 _startingTraits: [] diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index 7224d1cf78..bef15c29b4 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -2,6 +2,7 @@ using JetBrains.Annotations; using Serilog; using System.Collections.Generic; +using UnityEditor; using UnityEngine; namespace SS3D.Data.AssetDatabases @@ -102,6 +103,9 @@ private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObj worldObjectAsset.Asset = worldObjectAssetReference; } + EditorUtility.SetDirty(gameObject); + EditorUtility.SetDirty(worldObjectAssetReference); + return worldObjectAssetReference; } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index ffe1ee150a..ff9ccdd5d9 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -110,9 +110,7 @@ private void UpdateListVisuals() private void HandleLoadDatabasesButtonPressed() { - LoadDatabases(); - - FindAndLoadAllAssetsDatabasesAddressablesGroups(); + EditorUtility.SetDirty(_assetDatabaseSettings); UpdateListVisuals(); } diff --git a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs index 0a4dd53628..e3e3edd56e 100644 --- a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs +++ b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs @@ -1,4 +1,5 @@ using Coimbra; +using Serilog; using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; using UnityEngine; @@ -35,6 +36,8 @@ public bool ClientStart(InteractionEvent interactionEvent) _loadingBarInstance.transform.SetParent(source.GameObject.transform); _loadingBarInstance.GetComponent().Duration = Delay; + + Log.Information("spawned loading bar"); return true; } From 6adb1c82dc8df57919ac01419d2c0a50ded73585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Mon, 6 Nov 2023 22:12:18 -0300 Subject: [PATCH 21/32] Fix issue with input on tilemap creator --- Assets/Scripts/SS3D/Core/Subsystems.cs | 2 ++ .../AssetDatabases/AssetDatabasesCodeGenerator.cs | 6 ++++-- Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs | 11 +++++++++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/SS3D/Core/Subsystems.cs b/Assets/Scripts/SS3D/Core/Subsystems.cs index dd7f95616a..c3d32f3322 100644 --- a/Assets/Scripts/SS3D/Core/Subsystems.cs +++ b/Assets/Scripts/SS3D/Core/Subsystems.cs @@ -68,6 +68,7 @@ public static void Register([NotNull] MonoBehaviour system) if (!RegisteredSubsystems.TryGetValue(type, out object _)) { + Serilog.Log.Information($"{nameof(Subsystems)} - Registering {system.GetType().Name}"); RegisteredSubsystems.Add(type, system); } } @@ -78,6 +79,7 @@ public static void Register([NotNull] MonoBehaviour system) /// The system to unregister. public static void Unregister([NotNull] object system) { + Serilog.Log.Information($"{nameof(Subsystems)} - Unregistering {system.GetType().Name}"); RegisteredSubsystems.Remove(system.GetType()); } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index bef15c29b4..6d753eb387 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -1,4 +1,5 @@ -using Coimbra; +#if UNITY_EDITOR +using Coimbra; using JetBrains.Annotations; using Serilog; using System.Collections.Generic; @@ -109,4 +110,5 @@ private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObj return worldObjectAssetReference; } } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs b/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs index 4300b6bd1b..d4eeb25bb2 100644 --- a/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Inputs/InputSystem.cs @@ -1,3 +1,4 @@ +using Serilog; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -8,7 +9,7 @@ namespace SS3D.Systems.Inputs /// /// Contains player's controls in Inputs /// - public class InputSystem : SS3D.Core.Behaviours.System + public sealed class InputSystem : SS3D.Core.Behaviours.System { public Controls Inputs { get; private set; } @@ -22,10 +23,16 @@ protected override void OnAwake() base.OnAwake(); + Setup(); + } + + private void Setup() + { MouseSensitivity = 0.001f; Inputs = new Controls(); - _actionDisables = new(); + _actionDisables = new(); + foreach (InputAction action in Inputs) { _actionDisables.Add(action, 1); From 6be6b62e5aecb5a946c157ad566bd3b2dd2afc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 7 Nov 2023 13:19:24 -0300 Subject: [PATCH 22/32] Fix loading bar --- .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 17 ++++++++++-- .../Interactions/ClientDelayedInteraction.cs | 27 ++++++++++++------- .../SS3D/Interactions/DelayedInteraction.cs | 4 --- .../SS3D/Systems/Inventory/Containers/Hand.cs | 2 +- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index 44056d0b98..1a1b05511e 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -22,11 +22,24 @@ public sealed class DatabaseAsset /// Returns the prefab of this asset as a GameObject. /// public GameObject Prefab => Get(); - + /// /// Instantiates a new GameObject of this asset's prefab /// - public GameObject New() => GameObject.Instantiate(Prefab); + public GameObject Create(Transform parent = null) => GameObject.Instantiate(Prefab, parent); + + /// + /// Instantiates a new GameObject of this asset's prefab and gets a component in its main object. + /// + public GameObject CreateAs(out T component, Transform parent = null) + where T : class + { + GameObject gameObject = GameObject.Instantiate(Prefab, parent); + + component = gameObject.GetComponent(typeof(T)) as T; + + return gameObject; + } /// /// This constructor specifies which databaseID to use and which asset ID, or name, to use. diff --git a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs index e3e3edd56e..1e6bd52870 100644 --- a/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs +++ b/Assets/Scripts/SS3D/Interactions/ClientDelayedInteraction.cs @@ -13,13 +13,15 @@ namespace SS3D.Interactions /// public sealed class ClientDelayedInteraction : IClientInteraction { + private static readonly Vector3 LoadingBarOffset = new(0, 0.5f, 0); + + private LoadingBar _loadingBarInstance; + /// /// The duration of the loading bar in seconds /// public float Delay { get; set; } - private GameObject _loadingBarInstance; - /// /// Starts the interaction on the client side /// @@ -27,17 +29,21 @@ public sealed class ClientDelayedInteraction : IClientInteraction /// True if started successfully public bool ClientStart(InteractionEvent interactionEvent) { + if (_loadingBarInstance != null) + { + _loadingBarInstance.GameObject.Dispose(true); + } + if (interactionEvent.Source.GetRootSource() is not IGameObjectProvider source) { return true; } + + WorldSpaceUI.LoadingBar.CreateAs(out _loadingBarInstance, source.GameObject.transform); + + _loadingBarInstance.LocalPosition = LoadingBarOffset; + _loadingBarInstance.Duration = Delay; - _loadingBarInstance = WorldSpaceUI.LoadingBar.New(); - - _loadingBarInstance.transform.SetParent(source.GameObject.transform); - _loadingBarInstance.GetComponent().Duration = Delay; - - Log.Information("spawned loading bar"); return true; } @@ -50,7 +56,10 @@ public bool ClientUpdate(InteractionEvent interactionEvent) /// public void ClientCancel(InteractionEvent interactionEvent) { - _loadingBarInstance.Dispose(true); + if (_loadingBarInstance != null) + { + _loadingBarInstance.GameObject.Dispose(true); + } } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Interactions/DelayedInteraction.cs b/Assets/Scripts/SS3D/Interactions/DelayedInteraction.cs index a71e0bab99..6fc9699596 100644 --- a/Assets/Scripts/SS3D/Interactions/DelayedInteraction.cs +++ b/Assets/Scripts/SS3D/Interactions/DelayedInteraction.cs @@ -14,10 +14,6 @@ public abstract class DelayedInteraction : Interaction /// public float Delay { get; set; } /// - /// The loading bar prefab to use on the client - /// - public GameObject LoadingBarPrefab { get; set; } - /// /// The interval in seconds in which CanInteract is checked /// protected float CheckInterval { get; set; } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/Hand.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Hand.cs index e9222a042b..457fbb7d47 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/Hand.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Hand.cs @@ -113,7 +113,7 @@ public void CmdDropHeldItem() } Container.Dump(); - ItemInHand.GiveOwnership(null); + ItemInHand?.GiveOwnership(null); } From 7079072bde89c58e3035e716c291260739ff4934 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Tue, 7 Nov 2023 16:23:47 -0300 Subject: [PATCH 23/32] Improve reimporting slowness --- .../AssetDatabases/AssetDatabasesCodeGenerator.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index 6d753eb387..c1bf368d00 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -99,14 +99,20 @@ private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObj worldObjectAssetReference.Id = gameObject.name; worldObjectAssetReference.Database = assetDatabaseName; - if (gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) + if (!gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) { - worldObjectAsset.Asset = worldObjectAssetReference; + return worldObjectAssetReference; } + if (worldObjectAsset.Asset == worldObjectAssetReference) + { + return worldObjectAssetReference; + } + + worldObjectAsset.Asset = worldObjectAssetReference; + EditorUtility.SetDirty(gameObject); EditorUtility.SetDirty(worldObjectAssetReference); - return worldObjectAssetReference; } } From d73f939b5c4553f00bee8347e52fe8aec189bd9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= <46575243+joaoburatto@users.noreply.github.com> Date: Wed, 29 Nov 2023 16:15:31 -0300 Subject: [PATCH 24/32] Update prefabs and database assets naming --- .../AttackParticles.asset.meta | 2 +- .../BikeHorn.asset.meta | 2 +- .../BleedingParticle.asset.meta | 2 +- .../Boombox.asset.meta | 2 +- .../BrutePatch.asset.meta | 2 +- .../BurnPatch.asset.meta | 2 +- .../Crowbar.asset.meta | 2 +- .../DonkPocket.asset.meta | 2 +- .../FacewearGasMask.asset.meta | 2 +- .../FlashlightBlue.asset.meta | 2 +- .../GlovesInsulatedLeft.asset.meta | 2 +- .../GlovesInsulatedRight.asset.meta | 2 +- .../GreyFloorTile.asset.meta | 2 +- .../HeadsetLeft.asset.meta | 2 +- .../HeadsetRight.asset.meta | 2 +- .../HumanArmLeftItem.asset.meta | 2 +- .../HumanArmRightItem.asset.meta | 2 +- .../HumanBrainItem.asset.meta | 2 +- .../HumanEarLeftItem.asset.meta | 2 +- .../HumanEarRightItem.asset.meta | 2 +- .../HumanFootLeftItem.asset.meta | 2 +- .../HumanFootRightItem.asset.meta | 2 +- .../HumanHandLeft.asset.meta | 2 +- .../HumanHandLeftItem.asset.meta | 2 +- .../HumanHandRight.asset.meta | 2 +- .../HumanHandRightItem.asset.meta | 2 +- .../HumanHeadItem.asset.meta | 2 +- .../HumanHeartItem.asset.meta | 2 +- .../HumanLegLeftItem.asset.meta | 2 +- .../HumanLegRightItem.asset.meta | 2 +- .../HumanLungLeftItem.asset.meta | 2 +- .../HumanLungRightItem.asset.meta | 2 +- .../HumanTorsoItem.asset.meta | 2 +- .../IDCard.asset.meta | 2 +- .../JumpsuitBotany.asset.meta | 2 +- .../JumpsuitEngineer.asset.meta | 2 +- .../JumpsuitGrey.asset.meta | 2 +- .../JumpsuitSecurity.asset.meta | 2 +- .../KitchenKnife.asset.meta | 2 +- .../LoadingBar.asset.meta | 2 +- .../MedicalPatch.asset.meta | 2 +- .../WorldObjectAssetReferences/Mug.asset.meta | 2 +- .../NuclearAuthenticationDisk.asset.meta | 2 +- .../WorldObjectAssetReferences/PDA.asset.meta | 2 +- .../Poster.asset.meta | 2 +- .../Screwdriver.asset.meta | 2 +- .../SecurityIDCard.asset.meta | 2 +- .../SecurityPDA.asset.meta | 2 +- .../ShoesHiTopsLeft.asset.meta | 2 +- .../ShoesHiTopsRight.asset.meta | 2 +- .../ShoesJackbootsLeft.asset.meta | 2 +- .../ShoesJackbootsRight.asset.meta | 2 +- .../SodaCanBeepsSoda.asset.meta | 2 +- .../SodaCanBeepyLime.asset.meta | 2 +- .../SodaCanCannedAir.asset.meta | 2 +- .../SodaCanCannedLaughter.asset.meta | 2 +- .../SodaCanCola.asset.meta | 2 +- .../SodaCanDukePurpleTea.asset.meta | 2 +- .../SodaCanTonic.asset.meta | 2 +- .../SteelReinforcedSheet.asset.meta | 2 +- .../SteelSheet.asset.meta | 2 +- .../Sunglasses.asset.meta | 2 +- .../ToolboxBlue.asset.meta | 2 +- .../TruckerCap.asset.meta | 2 +- .../Wrench.asset.meta | 2 +- .../Food/Drinks/Soda/SodaCanBeepsSoda.prefab | 2 +- .../Food/Drinks/Soda/SodaCanBeepyLime.prefab | 2 +- .../Food/Drinks/Soda/SodaCanCannedAir.prefab | 2 +- .../Drinks/Soda/SodaCanCannedLaughter.prefab | 2 +- .../Food/Drinks/Soda/SodaCanCola.prefab | 2 +- .../Drinks/Soda/SodaCanDukePurpleTea.prefab | 2 +- .../Food/Drinks/Soda/SodaCanTonic.prefab | 2 +- .../Food/General/Snacks/DonkPocket.prefab | 2 +- .../Items/Functional/Generic/Boombox.prefab | 2 +- .../Functional/Generic/GreyFloorTile.prefab | 2 +- .../Items/Functional/Generic/Poster.prefab | 2 +- .../Materials/SteelReinforcedSheet.prefab | 2 +- .../Functional/Materials/SteelSheet.prefab | 2 +- .../Objects/ToolBoxes/ToolboxBlue.prefab | 2 +- .../Functional/Storage/Substances/Mug.prefab | 2 +- .../Tools/Generic/FlashlightBlue.prefab | 2 +- .../Tools/Kitchen/KitchenKnife.prefab | 2 +- .../SS3D/Data/AssetDatabases/AssetDatabase.cs | 7 +- .../AssetDatabases/AssetDatabaseSettings.cs | 2 +- .../AssetDatabasesCodeGenerator.cs | 141 +++++++++++++++--- .../AssetDatabaseSettingsInspectorEditor.cs | 2 +- 86 files changed, 206 insertions(+), 110 deletions(-) diff --git a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta index 5627625faa..407840c5d0 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9c372330afcd4bb4a9fbdc757b22abe6 +guid: 7f455a06223228543b86556fd825b2ce NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta index 76264c5df8..d46bb61b43 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/BikeHorn.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d39cddb29d447124aa73725a47e02f78 +guid: 3747dddbc41cad94bbbfc43bfed384c3 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta index ab3f18cdab..850e0cfc77 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3f4107e792a7e6c47a1dd6f63cff9d70 +guid: 62097e85008f15f45aab66560146a649 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta index 56c9ef7025..54e2b68bc7 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Boombox.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e1b3f700e7546e0489fd6e5f71abf8d3 +guid: d81d46f903aad014aa4728a8b47ab7ea NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta index 64aa2936b8..2cb57b7984 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/BrutePatch.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8adf177e87ba8dc4a867b30fc5676a71 +guid: 8ec2a780fae01344a9431a9cb06d8a7c NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta index 727977e51b..404649a7ef 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/BurnPatch.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df9cd9916d9c1254589eb99b8b830ed8 +guid: e28b644ad26ceae45acf3ceb84b8cbff NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta index 0c9de0fce9..7265cc0399 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Crowbar.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1b4ccdd9b9b331744a5b594dd5f00775 +guid: 9310ba3e563558e42bdbd19ee6b8440c NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta index 3fbb4cdeb1..547367f129 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/DonkPocket.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fed94fb222246a4419af975c7a2c4540 +guid: 5ebf0777f77019c469729ac80e12720b NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta index a74ff6a626..2e355fc173 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/FacewearGasMask.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4de4d85493f8a8b42868cc0597871bcd +guid: 4a50e327a934cd3438e1b88d2bb547cb NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta index 6bde721034..bfbe1fd6d0 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/FlashlightBlue.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 413d01e857d1db8468215e17771a95ea +guid: cb8a18ff6b582ec45a3aa1f689a18564 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta index c7ca0a8085..95098a4e92 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d9b0944d3ed02ea479b0af556a3cab64 +guid: 739991c49857a3d40b2060d96908de45 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta index 4ce291adbe..eb054481b4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/GlovesInsulatedRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 20ad2279ce787e64fb77393b42cffc6a +guid: 88cb0aca0b6265d49b25526ca55295e9 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta index a93a38209e..5e5f07ffb4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/GreyFloorTile.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 68a5a1b2615760444ae03d706ee505f2 +guid: b759f5ec1b4de73429ca98ebdfe43886 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta index 3fbe3502dc..096767e6af 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4b4029fe499a52040a5d860a68f2e28e +guid: 01c2089d9c76db9488cc22e68d76f4b5 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta index 740a14b621..1e10ce8c10 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HeadsetRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 729dbb85ed3724242b2ee1d4da775f4e +guid: e8cfa525648e9c043a6e175aa4dc540b NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta index 18c229af36..8ca4a50ec4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d91b6d9e71803b04e9ff30caa2f6374f +guid: 3263f10a876daa84f9e29324025a80a0 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta index 335e3bf0b9..7de90790b6 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df9f404fa52ee824794909f08595c028 +guid: 1ea80580f09b0234cb3789de8736c5a5 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta index 8a66820708..038f5e421e 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 32c94b1830362bc43b30555d487396af +guid: bbab02faaef738d478d8171287046046 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta index 1c7e69c1a0..fad35cf42f 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0a8e3f2b842a9e245a97119b5cef999e +guid: 045c92e652593274d953d3bdd5b8f604 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta index 70522ed30b..d5037f2659 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5bc7d557ce7352244b2bf7f4ed90dc4b +guid: cd7541ae37a30fe46af43528d911e2c3 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta index 3c49925eeb..abf7563fd0 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b3b2afce6152d964ea581ec25e05094f +guid: e73c2d229e3614c49a29f4dcadda943e NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta index fad1171a34..36bf6554ee 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ab15f69730e737c499d7e49e0b60828f +guid: 5605526c84520c4479830457e758dc28 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta index 8159c3a2dd..66db67f55f 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 565ac8afd5d7f1b48a77eea0dff57e1e +guid: 2f63d1bb2710f984d8cfde0a9693d36b NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta index 2757c336ff..0898b62219 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 95a17af52b0ee2840bf23d4e4dbadef9 +guid: c3f1f8ac96bc2154e910accebf98a60d NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta index 11f42d4c26..7f0e702715 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2a13475f95afeda4c83fcdd99d191bfc +guid: 8c41ca3f7df4d604b96b5c241f1dbbf7 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta index 0fb704f2c7..83a02adeb8 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a041cd784cd09f24c8ee54ab5e4f7591 +guid: 1fb4b24f90b0d4d4bbf6eed6d7433af0 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta index 4be5b27af4..f8496289ed 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ec68376be66eb22488b1bc8833ae1d41 +guid: 780366ac460ed8a4c81a74b0c7714a57 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta index 3f59ec9727..3462294e3a 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7dfc9891a70eca243ba66af9aabdf8ac +guid: 5e02e10a3cbb67440b5f7150803ee968 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta index f4444866d6..569855f9f4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4988ba87319d0de4c886d878ef7eeaf0 +guid: 60f6bddc24a947944a89cb94b1e243b6 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta index e2c1c3b443..3bd298326f 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4811186b89123754dbfec4228ba53474 +guid: 395d93154bb444f4d8b71b82758784a2 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta index 26617a79f5..f850eea225 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 459280746733a0d4da7480561a520f0a +guid: a2280dc2cae5ed644819c7321607ba10 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta index 0a665f7b42..5217085a80 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5b0c3ba98e7df3f4a9b956e6379c73a1 +guid: 705ba5fcf62094d48b15295dd2acfc0f NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta index 2a2f5cc273..845e4ddaa1 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c2f98df04da8cb146966e6feb45d762c +guid: 538c13ee519f34943834289f449a96ba NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta index 966ada6b11..0a90f57510 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/IDCard.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0c13483732a160b488fb2b7f669c234f +guid: d4a76ab7d8dbea34cb528fc2b784fd70 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta index 2dcb6718a4..334c6ccd29 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitBotany.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: da934006565cc3342bacbece3e87f49c +guid: 6a9a8af0ce91a634ab42f12ebc7b24a6 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta index 5fc48c148c..a02387d165 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitEngineer.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 673f8808b79583c438b800e934975fc7 +guid: c3e196c40ac645e4d840edb82a27baf9 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta index df073225d7..db4cf0a43a 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitGrey.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2c470b6b3bca8a04ebd73865980deaa7 +guid: 620dc53a5608be44a975c990e69ddba5 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta index 0a7582db95..94b359a293 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/JumpsuitSecurity.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 878c1d8b308635044ad201f16f72b3a8 +guid: 9abef62d6f4edd443b3fa81a32f9a5ba NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta index c48e47ba22..caa52be930 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/KitchenKnife.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51a9d5208dc8a6f4aab4b21b87b91ee6 +guid: f5a2860feace1434ea982b06d2445f9f NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta index 50b6ddf62e..31e86f749a 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 30a38406d4acd85429ab81954811832d +guid: b16e0eb6d5206374eb61a55d098aef72 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta index a871eec524..0f608c04c4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/MedicalPatch.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ed79aacb218d9de4d8652b66fa93e3fe +guid: 1a9f9df755637c3478bf4649e7ab04fd NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta index b566ccd5e9..86262e4c78 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Mug.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a5be2a47daccf6a449459d092254a0bc +guid: 162ccd1fc7d534046874df3d9dcf2315 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta index 16219ca18c..8376697af7 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/NuclearAuthenticationDisk.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ca7d8e4c91357b943b78ca96e05b17ef +guid: 50284e9bdc2ff2943ba806e8d5ce8f9f NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta index 471e9f5d7c..cada46c427 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/PDA.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: af026ff75727ddf4da580b4a7ecc7e78 +guid: 4773cbe0a88c809459547e0d0eff8d29 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta index 9567509f34..066d6f4f64 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Poster.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 93db84e4a22cd5c4ba1635e5591d4dad +guid: cd3268046db629240800ee48b64a9810 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta index 24679e64f3..cecf328c89 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d5582d2058d277645819b17209031fd5 +guid: f07bdcc8986b95043be85d4f9d0e7c76 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta index ba4b72db86..6827cab9e0 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityIDCard.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8b08c99562254be4b8d19bf506b27f5a +guid: bca8d36802b3dbc47bc479151a3f7ea1 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta index 41acd27d92..90395a4e7b 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SecurityPDA.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e98d6efeb7277e7478a932dcd7fe4b72 +guid: 4f09dc7f882c18542b750da80a29720f NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta index 2275d3d4be..fd2d324778 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 81cbf243b5519c34686d5a42f677aa11 +guid: d4290820348155f429a1712d502f920a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta index 304c88e62d..26e6a11956 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesHiTopsRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ff0e747744f6e424b816eecdc26a9b87 +guid: 810f35d5b52f0e6469cf9683460a16ca NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta index 897f8ac8e0..b618c9927b 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: da2f715274cab6f4196acc97ba7968da +guid: a8d8774fcba03b7448bc11fbecd8137e NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta index 9f7ebda261..d5775ff2a3 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/ShoesJackbootsRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 60bd8e01e60e256438e17b8a15e5fc59 +guid: 51c73ffc274bdf44da1bef6e91400973 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta index 3b47a52076..56ba368376 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepsSoda.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5f9d538d2b1db574ea0d87ef391eb3fd +guid: bffc6c08d28041549ae1af640b76ce92 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta index c47819794f..08b10ac5d2 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanBeepyLime.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 32223a760be2a824aa5fe5ba38b81e9e +guid: e41bbba3e5f86d342a514665e8eeba56 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta index 1117a864c7..5c4b433b11 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedAir.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b6457d4f679c9014c8af88872826df10 +guid: d5ed3684908f1d846815d39a4ae98418 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta index 3d8c206491..2f1c1da633 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCannedLaughter.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 787272db3e832a24eb2b074df1271ae4 +guid: e6c8ce8c1b83a004389647756897a0c0 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta index 6543d9156e..38d1a0185c 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanCola.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1b698689146838645971fa10136cae55 +guid: 1c4488c42b15c364b91b3ebc97c3a840 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta index 6e73079119..f53e19c5c6 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanDukePurpleTea.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4acff5047a23ca546892f6983df848da +guid: 9275ab75afcd2ea40b8d00845d500d6a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta index ab6fa8adb9..d99d2d3bfb 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SodaCanTonic.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 68230819a8f6057499c06f75715ae067 +guid: 532f39f1310fc5d41b37195bc4d0ae11 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta index f919db64d7..ed9c69e75e 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelReinforcedSheet.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1504e8496fb46cb418e6c45090ef9a87 +guid: 05cd3679ee853174fb8651304e81f0cd NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta index e9c2e82504..4c440499f8 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/SteelSheet.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dca32ba0f238d50459195af118b0435e +guid: 8cfc0ba9b0715224ca017ad6ddfbd66b NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta index debacca608..3a465e9856 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Sunglasses.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 801a4613a54051e47a57bc2bc7287c19 +guid: c0a5c4fc200a5ae4693d9b02fee23b49 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta index 8a422cd96e..4cbfc26c3e 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/ToolboxBlue.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 985ce8ccfd6cf5040b74333c386271f5 +guid: 734468cf273e2144d945698e4793b7c5 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta index f81b305538..983248da4e 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/TruckerCap.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9a6240bc8a7465a4b9ff2949fe1a91ec +guid: e53ebba96eeba474e8478131c8d24085 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta index 2894cc4436..0e3400c9b2 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Wrench.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: efd354e0d4d97df418e2b8df5e349cd0 +guid: fd8e3cf550cdc704281d3b94b5c8d631 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab index eda8d3cb6d..cc94dc2f84 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepsSoda.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 5f9d538d2b1db574ea0d87ef391eb3fd, type: 2} + objectReference: {fileID: 11400000, guid: bffc6c08d28041549ae1af640b76ce92, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab index e0dc4be77f..db74daeecd 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanBeepyLime.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 32223a760be2a824aa5fe5ba38b81e9e, type: 2} + objectReference: {fileID: 11400000, guid: e41bbba3e5f86d342a514665e8eeba56, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab index c1e865bd4c..69942aa0b1 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedAir.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: b6457d4f679c9014c8af88872826df10, type: 2} + objectReference: {fileID: 11400000, guid: d5ed3684908f1d846815d39a4ae98418, type: 2} - target: {fileID: -1409642175327164469, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: InitialSubstances.Array.size value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab index e426ee766b..76a8804761 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCannedLaughter.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 787272db3e832a24eb2b074df1271ae4, type: 2} + objectReference: {fileID: 11400000, guid: e6c8ce8c1b83a004389647756897a0c0, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab index 5b5d325c0e..ef358114d2 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanCola.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 1b698689146838645971fa10136cae55, type: 2} + objectReference: {fileID: 11400000, guid: 1c4488c42b15c364b91b3ebc97c3a840, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab index 4e4a3d87a4..f806e50b73 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanDukePurpleTea.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 4acff5047a23ca546892f6983df848da, type: 2} + objectReference: {fileID: 11400000, guid: 9275ab75afcd2ea40b8d00845d500d6a, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab index 8bfb687b86..9e6c5e6951 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanTonic.prefab @@ -10,7 +10,7 @@ PrefabInstance: - target: {fileID: -6509701768596653782, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: _asset value: - objectReference: {fileID: 11400000, guid: 68230819a8f6057499c06f75715ae067, type: 2} + objectReference: {fileID: 11400000, guid: 532f39f1310fc5d41b37195bc4d0ae11, type: 2} - target: {fileID: 5596787203858443778, guid: 56ac854f77351fa46b6a17fbb1cf45d9, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab index 761d7ffb4c..79b862787d 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/General/Snacks/DonkPocket.prefab @@ -243,7 +243,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6810177589324280848} _networkObjectCache: {fileID: 6810177589324280848} - _asset: {fileID: 11400000, guid: fed94fb222246a4419af975c7a2c4540, type: 2} + _asset: {fileID: 11400000, guid: 5ebf0777f77019c469729ac80e12720b, type: 2} _name: DonkPocket _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab index 82dc20bc91..699392b64a 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Boombox.prefab @@ -320,7 +320,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6348062478285535548} _networkObjectCache: {fileID: 6348062478285535548} - _asset: {fileID: 11400000, guid: e1b3f700e7546e0489fd6e5f71abf8d3, type: 2} + _asset: {fileID: 11400000, guid: d81d46f903aad014aa4728a8b47ab7ea, type: 2} _name: Boombox _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab index 293c7de590..15596a615e 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/GreyFloorTile.prefab @@ -212,7 +212,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8767567404870203102} _networkObjectCache: {fileID: 8767567404870203102} - _asset: {fileID: 11400000, guid: 68a5a1b2615760444ae03d706ee505f2, type: 2} + _asset: {fileID: 11400000, guid: b759f5ec1b4de73429ca98ebdfe43886, type: 2} _name: Grey floor tile _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab index 2da8e8d0b0..e5f7a3b5f4 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Poster.prefab @@ -243,7 +243,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1491149956516498634} _networkObjectCache: {fileID: 1491149956516498634} - _asset: {fileID: 11400000, guid: 93db84e4a22cd5c4ba1635e5591d4dad, type: 2} + _asset: {fileID: 11400000, guid: cd3268046db629240800ee48b64a9810, type: 2} _name: Poster _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab index 655c8bee06..f6f7c1b4c0 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelReinforcedSheet.prefab @@ -343,7 +343,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4037338737721612837} _networkObjectCache: {fileID: 4037338737721612837} - _asset: {fileID: 11400000, guid: 1504e8496fb46cb418e6c45090ef9a87, type: 2} + _asset: {fileID: 11400000, guid: 05cd3679ee853174fb8651304e81f0cd, type: 2} _name: Steel reinforced sheet _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab index 14aad8da1d..fecc6dfa13 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Materials/SteelSheet.prefab @@ -343,7 +343,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1773710978803455870} _networkObjectCache: {fileID: 1773710978803455870} - _asset: {fileID: 11400000, guid: dca32ba0f238d50459195af118b0435e, type: 2} + _asset: {fileID: 11400000, guid: 8cfc0ba9b0715224ca017ad6ddfbd66b, type: 2} _name: Steel sheet _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab b/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab index 1c7eb7ceeb..308b85c211 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Storage/Objects/ToolBoxes/ToolboxBlue.prefab @@ -432,7 +432,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 3258417366846669140} _networkObjectCache: {fileID: 3258417366846669140} - _asset: {fileID: 11400000, guid: 985ce8ccfd6cf5040b74333c386271f5, type: 2} + _asset: {fileID: 11400000, guid: 734468cf273e2144d945698e4793b7c5, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab b/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab index dcd8a4bd69..7e5580036a 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Storage/Substances/Mug.prefab @@ -396,7 +396,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} - _asset: {fileID: 11400000, guid: a5be2a47daccf6a449459d092254a0bc, type: 2} + _asset: {fileID: 11400000, guid: 162ccd1fc7d534046874df3d9dcf2315, type: 2} _name: _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab index c30dbeef2f..6c8e86a146 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Generic/FlashlightBlue.prefab @@ -161,7 +161,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7970185317444620997} _networkObjectCache: {fileID: 7970185317444620997} - _asset: {fileID: 11400000, guid: 413d01e857d1db8468215e17771a95ea, type: 2} + _asset: {fileID: 11400000, guid: cb8a18ff6b582ec45a3aa1f689a18564, type: 2} _name: Flashlight blue _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab index dc0e329b39..25c5192f7a 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Kitchen/KitchenKnife.prefab @@ -244,7 +244,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 261983550380735922} _networkObjectCache: {fileID: 261983550380735922} - _asset: {fileID: 11400000, guid: 51a9d5208dc8a6f4aab4b21b87b91ee6, type: 2} + _asset: {fileID: 11400000, guid: f5a2860feace1434ea982b06d2445f9f, type: 2} _name: Kitchen knife _weight: 1 _startingTraits: [] diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs index d1530b58e5..15381bada4 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabase.cs @@ -26,17 +26,16 @@ public sealed class AssetDatabase : ScriptableObject /// /// The path that the enum will be generated to. /// - public const string EnumPath = @"\Scripts\SS3D\Data\Generated"; + public const string DatabaseAssetPath = @"\Scripts\SS3D\Data\Generated"; /// /// The namespace that will be included on the generated Enum. /// - public const string EnumNamespaceName = "SS3D.Data.Generated"; + public const string DatabaseAssetNamespaceName = "SS3D.Data.Generated"; /// /// The name that the generated enum will have; /// - [FormerlySerializedAs("EnumName")] public string DatabaseName; #if UNITY_EDITOR @@ -145,7 +144,7 @@ public void GenerateDatabaseCode() return; } - DatabaseAssetCreator.CreateAtPath(EnumPath, typeof(DatabaseAsset), DatabaseName, Assets.Values, EnumNamespaceName); + DatabaseAssetCreator.CreateAtPath(DatabaseAssetPath, typeof(DatabaseAsset), DatabaseName, Assets.Values, DatabaseAssetNamespaceName); } #endif } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs index 973dfb8cd4..963d091d95 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabaseSettings.cs @@ -39,7 +39,7 @@ public void CreateDatabaseCode() return; } - const string dataPath = AssetDatabase.EnumPath; + const string dataPath = AssetDatabase.DatabaseAssetPath; DatabaseAssetCreator.CreateAtPath(dataPath, typeof(DatabaseAsset), "AssetDatabases", IncludedAssetDatabases); } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index c1bf368d00..e3f1283e81 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -3,6 +3,7 @@ using JetBrains.Annotations; using Serilog; using System.Collections.Generic; +using System.Linq; using UnityEditor; using UnityEngine; @@ -16,7 +17,11 @@ public static class AssetDatabasesCodeGenerator /// /// The path in the project where to put the WorldObjectAssetReference assets. /// - private const string WorldObjectAssetPath = "Assets/Content/Data/WorldObjectAssetReferences/"; + private static readonly string WorldObjectAssetPath = "Assets/Content/Data/WorldObjectAssetReferences/"; + + private static readonly Dictionary SavedAssetReferences = new Dictionary(); + + private static bool HasModifiedAssetsWhenGenerating; /// /// Generates all the code needed for the asset data system to work. @@ -39,11 +44,18 @@ public static void GenerateAssetDatabasesCode() settings.CreateDatabaseCode(); + HasModifiedAssetsWhenGenerating = false; + + LoadAllWorldObjectAssetReferences(); + foreach (AssetDatabase includedAssetDatabase in settings.IncludedAssetDatabases) { CreateDatabaseCode(includedAssetDatabase); + CreateWorldObjectAssetReferences(includedAssetDatabase); } + + CleanupWorldObjectAssetReferences(settings.IncludedAssetDatabases); } /// @@ -59,7 +71,8 @@ private static void CreateDatabaseCode(AssetDatabase assetDatabase) /// private static void CreateWorldObjectAssetReferences(AssetDatabase assetDatabase) { - List worldObjectAssetsToDestroy = new List(); + int createdAssets = 0; + int modifiedAssets = 0; foreach (Object asset in assetDatabase.Assets.Values) { @@ -68,52 +81,136 @@ private static void CreateWorldObjectAssetReferences(AssetDatabase assetDatabase continue; } - WorldObjectAssetReference worldObjectAssetReference = CreateWorldObjectAssetReference(gameObject, assetDatabase.DatabaseName); - - if (!UnityEditor.AssetDatabase.Contains(worldObjectAssetReference)) + if (SavedAssetReferences.Values.ToList().Exists(reference => reference.Id == gameObject.name && reference.Database == assetDatabase.DatabaseName)) { - UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset"); + WorldObjectAssetReference worldObjectAssetReference = SavedAssetReferences.Values.ToList().Find(reference => reference.Id == gameObject.name && reference.Database == assetDatabase.DatabaseName); + + UpdateWorldObjectAssetReference(worldObjectAssetReference, gameObject, ref modifiedAssets); } else { - worldObjectAssetsToDestroy.Add(worldObjectAssetReference); + WorldObjectAssetReference worldObjectAssetReference = CreateWorldObjectAssetReference(gameObject.name, assetDatabase.DatabaseName); + + SavedAssetReferences.Add($"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset", worldObjectAssetReference); + + UpdateWorldObjectAssetReference(worldObjectAssetReference, gameObject, ref createdAssets); } } - foreach (Object asset in worldObjectAssetsToDestroy) + if (createdAssets > 0) + { + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - {createdAssets} {nameof(WorldObjectAssetReference)} created for {assetDatabase.DatabaseName}."); + } + + if (modifiedAssets > 0) { - Object.DestroyImmediate(asset); + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - {modifiedAssets} {nameof(WorldObjectAssetReference)} modified for {assetDatabase.DatabaseName}."); + } + + if (modifiedAssets == 0 && createdAssets == 0) + { + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - No {nameof(WorldObjectAssetReference)} were modified or created for {assetDatabase.DatabaseName}."); } } - /// - /// Creates the WorldObjectAssetReference asset in the correct path. - /// - /// The asset to include in this WorldObjectAsset. - /// The related database. - [NotNull] - private static WorldObjectAssetReference CreateWorldObjectAssetReference(GameObject gameObject, string assetDatabaseName) + private static WorldObjectAssetReference CreateWorldObjectAssetReference(string gameObjectName, string assetDatabaseName) { WorldObjectAssetReference worldObjectAssetReference = ScriptableObject.CreateInstance(); - worldObjectAssetReference.Id = gameObject.name; + worldObjectAssetReference.Id = gameObjectName; worldObjectAssetReference.Database = assetDatabaseName; - if (!gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset)) + UnityEditor.AssetDatabase.CreateAsset(worldObjectAssetReference, $"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset"); + + HasModifiedAssetsWhenGenerating = true; + + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - Creating {worldObjectAssetReference.Id} WorldObjectReferenceAsset as it was missing."); + + return worldObjectAssetReference; + } + + private static void CleanupWorldObjectAssetReferences(List assetDatabases) + { + List> assetsToDestroy = new List>(); + List> nullSavedAssetReferences = SavedAssetReferences.Where(pair => pair.Value == null).ToList(); + + foreach (KeyValuePair pair in nullSavedAssetReferences) { - return worldObjectAssetReference; + SavedAssetReferences.Remove(pair.Key); } - if (worldObjectAsset.Asset == worldObjectAssetReference) + List assetDatabaseAssets = new List(); + + foreach (AssetDatabase database in assetDatabases) { - return worldObjectAssetReference; + assetDatabaseAssets.AddRange(database.Assets.Values.Select(o => o.name)); + } + + foreach (KeyValuePair savedAsset in SavedAssetReferences) + { + if (assetDatabaseAssets.Exists(assetName => assetName == savedAsset.Value.Id)) + { + continue; + } + + assetsToDestroy.Add(savedAsset); + } + + foreach (KeyValuePair asset in assetsToDestroy) + { + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - Destroying {asset.Value.name} as there's no prefab associated with it."); + + HasModifiedAssetsWhenGenerating = true; + + UnityEditor.AssetDatabase.DeleteAsset(asset.Key); + } + } + + private static void LoadAllWorldObjectAssetReferences() + { + SavedAssetReferences.Clear(); + + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - Loading all {nameof(WorldObjectAssetReference)} assets under {WorldObjectAssetPath}"); + + string[] loadAllAssetsAtPath = UnityEditor.AssetDatabase.FindAssets($"t:{nameof(WorldObjectAssetReference)}"); + + foreach (string assetGuid in loadAllAssetsAtPath) + { + string assetPath = UnityEditor.AssetDatabase.GUIDToAssetPath(assetGuid); + WorldObjectAssetReference worldObjectAssetReference = UnityEditor.AssetDatabase.LoadAssetAtPath(assetPath); + + SavedAssetReferences.Add(assetPath, worldObjectAssetReference); + } + } + + /// + /// Creates the WorldObjectAssetReference asset in the correct path. + /// + /// + /// The asset to include in this WorldObjectAsset. + /// The related database. + private static void UpdateWorldObjectAssetReference(WorldObjectAssetReference worldObjectAssetReference, GameObject gameObject, ref int modifiedCount) + { + if (!gameObject.TryGetComponent(out IWorldObjectAsset worldObjectAsset) || worldObjectAsset.Asset == worldObjectAssetReference) + { + return; } worldObjectAsset.Asset = worldObjectAssetReference; + modifiedCount++; + + SetAssetAndPrefabDirty(worldObjectAssetReference, gameObject); + + Debug.Log($"[{nameof(AssetDatabasesCodeGenerator)}] - WorldObjectReferenceAsset reference on {gameObject.name}'s prefab was missing. Fixed."); + } + + private static void SetAssetAndPrefabDirty(WorldObjectAssetReference worldObjectAssetReference, GameObject gameObject) + { + HasModifiedAssetsWhenGenerating = true; + EditorUtility.SetDirty(gameObject); EditorUtility.SetDirty(worldObjectAssetReference); - return worldObjectAssetReference; } } } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs index ff9ccdd5d9..87b0359b87 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/InspectorEditor/AssetDatabaseSettingsInspectorEditor.cs @@ -119,7 +119,7 @@ public void HandleProjectChanged() { LoadDatabases(); - FindAndLoadAllAssetsDatabasesAddressablesGroups(); + // FindAndLoadAllAssetsDatabasesAddressablesGroups(); } private void HandleLoadDatabasesButtonPressedGUI() From e9dc99564eeacd153fec8d46c51843c93398413e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Thu, 7 Dec 2023 00:31:38 -0300 Subject: [PATCH 25/32] Fix databases and WorldAssetReferences --- Assets/Content/Data/Databases/BodyParts.asset | 21 -- Assets/Content/Data/Databases/Items.asset | 206 ++++++++++++------ .../Data/{ => Databases}/Materials.asset | 14 +- .../Data/{ => Databases}/Materials.asset.meta | 2 +- Assets/Content/Data/Databases/Sounds.asset | 39 ++++ .../Data/{ => Databases}/Sounds.asset.meta | 0 Assets/Content/Data/Sounds.asset | 28 --- .../AttackParticles.asset.meta | 2 +- .../{HumanHeadItem.asset => Backpack.asset} | 4 +- ...eftItem.asset.meta => Backpack.asset.meta} | 2 +- .../BleedingParticle.asset.meta | 2 +- ...umanBrainItem.asset => HumanArmLeft.asset} | 4 +- .../HumanArmLeft.asset.meta} | 2 +- ...manHeartItem.asset => HumanArmRight.asset} | 4 +- ...em.asset.meta => HumanArmRight.asset.meta} | 2 +- .../HumanArmRightItem.asset | 16 -- ...{HumanTorsoItem.asset => HumanBrain.asset} | 4 +- ...nItem.asset.meta => HumanBrain.asset.meta} | 2 +- .../HumanEarLeft.asset | 16 ++ .../HumanEarLeft.asset.meta | 8 + .../HumanEarLeftItem.asset | 16 -- .../HumanEarLeftItem.asset.meta | 8 - .../HumanEarRight.asset | 16 ++ .../HumanEarRight.asset.meta | 8 + .../HumanEarRightItem.asset | 16 -- .../HumanEarRightItem.asset.meta | 8 - .../WorldObjectAssetReferences/HumanEye.asset | 16 ++ .../HumanEye.asset.meta | 8 + .../HumanFootLeft.asset | 16 ++ .../HumanFootLeft.asset.meta | 8 + .../HumanFootLeftItem.asset | 16 -- .../HumanFootLeftItem.asset.meta | 8 - .../HumanFootRight.asset | 16 ++ .../HumanFootRight.asset.meta | 8 + .../HumanFootRightItem.asset | 16 -- .../HumanFootRightItem.asset.meta | 8 - .../HumanHandLeft.asset | 2 +- .../HumanHandLeftItem.asset | 16 -- .../HumanHandLeftItem.asset.meta | 8 - .../HumanHandRight.asset | 2 +- .../HumanHandRightItem.asset | 16 -- .../HumanHandRightItem.asset.meta | 8 - .../HumanHead.asset | 16 ++ .../HumanHead.asset.meta | 8 + .../HumanHeadItem.asset.meta | 8 - .../HumanHeart.asset | 16 ++ .../HumanHeart.asset.meta | 8 + .../HumanHeartItem.asset.meta | 8 - ...ftItem.asset => HumanIntestineLarge.asset} | 4 +- .../HumanIntestineLarge.asset.meta | 8 + .../HumanLegLeft.asset | 16 ++ .../HumanLegLeft.asset.meta | 8 + .../HumanLegLeftItem.asset | 16 -- .../HumanLegLeftItem.asset.meta | 8 - .../HumanLegRight.asset | 16 ++ .../HumanLegRight.asset.meta | 8 + .../HumanLegRightItem.asset | 16 -- .../HumanLegRightItem.asset.meta | 8 - .../HumanLiver.asset | 16 ++ .../HumanLiver.asset.meta | 8 + .../HumanLungLeft.asset | 16 ++ .../HumanLungLeft.asset.meta | 8 + .../HumanLungLeftItem.asset | 16 -- .../HumanLungLeftItem.asset.meta | 8 - .../HumanLungRight.asset | 16 ++ .../HumanLungRight.asset.meta | 8 + .../HumanLungRightItem.asset | 16 -- .../HumanLungRightItem.asset.meta | 8 - .../HumanStomach.asset | 16 ++ .../HumanStomach.asset.meta | 8 + .../HumanTorso.asset | 16 ++ .../HumanTorso.asset.meta | 8 + .../HumanTorsoItem.asset.meta | 8 - .../LoadingBar.asset.meta | 2 +- .../WorldObjectAssetReferences/Toolbelt.asset | 16 ++ .../Toolbelt.asset.meta | 8 + .../SS3D/Data/Generated/MaterialsIds.cs | 10 - .../Scripts/SS3D/Data/Generated/SoundsIds.cs | 17 -- .../SS3D/Data/Generated/SoundsIds.cs.meta | 11 - 79 files changed, 571 insertions(+), 463 deletions(-) delete mode 100644 Assets/Content/Data/Databases/BodyParts.asset rename Assets/Content/Data/{ => Databases}/Materials.asset (56%) rename Assets/Content/Data/{ => Databases}/Materials.asset.meta (79%) create mode 100644 Assets/Content/Data/Databases/Sounds.asset rename Assets/Content/Data/{ => Databases}/Sounds.asset.meta (100%) delete mode 100644 Assets/Content/Data/Sounds.asset rename Assets/Content/Data/WorldObjectAssetReferences/{HumanHeadItem.asset => Backpack.asset} (90%) rename Assets/Content/Data/WorldObjectAssetReferences/{HumanArmLeftItem.asset.meta => Backpack.asset.meta} (79%) rename Assets/Content/Data/WorldObjectAssetReferences/{HumanBrainItem.asset => HumanArmLeft.asset} (89%) rename Assets/Content/Data/{Databases/BodyParts.asset.meta => WorldObjectAssetReferences/HumanArmLeft.asset.meta} (79%) rename Assets/Content/Data/WorldObjectAssetReferences/{HumanHeartItem.asset => HumanArmRight.asset} (89%) rename Assets/Content/Data/WorldObjectAssetReferences/{HumanArmRightItem.asset.meta => HumanArmRight.asset.meta} (79%) delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset rename Assets/Content/Data/WorldObjectAssetReferences/{HumanTorsoItem.asset => HumanBrain.asset} (89%) rename Assets/Content/Data/WorldObjectAssetReferences/{HumanBrainItem.asset.meta => HumanBrain.asset.meta} (79%) create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta rename Assets/Content/Data/WorldObjectAssetReferences/{HumanArmLeftItem.asset => HumanIntestineLarge.asset} (87%) create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset.meta delete mode 100644 Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta diff --git a/Assets/Content/Data/Databases/BodyParts.asset b/Assets/Content/Data/Databases/BodyParts.asset deleted file mode 100644 index 531da208e7..0000000000 --- a/Assets/Content/Data/Databases/BodyParts.asset +++ /dev/null @@ -1,21 +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: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} - m_Name: Materials - m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: MaterialsIds - AssetGroup: {fileID: 11400000, guid: 2caa591261a883b4183d04829ce705fd, type: 2} - Assets: - - {fileID: 2100000, guid: ed5a1263eb564c94abc6407ac0919ea7, type: 2} - - {fileID: 2100000, guid: e9b99cfb2e59ffa40a062c2f4b88b729, type: 2} - - {fileID: 2100000, guid: 6d2a18aa72cbaf94694dce9f8451160b, type: 2} diff --git a/Assets/Content/Data/Databases/Items.asset b/Assets/Content/Data/Databases/Items.asset index dfffc546eb..20a730fbf1 100644 --- a/Assets/Content/Data/Databases/Items.asset +++ b/Assets/Content/Data/Databases/Items.asset @@ -12,76 +12,140 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Items m_EditorClassIdentifier: - EnumName: Items + DatabaseName: Items AssetGroup: {fileID: 11400000, guid: 8e95016540bf27c4eb11580ec096568a, type: 2} Assets: - - {fileID: 6891363543938182813, guid: 11f824c472e04854e95065dda095e8f4, type: 3} - - {fileID: 6891363543938182813, guid: 1ae18785d74e9fa4699b6f6de889c243, type: 3} - - {fileID: 5533951594911835035, guid: 264ea51d92067c14ebc6633999afac78, type: 3} - - {fileID: 5261116577612792016, guid: 2a63163a4db141744a802f3ff67087db, type: 3} - - {fileID: 5261116577612792016, guid: ff95abc9c2b779340a1b50f1a128a934, type: 3} - - {fileID: 5261116577612792016, guid: 79260483ae5d3e04fa272e092b49abac, type: 3} - - {fileID: 5261116577612792016, guid: d8b0c8d1ddcdeb24d9763054c103c9fe, type: 3} - - {fileID: 5261116577612792016, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3} - - {fileID: 3995435954105705608, guid: 92d6696a323ef66448190e8e9d69fd22, type: 3} - - {fileID: 8047892061280000217, guid: dceb056e41b5c634f9933423de8e075c, type: 3} - - {fileID: 5774385816057912484, guid: e4281cb43d1443d4388737777fdd98d8, type: 3} - - {fileID: 2434868383632068905, guid: a7c35693adae32f43b4d7fe2eb8b091b, type: 3} - - {fileID: 6405503896595845848, guid: 4e6899916bc8fd742a07f32b3a04de12, type: 3} - - {fileID: 4482577744063562115, guid: f490a74616c067c4f83995017e10b420, type: 3} - - {fileID: 169984495843080388, guid: 177428b73bad0fb4a89d1a64b85629bf, type: 3} - - {fileID: 5161561551087789900, guid: b044d7bdb55405046a9055726a779eb1, type: 3} - - {fileID: 4068007204767187790, guid: 2332a158259900e4f8a237fa8daff266, type: 3} - - {fileID: 4068007204767187790, guid: b5be0a52925e2674193d081d2deb68cb, type: 3} - - {fileID: 4068007204767187790, guid: 162e188d33a82b440a239f20901c716a, type: 3} - - {fileID: 3969530706517246485, guid: 56b1aff2041026242bed0f064dee56bb, type: 3} - - {fileID: 8197868818743549203, guid: 1d2cf546d53e3fe4c9103007427aaec7, type: 3} - - {fileID: 7125681683583715523, guid: 404443f7c306fc8469698745624fa3bf, type: 3} - - {fileID: 7125681683583715523, guid: f88a398ad3d01454f955de9c337d9b99, type: 3} - - {fileID: 7125681683583715523, guid: 4cb99cf2fee96f944abbacc51b0b701c, type: 3} - - {fileID: 1888703706215615217, guid: 7becfab153276864f9fc7636a839d837, type: 3} - - {fileID: 2402587210622244651, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3} - - {fileID: 3792017003477948967, guid: 772da386eb7b01745913050fee544c32, type: 3} - - {fileID: 833752496874958856, guid: 781dd9024aaa53444bc3deeaa9708fbb, type: 3} - - {fileID: 3794527162878356835, guid: 411b513efc8f06a40aecfc47d0c5fc5a, type: 3} - - {fileID: 2601952054522247362, guid: 1ef3c21a685ec2d4e9f0876719839d5f, type: 3} - - {fileID: 2667451333340596270, guid: 9b9f6bd470226a74b903e74dbe9e423a, type: 3} - - {fileID: 1687938131941834081, guid: bf177f8bab26bc84b87fd9a971004418, type: 3} - - {fileID: 739222591386748088, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3} - - {fileID: 4581819739591165899, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3} - - {fileID: 3945981868420553423, guid: 7f49c948ec182a648ab280a22038752a, type: 3} - - {fileID: 7393721560307922778, guid: 991fc7d67bda7d247b13ec8498953bc0, type: 3} - - {fileID: 624365323667193292, guid: 236b51ddc6f9aa94ca92579082370c06, type: 3} - - {fileID: 6003340987905195654, guid: 5fa15d6fdef93dc4e80d798cefe8be0b, type: 3} - - {fileID: 930591319891399865, guid: 317ec7dcff3b11d4eae3a47929200b93, type: 3} - - {fileID: 60374868058361228, guid: 4b790b4ffedbe564dab49f896d71eaa6, type: 3} - - {fileID: 2653363475000095017, guid: d7d68992cbd3cda45bb11a35a1490dc3, type: 3} - - {fileID: 726792282085660869, guid: 4635651592391df41b6b2413afdb76c3, type: 3} - - {fileID: 7723921361698481624, guid: f549f4153ef612c4586c46ea280e0e94, type: 3} - - {fileID: 8712940276313799639, guid: 1a2f912be4bc1b948a2b22ffde517cdc, type: 3} - - {fileID: 1888615333292121711, guid: 06b6be83779804245b7f6411fe07b851, type: 3} - - {fileID: 832941577213411195, guid: 432a4ad70e41e5c4f8f913f76fe0e66c, type: 3} - - {fileID: 3861326785315191697, guid: e02f11b9239b52748a5ed5afd1c5cbd3, type: 3} - - {fileID: 3299576395946724586, guid: 30794a01d5f4c174a9d20b2c632f2dca, type: 3} - - {fileID: 6958959792659314810, guid: 94aaf82bb6ab002418e01d9cc7c6eaaa, type: 3} - - {fileID: 6632297082311541152, guid: e60ba1e09be8316448e419ecbdfb64a6, type: 3} - - {fileID: 2207730063960764759, guid: 35dfc7c3f708a5b48a206b4a44e7ab49, type: 3} - - {fileID: 7546631754298856378, guid: 7f5954f009d06b2439ca637b43920440, type: 3} - - {fileID: 8006468508714419156, guid: cc54bc74b2f4c2349b1f84b501b0a091, type: 3} - - {fileID: 3470038122221450171, guid: ecaf79b0a74bdb443a350e88daa94a66, type: 3} - - {fileID: 5562010227207703736, guid: 4a9d34a6cf84ef045a740513d8ae30b1, type: 3} - - {fileID: 8256619991674398311, guid: 242a937784a622f4f8a6e6d097e0737c, type: 3} - - {fileID: 8304480218026041231, guid: a8b265034e3f79344a6067b406e1bff6, type: 3} - - {fileID: 1705603677127675533, guid: a019475d05ec8824494b0fa88e2282d8, type: 3} - - {fileID: 5774385816057912484, guid: 2bc6f6a968d5ba04c919ba56d0ccdab4, type: 3} - - {fileID: 5774385816057912484, guid: d75ff9a3ac207a84487ec1ee73a676fc, type: 3} - - {fileID: 5774385816057912484, guid: 1e304f9a331c2ba419514ef8afb8a13c, type: 3} - - {fileID: 5774385816057912484, guid: 071581df025e1ba49a8a75eb39611ff6, type: 3} - - {fileID: 5774385816057912484, guid: 7579883b8dd8801448a176adace4860b, type: 3} - - {fileID: 1080889307602868191, guid: 40d904629802fc942860ce878e78efef, type: 3} - - {fileID: 802333698458937824, guid: ddaa28fac1956b2428aff1dac1d89707, type: 3} - - {fileID: 2302397424301738637, guid: fccdc78a6cf916047ba52f2877f755e5, type: 3} - - {fileID: 2402587210622244651, guid: 41a1c8c211dc32c4d8ffca5f0892f9dc, type: 3} - - {fileID: 2402587210622244651, guid: 2ca5f2886cf2f19428b50bf284689b86, type: 3} - - {fileID: 7927487060350510867, guid: c69ed93dc225ea049bbf1a02662c48c0, type: 3} - - {fileID: 2402587210622244651, guid: de67200a4c96d444f800399a033ddfef, type: 3} + _list: + - _key: BikeHorn + _value: {fileID: 6891363543938182813, guid: 11f824c472e04854e95065dda095e8f4, type: 3} + - _key: NuclearAuthenticationDisk + _value: {fileID: 6891363543938182813, guid: 1ae18785d74e9fa4699b6f6de889c243, type: 3} + - _key: ToolboxBlue + _value: {fileID: 5533951594911835035, guid: 264ea51d92067c14ebc6633999afac78, type: 3} + - _key: SecurityPDA + _value: {fileID: 5261116577612792016, guid: 2a63163a4db141744a802f3ff67087db, type: 3} + - _key: SecurityIDCard + _value: {fileID: 5261116577612792016, guid: ff95abc9c2b779340a1b50f1a128a934, type: 3} + - _key: PDA + _value: {fileID: 5261116577612792016, guid: 79260483ae5d3e04fa272e092b49abac, type: 3} + - _key: IDCard + _value: {fileID: 5261116577612792016, guid: d8b0c8d1ddcdeb24d9763054c103c9fe, type: 3} + - _key: Mug + _value: {fileID: 5261116577612792016, guid: d9aabfd5d726a7f499b8e360d919eba4, type: 3} + - _key: SodaCanCola + _value: {fileID: 3995435954105705608, guid: 92d6696a323ef66448190e8e9d69fd22, type: 3} + - _key: SodaCanCannedLaughter + _value: {fileID: 8047892061280000217, guid: dceb056e41b5c634f9933423de8e075c, type: 3} + - _key: SodaCanCannedAir + _value: {fileID: 5774385816057912484, guid: e4281cb43d1443d4388737777fdd98d8, type: 3} + - _key: SodaCanTonic + _value: {fileID: 2434868383632068905, guid: a7c35693adae32f43b4d7fe2eb8b091b, type: 3} + - _key: SodaCanBeepyLime + _value: {fileID: 6405503896595845848, guid: 4e6899916bc8fd742a07f32b3a04de12, type: 3} + - _key: SodaCanBeepsSoda + _value: {fileID: 4482577744063562115, guid: f490a74616c067c4f83995017e10b420, type: 3} + - _key: SodaCanDukePurpleTea + _value: {fileID: 169984495843080388, guid: 177428b73bad0fb4a89d1a64b85629bf, type: 3} + - _key: Poster + _value: {fileID: 5161561551087789900, guid: b044d7bdb55405046a9055726a779eb1, type: 3} + - _key: MedicalPatch + _value: {fileID: 4068007204767187790, guid: 2332a158259900e4f8a237fa8daff266, type: 3} + - _key: BrutePatch + _value: {fileID: 4068007204767187790, guid: b5be0a52925e2674193d081d2deb68cb, type: 3} + - _key: BurnPatch + _value: {fileID: 4068007204767187790, guid: 162e188d33a82b440a239f20901c716a, type: 3} + - _key: DonkPocket + _value: {fileID: 3969530706517246485, guid: 56b1aff2041026242bed0f064dee56bb, type: 3} + - _key: Boombox + _value: {fileID: 8197868818743549203, guid: 1d2cf546d53e3fe4c9103007427aaec7, type: 3} + - _key: GreyFloorTile + _value: {fileID: 7125681683583715523, guid: 404443f7c306fc8469698745624fa3bf, type: 3} + - _key: SteelReinforcedSheet + _value: {fileID: 7125681683583715523, guid: f88a398ad3d01454f955de9c337d9b99, type: 3} + - _key: SteelSheet + _value: {fileID: 7125681683583715523, guid: 4cb99cf2fee96f944abbacc51b0b701c, type: 3} + - _key: Crowbar + _value: {fileID: 1888703706215615217, guid: 7becfab153276864f9fc7636a839d837, type: 3} + - _key: Screwdriver + _value: {fileID: 2402587210622244651, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3} + - _key: Wrench + _value: {fileID: 3792017003477948967, guid: 772da386eb7b01745913050fee544c32, type: 3} + - _key: FlashlightBlue + _value: {fileID: 833752496874958856, guid: 781dd9024aaa53444bc3deeaa9708fbb, type: 3} + - _key: KitchenKnife + _value: {fileID: 3794527162878356835, guid: 411b513efc8f06a40aecfc47d0c5fc5a, type: 3} + - _key: TruckerCap + _value: {fileID: 2601952054522247362, guid: 1ef3c21a685ec2d4e9f0876719839d5f, type: 3} + - _key: Sunglasses + _value: {fileID: 2667451333340596270, guid: 9b9f6bd470226a74b903e74dbe9e423a, type: 3} + - _key: FacewearGasMask + _value: {fileID: 1687938131941834081, guid: bf177f8bab26bc84b87fd9a971004418, type: 3} + - _key: GlovesInsulatedLeft + _value: {fileID: 739222591386748088, guid: f1aeab0a35c29314a8a3f823de9815c1, type: 3} + - _key: GlovesInsulatedRight + _value: {fileID: 4581819739591165899, guid: 8725b7f8f45d28a4ba6063318904cc8a, type: 3} + - _key: JumpsuitBotany + _value: {fileID: 3945981868420553423, guid: 7f49c948ec182a648ab280a22038752a, type: 3} + - _key: JumpsuitEngineer + _value: {fileID: 7393721560307922778, guid: 991fc7d67bda7d247b13ec8498953bc0, type: 3} + - _key: JumpsuitGrey + _value: {fileID: 624365323667193292, guid: 236b51ddc6f9aa94ca92579082370c06, type: 3} + - _key: ShoesHiTopsLeft + _value: {fileID: 6003340987905195654, guid: 5fa15d6fdef93dc4e80d798cefe8be0b, type: 3} + - _key: ShoesHiTopsRight + _value: {fileID: 930591319891399865, guid: 317ec7dcff3b11d4eae3a47929200b93, type: 3} + - _key: ShoesJackbootsLeft + _value: {fileID: 60374868058361228, guid: 4b790b4ffedbe564dab49f896d71eaa6, type: 3} + - _key: ShoesJackbootsRight + _value: {fileID: 2653363475000095017, guid: d7d68992cbd3cda45bb11a35a1490dc3, type: 3} + - _key: JumpsuitSecurity + _value: {fileID: 726792282085660869, guid: 4635651592391df41b6b2413afdb76c3, type: 3} + - _key: HeadsetLeft + _value: {fileID: 7723921361698481624, guid: f549f4153ef612c4586c46ea280e0e94, type: 3} + - _key: HeadsetRight + _value: {fileID: 8712940276313799639, guid: 1a2f912be4bc1b948a2b22ffde517cdc, type: 3} + - _key: HumanArmLeft + _value: {fileID: 1888615333292121711, guid: 06b6be83779804245b7f6411fe07b851, type: 3} + - _key: HumanArmRight + _value: {fileID: 832941577213411195, guid: 432a4ad70e41e5c4f8f913f76fe0e66c, type: 3} + - _key: HumanEarLeft + _value: {fileID: 3861326785315191697, guid: e02f11b9239b52748a5ed5afd1c5cbd3, type: 3} + - _key: HumanEarRight + _value: {fileID: 3299576395946724586, guid: 30794a01d5f4c174a9d20b2c632f2dca, type: 3} + - _key: HumanFootLeft + _value: {fileID: 6958959792659314810, guid: 94aaf82bb6ab002418e01d9cc7c6eaaa, type: 3} + - _key: HumanFootRight + _value: {fileID: 6632297082311541152, guid: e60ba1e09be8316448e419ecbdfb64a6, type: 3} + - _key: HumanHandLeft + _value: {fileID: 2207730063960764759, guid: 35dfc7c3f708a5b48a206b4a44e7ab49, type: 3} + - _key: HumanHandRight + _value: {fileID: 7546631754298856378, guid: 7f5954f009d06b2439ca637b43920440, type: 3} + - _key: HumanHead + _value: {fileID: 8006468508714419156, guid: cc54bc74b2f4c2349b1f84b501b0a091, type: 3} + - _key: HumanLegLeft + _value: {fileID: 3470038122221450171, guid: ecaf79b0a74bdb443a350e88daa94a66, type: 3} + - _key: HumanTorso + _value: {fileID: 5562010227207703736, guid: 4a9d34a6cf84ef045a740513d8ae30b1, type: 3} + - _key: HumanLegRight + _value: {fileID: 8256619991674398311, guid: 242a937784a622f4f8a6e6d097e0737c, type: 3} + - _key: HumanLungRight + _value: {fileID: 8304480218026041231, guid: a8b265034e3f79344a6067b406e1bff6, type: 3} + - _key: HumanLungLeft + _value: {fileID: 1705603677127675533, guid: a019475d05ec8824494b0fa88e2282d8, type: 3} + - _key: HumanStomach + _value: {fileID: 5774385816057912484, guid: 2bc6f6a968d5ba04c919ba56d0ccdab4, type: 3} + - _key: HumanLiver + _value: {fileID: 5774385816057912484, guid: d75ff9a3ac207a84487ec1ee73a676fc, type: 3} + - _key: HumanIntestineLarge + _value: {fileID: 5774385816057912484, guid: 1e304f9a331c2ba419514ef8afb8a13c, type: 3} + - _key: HumanEye + _value: {fileID: 5774385816057912484, guid: 071581df025e1ba49a8a75eb39611ff6, type: 3} + - _key: HumanBrain + _value: {fileID: 5774385816057912484, guid: 7579883b8dd8801448a176adace4860b, type: 3} + - _key: Toolbelt + _value: {fileID: 1080889307602868191, guid: 40d904629802fc942860ce878e78efef, type: 3} + - _key: Backpack + _value: {fileID: 802333698458937824, guid: ddaa28fac1956b2428aff1dac1d89707, type: 3} + - _key: HumanHeart + _value: {fileID: 2302397424301738637, guid: fccdc78a6cf916047ba52f2877f755e5, type: 3} + _new: diff --git a/Assets/Content/Data/Materials.asset b/Assets/Content/Data/Databases/Materials.asset similarity index 56% rename from Assets/Content/Data/Materials.asset rename to Assets/Content/Data/Databases/Materials.asset index 531da208e7..b4183d2f1f 100644 --- a/Assets/Content/Data/Materials.asset +++ b/Assets/Content/Data/Databases/Materials.asset @@ -12,10 +12,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} m_Name: Materials m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: MaterialsIds + DatabaseName: Materials AssetGroup: {fileID: 11400000, guid: 2caa591261a883b4183d04829ce705fd, type: 2} Assets: - - {fileID: 2100000, guid: ed5a1263eb564c94abc6407ac0919ea7, type: 2} - - {fileID: 2100000, guid: e9b99cfb2e59ffa40a062c2f4b88b729, type: 2} - - {fileID: 2100000, guid: 6d2a18aa72cbaf94694dce9f8451160b, type: 2} + _list: + - _key: DeleteConstruction + _value: {fileID: 2100000, guid: ed5a1263eb564c94abc6407ac0919ea7, type: 2} + - _key: InvalidConstruction + _value: {fileID: 2100000, guid: e9b99cfb2e59ffa40a062c2f4b88b729, type: 2} + - _key: ValidConstruction + _value: {fileID: 2100000, guid: 6d2a18aa72cbaf94694dce9f8451160b, type: 2} + _new: diff --git a/Assets/Content/Data/Materials.asset.meta b/Assets/Content/Data/Databases/Materials.asset.meta similarity index 79% rename from Assets/Content/Data/Materials.asset.meta rename to Assets/Content/Data/Databases/Materials.asset.meta index 5fdb8ffd31..12c14785ee 100644 --- a/Assets/Content/Data/Materials.asset.meta +++ b/Assets/Content/Data/Databases/Materials.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51c28dd8b59ae0540a4e2cbcceb4999e +guid: acbbffb4c89caec469bb21b6197c7626 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/Databases/Sounds.asset b/Assets/Content/Data/Databases/Sounds.asset new file mode 100644 index 0000000000..dbb671b685 --- /dev/null +++ b/Assets/Content/Data/Databases/Sounds.asset @@ -0,0 +1,39 @@ +%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: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} + m_Name: Sounds + m_EditorClassIdentifier: + DatabaseName: Sounds + AssetGroup: {fileID: 11400000, guid: d640c8e212e7a5349999a9ddd6ffb5b5, type: 2} + Assets: + _list: + - _key: BikeHorn + _value: {fileID: 8300000, guid: 8c8823796bbcb23438fcf68260070383, type: 3} + - _key: Title1 + _value: {fileID: 8300000, guid: ec8b849764a7e9147b2a565f81a1ca42, type: 3} + - _key: Title2 + _value: {fileID: 8300000, guid: 3f51862f0b88a5243a8cceb97147489d, type: 3} + - _key: Title3 + _value: {fileID: 8300000, guid: fd331e360db5fbb448e66367e41d1893, type: 3} + - _key: Can1 + _value: {fileID: 8300000, guid: 1a34c805f84be3b4caac14d7de790607, type: 3} + - _key: Can2 + _value: {fileID: 8300000, guid: 8d93fdf9dcada204a952e29213f0293f, type: 3} + - _key: Can3 + _value: {fileID: 8300000, guid: b315c4abdef36244fb211c5f643d411a, type: 3} + - _key: Can4 + _value: {fileID: 8300000, guid: f00c6b5a098e84b4b87d80d23b4f295a, type: 3} + - _key: AirlockClose + _value: {fileID: 8300000, guid: fc2485e75c5d3ab4e86e814043c9e9cb, type: 3} + - _key: AirlockOpen + _value: {fileID: 8300000, guid: 34297ba204a9f3944872f100baaa2369, type: 3} + _new: diff --git a/Assets/Content/Data/Sounds.asset.meta b/Assets/Content/Data/Databases/Sounds.asset.meta similarity index 100% rename from Assets/Content/Data/Sounds.asset.meta rename to Assets/Content/Data/Databases/Sounds.asset.meta diff --git a/Assets/Content/Data/Sounds.asset b/Assets/Content/Data/Sounds.asset deleted file mode 100644 index c375dd652d..0000000000 --- a/Assets/Content/Data/Sounds.asset +++ /dev/null @@ -1,28 +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: 3c9b6c8ad6324c838c1743c2a2e2abc4, type: 3} - m_Name: Sounds - m_EditorClassIdentifier: - EnumNamespaceName: SS3D.Data.Enums - EnumName: SoundsIds - AssetGroup: {fileID: 11400000, guid: d640c8e212e7a5349999a9ddd6ffb5b5, type: 2} - Assets: - - {fileID: 8300000, guid: 8c8823796bbcb23438fcf68260070383, type: 3} - - {fileID: 8300000, guid: ec8b849764a7e9147b2a565f81a1ca42, type: 3} - - {fileID: 8300000, guid: 3f51862f0b88a5243a8cceb97147489d, type: 3} - - {fileID: 8300000, guid: fd331e360db5fbb448e66367e41d1893, type: 3} - - {fileID: 8300000, guid: 1a34c805f84be3b4caac14d7de790607, type: 3} - - {fileID: 8300000, guid: 8d93fdf9dcada204a952e29213f0293f, type: 3} - - {fileID: 8300000, guid: b315c4abdef36244fb211c5f643d411a, type: 3} - - {fileID: 8300000, guid: f00c6b5a098e84b4b87d80d23b4f295a, type: 3} - - {fileID: 8300000, guid: fc2485e75c5d3ab4e86e814043c9e9cb, type: 3} - - {fileID: 8300000, guid: 34297ba204a9f3944872f100baaa2369, type: 3} diff --git a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta index 407840c5d0..fe875aecbc 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/AttackParticles.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7f455a06223228543b86556fd825b2ce +guid: 3acd784d74c5a7542acbe5b0624f1685 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset similarity index 90% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset rename to Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset index 8297d706e8..63a7906cf5 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanHeadItem + m_Name: Backpack m_EditorClassIdentifier: - Id: HumanHeadItem + Id: Backpack Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset.meta similarity index 79% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta rename to Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset.meta index 8ca4a50ec4..e5a6d606af 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Backpack.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3263f10a876daa84f9e29324025a80a0 +guid: 9435365903a79d64184af9ee71e060e5 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta index 850e0cfc77..5ee2af2115 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/BleedingParticle.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 62097e85008f15f45aab66560146a649 +guid: 04bb42a4a282a084faf74aae28f6c211 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset similarity index 89% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset rename to Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset index 4c71d7755e..afec869cd4 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanBrainItem + m_Name: HumanArmLeft m_EditorClassIdentifier: - Id: HumanBrainItem + Id: HumanArmLeft Database: Items diff --git a/Assets/Content/Data/Databases/BodyParts.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset.meta similarity index 79% rename from Assets/Content/Data/Databases/BodyParts.asset.meta rename to Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset.meta index 5fdb8ffd31..dd8a87c912 100644 --- a/Assets/Content/Data/Databases/BodyParts.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeft.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51c28dd8b59ae0540a4e2cbcceb4999e +guid: 65ddb98ffcb07124ca3cf190d4697e17 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset similarity index 89% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset rename to Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset index 6cca825050..ccb75ddae5 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanHeartItem + m_Name: HumanArmRight m_EditorClassIdentifier: - Id: HumanHeartItem + Id: HumanArmRight Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset.meta similarity index 79% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta rename to Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset.meta index 7de90790b6..cb15893be8 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRight.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1ea80580f09b0234cb3789de8736c5a5 +guid: 88956351edbeceb4cb05da2eef70510a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset deleted file mode 100644 index 98f2044418..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanArmRightItem - m_EditorClassIdentifier: - Id: HumanArmRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset similarity index 89% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset rename to Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset index e5b9d61e1e..039f6ca27b 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanTorsoItem + m_Name: HumanBrain m_EditorClassIdentifier: - Id: HumanTorsoItem + Id: HumanBrain Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset.meta similarity index 79% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta rename to Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset.meta index 038f5e421e..c109187e9b 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanBrainItem.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanBrain.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bbab02faaef738d478d8171287046046 +guid: 9af56738e13323d4896f47de26c1fbd7 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset new file mode 100644 index 0000000000..f0711f986b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanEarLeft + m_EditorClassIdentifier: + Id: HumanEarLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset.meta new file mode 100644 index 0000000000..f67c6bb679 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a5607c6209a86434dacd6a54a4d368b1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset deleted file mode 100644 index 9dda16679f..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanEarLeftItem - m_EditorClassIdentifier: - Id: HumanEarLeftItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta deleted file mode 100644 index fad35cf42f..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarLeftItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 045c92e652593274d953d3bdd5b8f604 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset new file mode 100644 index 0000000000..28ae2a9d30 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanEarRight + m_EditorClassIdentifier: + Id: HumanEarRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset.meta new file mode 100644 index 0000000000..a9e9766d31 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2660a129337b4564c912e01997e28743 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset deleted file mode 100644 index f7dbcb1e4f..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanEarRightItem - m_EditorClassIdentifier: - Id: HumanEarRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta deleted file mode 100644 index d5037f2659..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanEarRightItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cd7541ae37a30fe46af43528d911e2c3 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset new file mode 100644 index 0000000000..b123a96ebc --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanEye + m_EditorClassIdentifier: + Id: HumanEye + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset.meta new file mode 100644 index 0000000000..c330fbd1da --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanEye.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 956a67e081e1c7746aed2e7ea0914661 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset new file mode 100644 index 0000000000..6b830cb663 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanFootLeft + m_EditorClassIdentifier: + Id: HumanFootLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset.meta new file mode 100644 index 0000000000..b30903bd83 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6c966d7bdccf4e48990e5da87ba0aab +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset deleted file mode 100644 index 0604184735..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanFootLeftItem - m_EditorClassIdentifier: - Id: HumanFootLeftItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta deleted file mode 100644 index abf7563fd0..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootLeftItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e73c2d229e3614c49a29f4dcadda943e -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset new file mode 100644 index 0000000000..59e72ea3a1 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanFootRight + m_EditorClassIdentifier: + Id: HumanFootRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset.meta new file mode 100644 index 0000000000..d599484da9 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 75d0e1c8cf84f9e4cb3cc356dca5ecd0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset deleted file mode 100644 index 9860ed4fa1..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanFootRightItem - m_EditorClassIdentifier: - Id: HumanFootRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta deleted file mode 100644 index 36bf6554ee..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanFootRightItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5605526c84520c4479830457e758dc28 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset index d19b8cd71c..5e36e9d9a3 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeft.asset @@ -13,4 +13,4 @@ MonoBehaviour: m_Name: HumanHandLeft m_EditorClassIdentifier: Id: HumanHandLeft - Database: Bodyparts + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset deleted file mode 100644 index b3bfcea12f..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanHandLeftItem - m_EditorClassIdentifier: - Id: HumanHandLeftItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta deleted file mode 100644 index 0898b62219..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandLeftItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c3f1f8ac96bc2154e910accebf98a60d -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset index 6bf4ba811f..304fe58984 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRight.asset @@ -13,4 +13,4 @@ MonoBehaviour: m_Name: HumanHandRight m_EditorClassIdentifier: Id: HumanHandRight - Database: Bodyparts + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset deleted file mode 100644 index 07653bcf5e..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanHandRightItem - m_EditorClassIdentifier: - Id: HumanHandRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta deleted file mode 100644 index 83a02adeb8..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHandRightItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1fb4b24f90b0d4d4bbf6eed6d7433af0 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset new file mode 100644 index 0000000000..3658260799 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHead + m_EditorClassIdentifier: + Id: HumanHead + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset.meta new file mode 100644 index 0000000000..26a4de9cf8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHead.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a2e3308047618af46829bdbc0856d60e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta deleted file mode 100644 index f8496289ed..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeadItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 780366ac460ed8a4c81a74b0c7714a57 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset new file mode 100644 index 0000000000..003cb0b298 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanHeart + m_EditorClassIdentifier: + Id: HumanHeart + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset.meta new file mode 100644 index 0000000000..e1c35fd4c1 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeart.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41e8b78fbf3d17642801e36f243225f3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta deleted file mode 100644 index 3462294e3a..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanHeartItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5e02e10a3cbb67440b5f7150803ee968 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset similarity index 87% rename from Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset rename to Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset index 64d55e27d9..eea72af90e 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanArmLeftItem.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanArmLeftItem + m_Name: HumanIntestineLarge m_EditorClassIdentifier: - Id: HumanArmLeftItem + Id: HumanIntestineLarge Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset.meta new file mode 100644 index 0000000000..453e7d043d --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanIntestineLarge.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37fca3e0a17b5b24385bee5de8ead028 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset new file mode 100644 index 0000000000..e27bd98c49 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLegLeft + m_EditorClassIdentifier: + Id: HumanLegLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset.meta new file mode 100644 index 0000000000..8941120569 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 59b91c3c2263caa49abd20f6347f13e3 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset deleted file mode 100644 index 24adcadda0..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanLegLeftItem - m_EditorClassIdentifier: - Id: HumanLegLeftItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta deleted file mode 100644 index 569855f9f4..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegLeftItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 60f6bddc24a947944a89cb94b1e243b6 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset new file mode 100644 index 0000000000..beb1a64456 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLegRight + m_EditorClassIdentifier: + Id: HumanLegRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset.meta new file mode 100644 index 0000000000..cf16914599 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bdf3672429311474e98ba5cc343fe76c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset deleted file mode 100644 index b0dfeea001..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanLegRightItem - m_EditorClassIdentifier: - Id: HumanLegRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta deleted file mode 100644 index 3bd298326f..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLegRightItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 395d93154bb444f4d8b71b82758784a2 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset new file mode 100644 index 0000000000..38163e511e --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLiver + m_EditorClassIdentifier: + Id: HumanLiver + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset.meta new file mode 100644 index 0000000000..c3d01dc619 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLiver.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6577fdc9764f17349899be7dc4671044 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset new file mode 100644 index 0000000000..8fe274f469 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLungLeft + m_EditorClassIdentifier: + Id: HumanLungLeft + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset.meta new file mode 100644 index 0000000000..ab5b2948c8 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeft.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7e55bbc95c6058a4dbe049d4d6b04ef9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset deleted file mode 100644 index 23bf4eec10..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanLungLeftItem - m_EditorClassIdentifier: - Id: HumanLungLeftItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta deleted file mode 100644 index f850eea225..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungLeftItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a2280dc2cae5ed644819c7321607ba10 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset new file mode 100644 index 0000000000..14c37c0f2d --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanLungRight + m_EditorClassIdentifier: + Id: HumanLungRight + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset.meta new file mode 100644 index 0000000000..90759f3381 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRight.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 524803383cc4f494885f36e0571c9e47 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset deleted file mode 100644 index 6fcfb84790..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset +++ /dev/null @@ -1,16 +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: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: HumanLungRightItem - m_EditorClassIdentifier: - Id: HumanLungRightItem - Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta deleted file mode 100644 index 5217085a80..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanLungRightItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 705ba5fcf62094d48b15295dd2acfc0f -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset new file mode 100644 index 0000000000..c3d54065fd --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanStomach + m_EditorClassIdentifier: + Id: HumanStomach + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset.meta new file mode 100644 index 0000000000..71b5cb8b05 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanStomach.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d4e37b5ee952264aadeec1edee7f15a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset new file mode 100644 index 0000000000..6b8f71367f --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: HumanTorso + m_EditorClassIdentifier: + Id: HumanTorso + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset.meta new file mode 100644 index 0000000000..2c9b6a9ca3 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorso.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: da52935a42bdb4d4a82fadfab0e973ff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta deleted file mode 100644 index 845e4ddaa1..0000000000 --- a/Assets/Content/Data/WorldObjectAssetReferences/HumanTorsoItem.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 538c13ee519f34943834289f449a96ba -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta index 31e86f749a..b4c32c7fb1 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/LoadingBar.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b16e0eb6d5206374eb61a55d098aef72 +guid: ee437065c6e86b845b4d96c27dca299c NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset b/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset new file mode 100644 index 0000000000..ba4d490504 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Toolbelt + m_EditorClassIdentifier: + Id: Toolbelt + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset.meta new file mode 100644 index 0000000000..639707954a --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Toolbelt.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9cf2801a7b335074190840fc9112d582 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs b/Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs deleted file mode 100644 index 21f149bd80..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/MaterialsIds.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace SS3D.Data.Enums -{ - public enum MaterialsIds - { - DeleteConstruction = 0, - InvalidConstruction = 1, - ValidConstruction = 2, - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs b/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs deleted file mode 100644 index 837d540c99..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace SS3D.Data.Enums -{ - public enum SoundsIds - { - BikeHorn = 0, - Title1 = 1, - Title2 = 2, - Title3 = 3, - Can1 = 4, - Can2 = 5, - Can3 = 6, - Can4 = 7, - AirlockClose = 8, - AirlockOpen = 9, - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta deleted file mode 100644 index 2914e47254..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/SoundsIds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5076ba30fbde2f24ea6d879b8c720390 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From 035df75007b0ba721b8d45ecdf1b1b350d59cafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Thu, 7 Dec 2023 00:33:32 -0300 Subject: [PATCH 26/32] Fix errors with the database references --- .../Human/HumanBodyParts/HumanArmLeft.prefab | 1 + .../Human/HumanBodyParts/HumanArmRight.prefab | 1 + .../Human/HumanBodyParts/HumanEarLeft.prefab | 1 + .../Human/HumanBodyParts/HumanEarRight.prefab | 1 + .../Human/HumanBodyParts/HumanFootLeft.prefab | 1 + .../HumanBodyParts/HumanFootRight.prefab | 1 + .../Human/HumanBodyParts/HumanHandLeft.prefab | 1 + .../HumanBodyParts/HumanHandRight.prefab | 1 + .../Human/HumanBodyParts/HumanHead.prefab | 1 + .../Human/HumanBodyParts/HumanLegLeft.prefab | 1 + .../Human/HumanBodyParts/HumanLegRight.prefab | 1 + .../Human/HumanBodyParts/HumanTorso.prefab | 1 + .../Human/HumanOrgans/HumanBrain.prefab | 1 + .../Human/HumanOrgans/HumanEye.prefab | 15 +- .../Human/HumanOrgans/HumanHeart.prefab | 1 + .../HumanOrgans/HumanIntestineLarge.prefab | 15 +- .../Human/HumanOrgans/HumanLiver.prefab | 15 +- .../Human/HumanOrgans/HumanLungLeft.prefab | 1 + .../Human/HumanOrgans/HumanLungRight.prefab | 1 + .../Human/HumanOrgans/HumanStomach.prefab | 15 +- .../Items/Clothing/Backpack.prefab | 1 + .../Items/Clothing/FacewearGasMask.prefab | 1 + .../Items/Clothing/GlovesInsulatedLeft.prefab | 1 + .../Clothing/GlovesInsulatedRight.prefab | 1 + .../Items/Clothing/HeadsetLeft.prefab | 1 + .../Items/Clothing/HeadsetRight.prefab | 1 + .../Items/Clothing/JumpsuitBotany.prefab | 1 + .../Items/Clothing/JumpsuitEngineer.prefab | 1 + .../Items/Clothing/JumpsuitGrey.prefab | 1 + .../Items/Clothing/JumpsuitSecurity.prefab | 1 + .../Items/Clothing/ShoesHiTopsLeft.prefab | 1 + .../Items/Clothing/ShoesHiTopsRight.prefab | 1 + .../Items/Clothing/ShoesJackbootsLeft.prefab | 1 + .../Items/Clothing/ShoesJackbootsRight.prefab | 1 + .../Items/Clothing/Sunglasses.prefab | 1 + .../Items/Clothing/Toolbelt.prefab | 1 + .../Items/Clothing/TruckerCap.prefab | 1 + .../Items/Cosmetic/BikeHorn/BikeHorn.prefab | 1 + .../AssetDatabasesCodeGenerator.cs | 12 +- .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 10 ++ .../SS3D/Data/Generated/AssetDatabases.cs | 3 +- Assets/Scripts/SS3D/Data/Generated/Items.cs | 38 +++-- .../Scripts/SS3D/Data/Generated/Materials.cs | 13 ++ .../SS3D/Data/Generated/Materials.cs.meta | 11 ++ Assets/Scripts/SS3D/Data/Generated/Sounds.cs | 20 +++ .../SS3D/Data/Generated/Sounds.cs.meta | 11 ++ .../Scripts/SS3D/Systems/Audio/AudioSystem.cs | 144 +++++++++--------- .../Scripts/SS3D/Systems/Audio/AudioType.cs | 6 +- Assets/Scripts/SS3D/Systems/Audio/Boombox.cs | 38 ++--- .../Systems/Audio/ChangeMusicInteraction.cs | 4 +- .../SS3D/Systems/Audio/NoisyCollision.cs | 124 +++++++++------ .../Systems/Furniture/AirlockStateMachine.cs | 19 +-- .../Systems/Health/BodyParts/HeadBodyPart.cs | 21 ++- .../Systems/Health/BodyParts/HumanTorso.cs | 49 +++--- .../Inventory/Items/Generic/BikeHorn.cs | 11 +- .../TileMapCreator/ConstructionHologram.cs | 26 +--- Assets/Settings/AssetDatabaseSettings.asset | 3 +- 57 files changed, 403 insertions(+), 254 deletions(-) create mode 100644 Assets/Scripts/SS3D/Data/Generated/Materials.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Materials.cs.meta create mode 100644 Assets/Scripts/SS3D/Data/Generated/Sounds.cs create mode 100644 Assets/Scripts/SS3D/Data/Generated/Sounds.cs.meta diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmLeft.prefab index c67e201933..f9b2b551c5 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmLeft.prefab @@ -294,6 +294,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 4393325184408134140} _networkObjectCache: {fileID: 4393325184408134140} + _asset: {fileID: 11400000, guid: 65ddb98ffcb07124ca3cf190d4697e17, type: 2} _name: human arm left _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmRight.prefab index 8f9a34246a..ba11b8fde5 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanArmRight.prefab @@ -294,6 +294,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 9018271319065494059} _networkObjectCache: {fileID: 9018271319065494059} + _asset: {fileID: 11400000, guid: 88956351edbeceb4cb05da2eef70510a, type: 2} _name: human arm right _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarLeft.prefab index 9437f79992..dcebb39c71 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarLeft.prefab @@ -402,6 +402,7 @@ MonoBehaviour: _componentIndexCache: 2 _addedNetworkObject: {fileID: 620291203938498097} _networkObjectCache: {fileID: 620291203938498097} + _asset: {fileID: 11400000, guid: a5607c6209a86434dacd6a54a4d368b1, type: 2} _name: human ear left _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarRight.prefab index 20902fb2b4..30591ae2ea 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanEarRight.prefab @@ -334,6 +334,7 @@ MonoBehaviour: _componentIndexCache: 2 _addedNetworkObject: {fileID: 7851625510101593417} _networkObjectCache: {fileID: 7851625510101593417} + _asset: {fileID: 11400000, guid: 2660a129337b4564c912e01997e28743, type: 2} _name: human ear right _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootLeft.prefab index 8058bd3412..35b0e4ece9 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootLeft.prefab @@ -357,6 +357,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6603268689893490928} _networkObjectCache: {fileID: 6603268689893490928} + _asset: {fileID: 11400000, guid: a6c966d7bdccf4e48990e5da87ba0aab, type: 2} _name: human foot left _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootRight.prefab index f87dff8fb4..8a18ba6c6d 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanFootRight.prefab @@ -388,6 +388,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4370070746774076901} _networkObjectCache: {fileID: 4370070746774076901} + _asset: {fileID: 11400000, guid: 75d0e1c8cf84f9e4cb3cc356dca5ecd0, type: 2} _name: human foot right _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandLeft.prefab index 80ef111967..6dbb2a2552 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandLeft.prefab @@ -475,6 +475,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 171912613050136349} _networkObjectCache: {fileID: 171912613050136349} + _asset: {fileID: 11400000, guid: 2f63d1bb2710f984d8cfde0a9693d36b, type: 2} _name: human hand left _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandRight.prefab index 59d1d351d4..35f4bd2e1d 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHandRight.prefab @@ -437,6 +437,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 8124597772398120270} _networkObjectCache: {fileID: 8124597772398120270} + _asset: {fileID: 11400000, guid: 8c41ca3f7df4d604b96b5c241f1dbbf7, type: 2} _name: human hand right _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHead.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHead.prefab index d1097b9e16..a3daa499f8 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHead.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanHead.prefab @@ -1288,6 +1288,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4176238770325068939} _networkObjectCache: {fileID: 4176238770325068939} + _asset: {fileID: 11400000, guid: a2e3308047618af46829bdbc0856d60e, type: 2} _name: human head _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegLeft.prefab index e76ed24208..cf8107e0af 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegLeft.prefab @@ -325,6 +325,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 8388159565140655411} _networkObjectCache: {fileID: 8388159565140655411} + _asset: {fileID: 11400000, guid: 59b91c3c2263caa49abd20f6347f13e3, type: 2} _name: human leg left _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegRight.prefab index 9e545a0f40..3329b121c4 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanLegRight.prefab @@ -385,6 +385,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1103916381626794010} _networkObjectCache: {fileID: 1103916381626794010} + _asset: {fileID: 11400000, guid: bdf3672429311474e98ba5cc343fe76c, type: 2} _name: human leg right _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanTorso.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanTorso.prefab index fa77b0b68f..465fee5dd7 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanTorso.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanBodyParts/HumanTorso.prefab @@ -641,6 +641,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7892022672265885063} _networkObjectCache: {fileID: 7892022672265885063} + _asset: {fileID: 11400000, guid: da52935a42bdb4d4a82fadfab0e973ff, type: 2} _name: _weight: 0 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanBrain.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanBrain.prefab index 3c0a64ae03..ca85180527 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanBrain.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanBrain.prefab @@ -152,6 +152,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _asset: {fileID: 11400000, guid: 9af56738e13323d4896f47de26c1fbd7, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanEye.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanEye.prefab index f15a94c3c9..cb787f681f 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanEye.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanEye.prefab @@ -166,6 +166,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 0 @@ -175,8 +176,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -207,20 +210,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6576413314991157836} - {fileID: 103478066480505861} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} k__BackingField: 41 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 18288039698932709473 - _sceneNetworkObjects: [] --- !u!114 &103478066480505861 MonoBehaviour: m_ObjectHideFlags: 0 @@ -236,14 +245,14 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _asset: {fileID: 11400000, guid: 956a67e081e1c7746aed2e7ea0914661, type: 2} _name: _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3362323121630547519} - Prefab: {fileID: 5774385816057912484} AttachmentPoint: {fileID: 5000622523273975387} AttachmentPointAlt: {fileID: 0} + _container: {fileID: 0} --- !u!23 &4081087857378720118 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanHeart.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanHeart.prefab index ef82cb767f..821f715263 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanHeart.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanHeart.prefab @@ -150,6 +150,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4159476743201579799} _networkObjectCache: {fileID: 4159476743201579799} + _asset: {fileID: 11400000, guid: 41e8b78fbf3d17642801e36f243225f3, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanIntestineLarge.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanIntestineLarge.prefab index 021cee168f..e4246de110 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanIntestineLarge.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanIntestineLarge.prefab @@ -166,6 +166,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 0 @@ -175,8 +176,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -207,20 +210,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6576413314991157836} - {fileID: 103478066480505861} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} k__BackingField: 41 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 10709893314412428961 - _sceneNetworkObjects: [] --- !u!114 &103478066480505861 MonoBehaviour: m_ObjectHideFlags: 0 @@ -236,14 +245,14 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _asset: {fileID: 11400000, guid: 37fca3e0a17b5b24385bee5de8ead028, type: 2} _name: _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3362323121630547519} - Prefab: {fileID: 5774385816057912484} AttachmentPoint: {fileID: 5000622523273975387} AttachmentPointAlt: {fileID: 0} + _container: {fileID: 0} --- !u!23 &4081087857378720118 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLiver.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLiver.prefab index 1105645981..bd36735282 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLiver.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLiver.prefab @@ -166,6 +166,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 0 @@ -175,8 +176,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -207,20 +210,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6576413314991157836} - {fileID: 103478066480505861} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} k__BackingField: 41 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 13990989933594885103 - _sceneNetworkObjects: [] --- !u!114 &103478066480505861 MonoBehaviour: m_ObjectHideFlags: 0 @@ -236,14 +245,14 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _asset: {fileID: 11400000, guid: 6577fdc9764f17349899be7dc4671044, type: 2} _name: _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3362323121630547519} - Prefab: {fileID: 5774385816057912484} AttachmentPoint: {fileID: 5000622523273975387} AttachmentPointAlt: {fileID: 0} + _container: {fileID: 0} --- !u!23 &4081087857378720118 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungLeft.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungLeft.prefab index 467970df97..3010ab86aa 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungLeft.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungLeft.prefab @@ -150,6 +150,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 3594199936646473495} _networkObjectCache: {fileID: 3594199936646473495} + _asset: {fileID: 11400000, guid: 7e55bbc95c6058a4dbe049d4d6b04ef9, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungRight.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungRight.prefab index 8634196479..9e433821b7 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungRight.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanLungRight.prefab @@ -248,6 +248,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6158070572286981653} _networkObjectCache: {fileID: 6158070572286981653} + _asset: {fileID: 11400000, guid: 524803383cc4f494885f36e0571c9e47, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanStomach.prefab b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanStomach.prefab index c819b281b2..a63c519c88 100644 --- a/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanStomach.prefab +++ b/Assets/Content/WorldObjects/Entities/Humanoids/Human/HumanOrgans/HumanStomach.prefab @@ -166,6 +166,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _componentConfiguration: 0 _synchronizeParent: 0 _packing: Position: 0 @@ -175,8 +176,10 @@ MonoBehaviour: _extrapolation: 2 _enableTeleport: 0 _teleportThreshold: 1 + _scaleThreshold: 1 _clientAuthoritative: 1 _sendToOwner: 1 + _enableNetworkLod: 1 _interval: 1 _synchronizePosition: 1 _positionSnapping: @@ -207,20 +210,26 @@ MonoBehaviour: m_EditorClassIdentifier: k__BackingField: 0 k__BackingField: 0 + k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 6576413314991157836} - {fileID: 103478066480505861} k__BackingField: {fileID: 0} k__BackingField: [] + SerializedTransformProperties: + Position: {x: 0, y: 0, z: 0} + Rotation: {x: 0, y: 0, z: 0, w: 0} + LocalScale: {x: 0, y: 0, z: 0} _isNetworked: 1 _isGlobal: 0 + _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} k__BackingField: 41 + k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 k__BackingField: 17061504403195169305 - _sceneNetworkObjects: [] --- !u!114 &103478066480505861 MonoBehaviour: m_ObjectHideFlags: 0 @@ -236,14 +245,14 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8532088199163376958} _networkObjectCache: {fileID: 8532088199163376958} + _asset: {fileID: 11400000, guid: 6d4e37b5ee952264aadeec1edee7f15a, type: 2} _name: _weight: 1 - _size: {x: 1, y: 1} _startingTraits: [] _rigidbody: {fileID: 3362323121630547519} - Prefab: {fileID: 5774385816057912484} AttachmentPoint: {fileID: 5000622523273975387} AttachmentPointAlt: {fileID: 0} + _container: {fileID: 0} --- !u!23 &4081087857378720118 MeshRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Clothing/Backpack.prefab b/Assets/Content/WorldObjects/Items/Clothing/Backpack.prefab index 74ce506645..51f8a260fc 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/Backpack.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/Backpack.prefab @@ -200,6 +200,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 2090837846029440516} _networkObjectCache: {fileID: 2090837846029440516} + _asset: {fileID: 11400000, guid: 9435365903a79d64184af9ee71e060e5, type: 2} _name: Backpack _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/FacewearGasMask.prefab b/Assets/Content/WorldObjects/Items/Clothing/FacewearGasMask.prefab index 15b7b0812f..50f9dbfd44 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/FacewearGasMask.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/FacewearGasMask.prefab @@ -231,6 +231,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6115335805774105745} _networkObjectCache: {fileID: 6115335805774105745} + _asset: {fileID: 11400000, guid: 4a50e327a934cd3438e1b88d2bb547cb, type: 2} _name: Facewear gas mask _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedLeft.prefab b/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedLeft.prefab index 1c12b02a2f..ba5ff0b5b1 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedLeft.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedLeft.prefab @@ -202,6 +202,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6699414010407460003} _networkObjectCache: {fileID: 6699414010407460003} + _asset: {fileID: 11400000, guid: 739991c49857a3d40b2060d96908de45, type: 2} _name: Gloves insulated left _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedRight.prefab b/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedRight.prefab index b39b142a6a..e3d129dc0a 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedRight.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/GlovesInsulatedRight.prefab @@ -233,6 +233,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4692070367735979832} _networkObjectCache: {fileID: 4692070367735979832} + _asset: {fileID: 11400000, guid: 88cb0aca0b6265d49b25526ca55295e9, type: 2} _name: Glove insulated right _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/HeadsetLeft.prefab b/Assets/Content/WorldObjects/Items/Clothing/HeadsetLeft.prefab index 1d46e25aa2..9a4dfa5ab3 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/HeadsetLeft.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/HeadsetLeft.prefab @@ -231,6 +231,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6270372984438359393} _networkObjectCache: {fileID: 6270372984438359393} + _asset: {fileID: 11400000, guid: 01c2089d9c76db9488cc22e68d76f4b5, type: 2} _name: HeadsetLeft _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/HeadsetRight.prefab b/Assets/Content/WorldObjects/Items/Clothing/HeadsetRight.prefab index ae9a4ccd04..d5fcc21f08 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/HeadsetRight.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/HeadsetRight.prefab @@ -231,6 +231,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 3346295071430447723} _networkObjectCache: {fileID: 3346295071430447723} + _asset: {fileID: 11400000, guid: e8cfa525648e9c043a6e175aa4dc540b, type: 2} _name: HeadsetRight _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitBotany.prefab b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitBotany.prefab index 8fd394f4d1..16b41567cf 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitBotany.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitBotany.prefab @@ -209,6 +209,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1606100486293266847} _networkObjectCache: {fileID: 1606100486293266847} + _asset: {fileID: 11400000, guid: 6a9a8af0ce91a634ab42f12ebc7b24a6, type: 2} _name: Jumpsuit Botany _weight: 0 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitEngineer.prefab b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitEngineer.prefab index db3333148f..7047c0ba59 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitEngineer.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitEngineer.prefab @@ -231,6 +231,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7923090970201565529} _networkObjectCache: {fileID: 7923090970201565529} + _asset: {fileID: 11400000, guid: c3e196c40ac645e4d840edb82a27baf9, type: 2} _name: Jumpsuit engineer _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitGrey.prefab b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitGrey.prefab index 4e83f2c36a..ec91868e89 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitGrey.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitGrey.prefab @@ -216,6 +216,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 2527334834019670621} _networkObjectCache: {fileID: 2527334834019670621} + _asset: {fileID: 11400000, guid: 620dc53a5608be44a975c990e69ddba5, type: 2} _name: Jumpsuit Grey _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitSecurity.prefab b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitSecurity.prefab index 19205204f3..e0e7921309 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/JumpsuitSecurity.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/JumpsuitSecurity.prefab @@ -267,6 +267,7 @@ MonoBehaviour: _componentIndexCache: 3 _addedNetworkObject: {fileID: 4067691560622095404} _networkObjectCache: {fileID: 4067691560622095404} + _asset: {fileID: 11400000, guid: 9abef62d6f4edd443b3fa81a32f9a5ba, type: 2} _name: JumpsuitSecurity _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsLeft.prefab b/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsLeft.prefab index 807ba7e894..1a77fc4fac 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsLeft.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsLeft.prefab @@ -200,6 +200,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8681604604373809337} _networkObjectCache: {fileID: 8681604604373809337} + _asset: {fileID: 11400000, guid: d4290820348155f429a1712d502f920a, type: 2} _name: Shoe hi top left _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsRight.prefab b/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsRight.prefab index 235e4faa21..037aa166f7 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsRight.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/ShoesHiTopsRight.prefab @@ -214,6 +214,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8663352389375050187} _networkObjectCache: {fileID: 8663352389375050187} + _asset: {fileID: 11400000, guid: 810f35d5b52f0e6469cf9683460a16ca, type: 2} _name: Shoe hi top right _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsLeft.prefab b/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsLeft.prefab index ca7c759f78..61c89adcb8 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsLeft.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsLeft.prefab @@ -200,6 +200,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 8657890218937463745} _networkObjectCache: {fileID: 8657890218937463745} + _asset: {fileID: 11400000, guid: a8d8774fcba03b7448bc11fbecd8137e, type: 2} _name: shoe jackboot left _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsRight.prefab b/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsRight.prefab index 6d5960f8b2..816d1550ad 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsRight.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/ShoesJackbootsRight.prefab @@ -200,6 +200,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7421556062366613563} _networkObjectCache: {fileID: 7421556062366613563} + _asset: {fileID: 11400000, guid: 51c73ffc274bdf44da1bef6e91400973, type: 2} _name: Shoe jackboot right _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/Sunglasses.prefab b/Assets/Content/WorldObjects/Items/Clothing/Sunglasses.prefab index 1c806121b8..c0a33972a7 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/Sunglasses.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/Sunglasses.prefab @@ -231,6 +231,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 3546473533537016869} _networkObjectCache: {fileID: 3546473533537016869} + _asset: {fileID: 11400000, guid: c0a5c4fc200a5ae4693d9b02fee23b49, type: 2} _name: sunglasses _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Clothing/Toolbelt.prefab b/Assets/Content/WorldObjects/Items/Clothing/Toolbelt.prefab index 2ca0635474..828ac4c6fb 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/Toolbelt.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/Toolbelt.prefab @@ -158,6 +158,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7384563213340008115} _networkObjectCache: {fileID: 7384563213340008115} + _asset: {fileID: 11400000, guid: 9cf2801a7b335074190840fc9112d582, type: 2} _name: Belt _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Clothing/TruckerCap.prefab b/Assets/Content/WorldObjects/Items/Clothing/TruckerCap.prefab index 66326a23c6..60c5e03041 100644 --- a/Assets/Content/WorldObjects/Items/Clothing/TruckerCap.prefab +++ b/Assets/Content/WorldObjects/Items/Clothing/TruckerCap.prefab @@ -233,6 +233,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: -1921154974467191097} _networkObjectCache: {fileID: -1921154974467191097} + _asset: {fileID: 11400000, guid: e53ebba96eeba474e8478131c8d24085, type: 2} _name: Trucker Cap _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Cosmetic/BikeHorn/BikeHorn.prefab b/Assets/Content/WorldObjects/Items/Cosmetic/BikeHorn/BikeHorn.prefab index 9172ccd590..ddd08676fd 100644 --- a/Assets/Content/WorldObjects/Items/Cosmetic/BikeHorn/BikeHorn.prefab +++ b/Assets/Content/WorldObjects/Items/Cosmetic/BikeHorn/BikeHorn.prefab @@ -214,6 +214,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 4819234911439508660} _networkObjectCache: {fileID: 4819234911439508660} + _asset: {fileID: 11400000, guid: 3747dddbc41cad94bbbfc43bfed384c3, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs index e3f1283e81..e2cda4f90a 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/AssetDatabasesCodeGenerator.cs @@ -42,6 +42,8 @@ public static void GenerateAssetDatabasesCode() return; } + SavedAssetReferences.Clear(); + settings.CreateDatabaseCode(); HasModifiedAssetsWhenGenerating = false; @@ -91,7 +93,15 @@ private static void CreateWorldObjectAssetReferences(AssetDatabase assetDatabase { WorldObjectAssetReference worldObjectAssetReference = CreateWorldObjectAssetReference(gameObject.name, assetDatabase.DatabaseName); - SavedAssetReferences.Add($"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset", worldObjectAssetReference); + string key = $"{WorldObjectAssetPath}{worldObjectAssetReference.Id}.asset"; + + if (SavedAssetReferences.ContainsKey(key)) + { + Debug.LogError($"[{nameof(AssetDatabasesCodeGenerator)}] - {key} is already on the dictionary"); + continue; + } + + SavedAssetReferences.Add(key, worldObjectAssetReference); UpdateWorldObjectAssetReference(worldObjectAssetReference, gameObject, ref createdAssets); } diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index 1a1b05511e..f20f0cce8c 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -82,5 +82,15 @@ public static implicit operator LogSettings(DatabaseAsset asset) { return asset.Get(); } + + public static implicit operator Material(DatabaseAsset asset) + { + return asset.Get(); + } + + public static implicit operator AudioClip(DatabaseAsset asset) + { + return asset.Get(); + } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs index 1bcc7a3394..a0bb669e4b 100644 --- a/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs +++ b/Assets/Scripts/SS3D/Data/Generated/AssetDatabases.cs @@ -5,12 +5,13 @@ namespace SS3D.Data.Generated // This class is autogenerated. Do not modify manually. public static class AssetDatabases { - public static DatabaseAsset Bodyparts = new DatabaseAsset("Bodyparts", "AssetDatabases"); public static DatabaseAsset CraftingRecipes = new DatabaseAsset("CraftingRecipes", "AssetDatabases"); public static DatabaseAsset InteractionIcons = new DatabaseAsset("InteractionIcons", "AssetDatabases"); public static DatabaseAsset Items = new DatabaseAsset("Items", "AssetDatabases"); + public static DatabaseAsset Materials = new DatabaseAsset("Materials", "AssetDatabases"); public static DatabaseAsset ParticlesEffects = new DatabaseAsset("ParticlesEffects", "AssetDatabases"); public static DatabaseAsset Scenes = new DatabaseAsset("Scenes", "AssetDatabases"); + public static DatabaseAsset Sounds = new DatabaseAsset("Sounds", "AssetDatabases"); public static DatabaseAsset WorldSpaceUI = new DatabaseAsset("WorldSpaceUI", "AssetDatabases"); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs index a667459bd7..1313416a7d 100644 --- a/Assets/Scripts/SS3D/Data/Generated/Items.cs +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs @@ -49,22 +49,28 @@ public static class Items public static DatabaseAsset JumpsuitSecurity = new DatabaseAsset("JumpsuitSecurity", "Items"); public static DatabaseAsset HeadsetLeft = new DatabaseAsset("HeadsetLeft", "Items"); public static DatabaseAsset HeadsetRight = new DatabaseAsset("HeadsetRight", "Items"); - public static DatabaseAsset HumanArmLeftItem = new DatabaseAsset("HumanArmLeftItem", "Items"); - public static DatabaseAsset HumanArmRightItem = new DatabaseAsset("HumanArmRightItem", "Items"); - public static DatabaseAsset HumanBrainItem = new DatabaseAsset("HumanBrainItem", "Items"); - public static DatabaseAsset HumanEarLeftItem = new DatabaseAsset("HumanEarLeftItem", "Items"); - public static DatabaseAsset HumanEarRightItem = new DatabaseAsset("HumanEarRightItem", "Items"); - public static DatabaseAsset HumanFootLeftItem = new DatabaseAsset("HumanFootLeftItem", "Items"); - public static DatabaseAsset HumanFootRightItem = new DatabaseAsset("HumanFootRightItem", "Items"); - public static DatabaseAsset HumanHandLeftItem = new DatabaseAsset("HumanHandLeftItem", "Items"); - public static DatabaseAsset HumanHandRightItem = new DatabaseAsset("HumanHandRightItem", "Items"); - public static DatabaseAsset HumanHeadItem = new DatabaseAsset("HumanHeadItem", "Items"); - public static DatabaseAsset HumanLegLeftItem = new DatabaseAsset("HumanLegLeftItem", "Items"); - public static DatabaseAsset HumanLegRightItem = new DatabaseAsset("HumanLegRightItem", "Items"); - public static DatabaseAsset HumanLungLeftItem = new DatabaseAsset("HumanLungLeftItem", "Items"); - public static DatabaseAsset HumanLungRightItem = new DatabaseAsset("HumanLungRightItem", "Items"); - public static DatabaseAsset HumanTorsoItem = new DatabaseAsset("HumanTorsoItem", "Items"); - public static DatabaseAsset HumanHeartItem = new DatabaseAsset("HumanHeartItem", "Items"); + public static DatabaseAsset HumanArmLeft = new DatabaseAsset("HumanArmLeft", "Items"); + public static DatabaseAsset HumanArmRight = new DatabaseAsset("HumanArmRight", "Items"); + public static DatabaseAsset HumanEarLeft = new DatabaseAsset("HumanEarLeft", "Items"); + public static DatabaseAsset HumanEarRight = new DatabaseAsset("HumanEarRight", "Items"); + public static DatabaseAsset HumanFootLeft = new DatabaseAsset("HumanFootLeft", "Items"); + public static DatabaseAsset HumanFootRight = new DatabaseAsset("HumanFootRight", "Items"); + public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "Items"); + public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "Items"); + public static DatabaseAsset HumanHead = new DatabaseAsset("HumanHead", "Items"); + public static DatabaseAsset HumanLegLeft = new DatabaseAsset("HumanLegLeft", "Items"); + public static DatabaseAsset HumanTorso = new DatabaseAsset("HumanTorso", "Items"); + public static DatabaseAsset HumanLegRight = new DatabaseAsset("HumanLegRight", "Items"); + public static DatabaseAsset HumanLungRight = new DatabaseAsset("HumanLungRight", "Items"); + public static DatabaseAsset HumanLungLeft = new DatabaseAsset("HumanLungLeft", "Items"); + public static DatabaseAsset HumanStomach = new DatabaseAsset("HumanStomach", "Items"); + public static DatabaseAsset HumanLiver = new DatabaseAsset("HumanLiver", "Items"); + public static DatabaseAsset HumanIntestineLarge = new DatabaseAsset("HumanIntestineLarge", "Items"); + public static DatabaseAsset HumanEye = new DatabaseAsset("HumanEye", "Items"); + public static DatabaseAsset HumanBrain = new DatabaseAsset("HumanBrain", "Items"); + public static DatabaseAsset Toolbelt = new DatabaseAsset("Toolbelt", "Items"); + public static DatabaseAsset Backpack = new DatabaseAsset("Backpack", "Items"); + public static DatabaseAsset HumanHeart = new DatabaseAsset("HumanHeart", "Items"); } } diff --git a/Assets/Scripts/SS3D/Data/Generated/Materials.cs b/Assets/Scripts/SS3D/Data/Generated/Materials.cs new file mode 100644 index 0000000000..801b843115 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Materials.cs @@ -0,0 +1,13 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Materials + { + public static DatabaseAsset DeleteConstruction = new DatabaseAsset("DeleteConstruction", "Materials"); + public static DatabaseAsset InvalidConstruction = new DatabaseAsset("InvalidConstruction", "Materials"); + public static DatabaseAsset ValidConstruction = new DatabaseAsset("ValidConstruction", "Materials"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Materials.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Materials.cs.meta new file mode 100644 index 0000000000..d2ede2bd69 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Materials.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a931134e944107e4193c348040f2b9b1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/Generated/Sounds.cs b/Assets/Scripts/SS3D/Data/Generated/Sounds.cs new file mode 100644 index 0000000000..c2a1e4cf1b --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Sounds.cs @@ -0,0 +1,20 @@ +using SS3D.Data.AssetDatabases +; +namespace SS3D.Data.Generated +{ + // This class is autogenerated. Do not modify manually. + public static class Sounds + { + public static DatabaseAsset BikeHorn = new DatabaseAsset("BikeHorn", "Sounds"); + public static DatabaseAsset Title1 = new DatabaseAsset("Title1", "Sounds"); + public static DatabaseAsset Title2 = new DatabaseAsset("Title2", "Sounds"); + public static DatabaseAsset Title3 = new DatabaseAsset("Title3", "Sounds"); + public static DatabaseAsset Can1 = new DatabaseAsset("Can1", "Sounds"); + public static DatabaseAsset Can2 = new DatabaseAsset("Can2", "Sounds"); + public static DatabaseAsset Can3 = new DatabaseAsset("Can3", "Sounds"); + public static DatabaseAsset Can4 = new DatabaseAsset("Can4", "Sounds"); + public static DatabaseAsset AirlockClose = new DatabaseAsset("AirlockClose", "Sounds"); + public static DatabaseAsset AirlockOpen = new DatabaseAsset("AirlockOpen", "Sounds"); + } +} + diff --git a/Assets/Scripts/SS3D/Data/Generated/Sounds.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Sounds.cs.meta new file mode 100644 index 0000000000..d083cfc437 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/Generated/Sounds.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a15c36500c55421498afe900cd78768b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs b/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs index 47e0670f90..efeb4e5c8e 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs @@ -4,12 +4,10 @@ using Coimbra; using FishNet.Object; using SS3D.Core; -using SS3D.Core.Behaviours; using SS3D.Data; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using UnityEngine; -using UnityEngine.Audio; -using UnityEngine.UIElements; +using UnityEngine.Serialization; namespace SS3D.Systems.Audio { @@ -19,40 +17,46 @@ namespace SS3D.Systems.Audio /// public class AudioSystem : Core.Behaviours.NetworkSystem { - protected override void OnAwake() - { - base.OnAwake(); - Subsystems.Register(this); - } - - protected override void OnDestroyed() - { - base.OnDestroyed(); - Subsystems.Unregister(this); - } - + [FormerlySerializedAs("_sfxAudioSourcePrefab")] [Tooltip("The SFX audio source to be spawned.")] - public GameObject _sfxAudioSourcePrefab; + public GameObject SfxAudioSourcePrefab; + [FormerlySerializedAs("_musicAudioSourcePrefab")] [Tooltip("The music audio source to be spawned.")] - public GameObject _musicAudioSourcePrefab; - + public GameObject MusicAudioSourcePrefab; + [FormerlySerializedAs("_minSfxAudioSources")] [Tooltip("The number of SFX audio sources to start out with.")] - public int _minSfxAudioSources = 10; + public int MinSfxAudioSources = 10; + [FormerlySerializedAs("_maxSfxAudioSources")] [Tooltip("Any more than this will be considered too many SFX audio sources.")] - public int _maxSfxAudioSources = 30; - + public int MaxSfxAudioSources = 30; + [FormerlySerializedAs("_minMusicAudioSources")] [Tooltip("The number of music audio sources to start out with.")] - public int _minMusicAudioSources = 3; + public int MinMusicAudioSources = 3; + [FormerlySerializedAs("_maxMusicAudioSources")] [Tooltip("Any more than this will be considered too many SFX audio sources.")] - public int _maxMusicAudioSources = 10; + public int MaxMusicAudioSources = 10; + [FormerlySerializedAs("purgeFrequency")] [Tooltip("How often (in minutes) do we purge unused audio sources?")] - [SerializeField] private int purgeFrequency = 2; + [SerializeField] + private int _purgeFrequency = 2; + + private List _audioSourcesLists; + + protected override void OnAwake() + { + base.OnAwake(); + Subsystems.Register(this); + } - private List audioSourcesLists; + protected override void OnDestroyed() + { + base.OnDestroyed(); + Subsystems.Unregister(this); + } private void Start() { @@ -60,22 +64,13 @@ private void Start() StartCoroutine(PurgeCountdown()); } - /// - /// Grabs an unused audio source and plays an audio clip at the desired location. - /// - [Server] - public void PlayAudioSource(AudioType audioType, SoundsIds audioClipId, Vector3 position) - { - PlayAudioSource(audioType, audioClipId, position, NetworkObject); - } - /// /// Grabs a free audio source and parents it to a specific object before playing it. /// [Server] - public void PlayAudioSource(AudioType audioType, SoundsIds audioClipId, NetworkObject parent) + public void PlayAudioSource(AudioType audioType, AudioClip audioClipId, NetworkObject parent) { - RpcPlayAudioSource(audioType, audioClipId, parent.transform.position, parent); + RpcPlayAudioSource(audioType, audioClipId.name, parent.transform.position, parent); } /// @@ -83,9 +78,9 @@ public void PlayAudioSource(AudioType audioType, SoundsIds audioClipId, NetworkO /// Volume, pitch, and ranges are optional. /// [Server] - public void PlayAudioSource(AudioType audioType, SoundsIds audioClipId, Vector3 position, NetworkObject parent, float volume = 0.7f, float pitch = 1f, float minRange = 1f, float maxRange = 500f) + public void PlayAudioSource(AudioType audioType, AudioClip audioClipId, Vector3 position, NetworkObject parent, float volume = 0.7f, float pitch = 1f, float minRange = 1f, float maxRange = 500f) { - RpcPlayAudioSource(audioType, audioClipId, position, parent, volume, pitch, minRange, maxRange); + RpcPlayAudioSource(audioType, audioClipId.name, position, parent, volume, pitch, minRange, maxRange); } [Server] @@ -106,18 +101,18 @@ public void RPCSetTimeAudioSource(NetworkObject parent, float time) parent.GetComponentInChildren().time = time; } - [ObserversRpc] - public void RpcPlayAudioSource(AudioType type, SoundsIds audioClipId, Vector3 position, NetworkObject parent, float volume = 0.7f, float pitch = 1f, float minRange = 1f, float maxRange = 500f) + public void RpcPlayAudioSource(AudioType type, string audioClip, Vector3 position, NetworkObject parent, float volume = 0.7f, float pitch = 1f, float minRange = 1f, float maxRange = 500f) { - var audioClip = Assets.Get((int)AssetDatabases.Sounds, (int)audioClipId); - var audioSource = FindAvailableAudioSource(type); + AudioSource audioSource = FindAvailableAudioSource(type); + audioSource.gameObject.transform.position = position; - audioSource.clip = audioClip; + audioSource.clip = Assets.Get(AssetDatabases.Sounds, audioClip); audioSource.volume = volume; audioSource.pitch = pitch; audioSource.minDistance = minRange; audioSource.maxDistance = maxRange; + //If we want to attach the audio source to something specific, do that. Otherwise, detach it from any parents. //This is useful for things that are obviously creating the sound, like a mouse's squeak //-- we don't want the mouse to leave the squeak behind as it travels, but a flying soda can making a sound at the site of impact is probably fine. @@ -138,21 +133,22 @@ public AudioSource FindAvailableAudioSource(AudioType audioType) { AudioSource validSource = null; - AudioSourcesList audioSources = audioSourcesLists.Find(x => x.audioType == audioType); + AudioSourcesList audioSources = _audioSourcesLists.Find(x => x.AudioType == audioType); //If there are no audio sources in our list, fix that. - if (audioSources.list.Count == 0) + if (audioSources.List.Count == 0) { audioSources.CreateNewAudioSource(); } //Check the list for an audio source that isn't being used. - foreach (AudioSource source in audioSources.list) + foreach (AudioSource source in audioSources.List) { if (!source.isPlaying) { //If we found one, exit the foreach loop. validSource = source; + break; } } @@ -161,8 +157,9 @@ public AudioSource FindAvailableAudioSource(AudioType audioType) if (validSource == null) { audioSources.CreateNewAudioSource(); + //And let's use it. - validSource = audioSources.list[audioSources.list.Count - 1]; + validSource = audioSources.List[audioSources.List.Count - 1]; } return validSource; @@ -173,45 +170,42 @@ public AudioSource FindAvailableAudioSource(AudioType audioType) /// private void CreateAudioSourceIndex() { - audioSourcesLists = new List + _audioSourcesLists = new List { - new AudioSourcesList(_maxSfxAudioSources, _minSfxAudioSources, AudioType.sfx, _sfxAudioSourcePrefab, GameObject), - new AudioSourcesList(_maxMusicAudioSources, _minMusicAudioSources, AudioType.music, _musicAudioSourcePrefab, GameObject) + new AudioSourcesList(MaxSfxAudioSources, MinSfxAudioSources, AudioType.Sfx, SfxAudioSourcePrefab, GameObject), new AudioSourcesList(MaxMusicAudioSources, MinMusicAudioSources, AudioType.Music, MusicAudioSourcePrefab, GameObject) }; } /// /// Waits a specific amount of time before purging unused audio sources. /// - IEnumerator PurgeCountdown() + private IEnumerator PurgeCountdown() { // We want our wait period in minutes, so multiply by 60. - yield return new WaitForSeconds(purgeFrequency * 60); + yield return new WaitForSeconds(_purgeFrequency * 60); - audioSourcesLists.Where(x => x.list.Count > x.maxAudioSources) - .ToList() - .ForEach(sourcelist => sourcelist.PurgeUnusedAudioSources()); + _audioSourcesLists.Where(x => x.List.Count > x.MaxAudioSources).ToList().ForEach(sourcelist => sourcelist.PurgeUnusedAudioSources()); StartCoroutine(PurgeCountdown()); } private struct AudioSourcesList { - public int maxAudioSources; - public int minAudioSources; - public AudioType audioType; - public List list; - public GameObject prefab; - public GameObject audioSystem; + public int MaxAudioSources; + public int MinAudioSources; + public AudioType AudioType; + public List List; + public GameObject Prefab; + public GameObject AudioSystem; public AudioSourcesList(int maxSources, int minSources, AudioType type, GameObject audioSourcePrefab, GameObject audioSystemGameObject) { - audioType = type; - list = new List(); - minAudioSources = minSources; - maxAudioSources = maxSources; - prefab = audioSourcePrefab; - audioSystem= audioSystemGameObject; + AudioType = type; + List = new List(); + MinAudioSources = minSources; + MaxAudioSources = maxSources; + Prefab = audioSourcePrefab; + AudioSystem = audioSystemGameObject; for (int i = 0; i < minSources; i++) { @@ -219,15 +213,14 @@ public AudioSourcesList(int maxSources, int minSources, AudioType type, GameObje } } - /// /// Creates a new audio source and adds it to the list. /// public void CreateNewAudioSource() { - AudioSource newAudioSource = Instantiate(prefab, audioSystem.transform.position, Quaternion.identity).GetComponent(); - list.Add(newAudioSource); - newAudioSource.transform.parent = audioSystem.transform; + AudioSource newAudioSource = Instantiate(Prefab, AudioSystem.transform.position, Quaternion.identity).GetComponent(); + List.Add(newAudioSource); + newAudioSource.transform.parent = AudioSystem.transform; } /// @@ -235,18 +228,17 @@ public void CreateNewAudioSource() /// public void PurgeUnusedAudioSources() { - foreach (var source in list) + foreach (AudioSource source in List) { //Check that the audio source is idle, and we have more than our minimum number. - if (!source.isPlaying && list.Count > minAudioSources) + if (!source.isPlaying && List.Count > MinAudioSources) { - list.Remove(source); + List.Remove(source); source.gameObject.Dispose(true); } } } } - } } diff --git a/Assets/Scripts/SS3D/Systems/Audio/AudioType.cs b/Assets/Scripts/SS3D/Systems/Audio/AudioType.cs index a0ad704ecd..dad9f692fe 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/AudioType.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/AudioType.cs @@ -6,8 +6,8 @@ namespace SS3D.Systems.Audio /// public enum AudioType { - music = 0, - sfx = 1, - ambient = 2, + Music = 0, + Sfx = 1, + Ambient = 2, } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs b/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs index 8c167da9b6..6f5203790a 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs @@ -1,12 +1,10 @@ using FishNet.Object.Synchronizing; -using SS3D.Interactions.Extensions; using SS3D.Interactions.Interfaces; using SS3D.Interactions; -using System.Collections; using System.Collections.Generic; using UnityEngine; -using SS3D.Data.Enums; using SS3D.Core; +using UnityEngine.Serialization; namespace SS3D.Systems.Audio { @@ -15,34 +13,36 @@ namespace SS3D.Systems.Audio /// public class Boombox : InteractionTargetNetworkBehaviour, IToggleable { - + [FormerlySerializedAs("_audioClips")] [SerializeField] - private SoundsIds[] soundsIds; + private List _songs; // is it playing music - + [FormerlySerializedAs("radioOn")] [SyncVar] - public bool radioOn; + public bool RadioOn; + [FormerlySerializedAs("currentMusic")] [SyncVar] - public int currentMusic; + public int CurrentMusic; // I hate my life - public Sprite interactionIcon; - public Sprite interactionIconOn; - + [FormerlySerializedAs("interactionIcon")] + public Sprite InteractionIcon; + [FormerlySerializedAs("interactionIconOn")] + public Sprite InteractionIconOn; public void Toggle() { - radioOn = !radioOn; - if (!radioOn) + RadioOn = !RadioOn; + if (!RadioOn) { Subsystems.Get().StopAudioSource(NetworkObject); } else { - Subsystems.Get().PlayAudioSource(AudioType.music, soundsIds[currentMusic], GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); + Subsystems.Get().PlayAudioSource(AudioType.Music, _songs[CurrentMusic], GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); } } @@ -50,13 +50,13 @@ public void ChangeCurrentMusic() { Subsystems.Get().StopAudioSource(NetworkObject); Subsystems.Get().SetTimeAudioSource(NetworkObject, 0f); - currentMusic = (currentMusic + 1) % (soundsIds.Length); - Subsystems.Get().PlayAudioSource(AudioType.music, soundsIds[currentMusic], GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); + CurrentMusic = (CurrentMusic + 1) % (_songs.Count); + Subsystems.Get().PlayAudioSource(AudioType.Music, _songs[CurrentMusic], GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); } public bool GetState() { - return radioOn; + return RadioOn; } public override IInteraction[] CreateTargetInteractions(InteractionEvent interactionEvent) @@ -67,8 +67,8 @@ public override IInteraction[] CreateTargetInteractions(InteractionEvent interac }; ToggleInteraction toggleInteraction = new ToggleInteraction { - IconOn = interactionIconOn, - IconOff = interactionIconOn, + IconOn = InteractionIconOn, + IconOff = InteractionIconOn, }; interactions.Insert(GetState() ? interactions.Count : interactions.Count - 1, toggleInteraction); diff --git a/Assets/Scripts/SS3D/Systems/Audio/ChangeMusicInteraction.cs b/Assets/Scripts/SS3D/Systems/Audio/ChangeMusicInteraction.cs index cff022a476..6359c53ed2 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/ChangeMusicInteraction.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/ChangeMusicInteraction.cs @@ -25,7 +25,7 @@ public override string GetName(InteractionEvent interactionEvent) public override Sprite GetIcon(InteractionEvent interactionEvent) { if (interactionEvent.Target is Boombox boom) - return boom.interactionIcon; + return boom.InteractionIcon; return null; } @@ -37,7 +37,7 @@ public override bool CanInteract(InteractionEvent interactionEvent) { return false; } - return boom.radioOn; + return boom.RadioOn; } return false; diff --git a/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs b/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs index a99d65ac24..eb5533563f 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs @@ -1,9 +1,8 @@ using UnityEngine; -using SS3D.Data; -using SS3D.Data.Enums; using FishNet.Object; using SS3D.Core; using FishNet; +using UnityEngine.Serialization; namespace SS3D.Systems.Audio { @@ -14,76 +13,105 @@ public class NoisyCollision : MonoBehaviour { //Variables!!! Wow! + [FormerlySerializedAs("collisionVolume")] [Header("Collision Noises Setup")] [Range(0f, 1f)] - [SerializeField, Tooltip("How loud sounds will play when colliding.")] - private float collisionVolume = 0.7f; - - [SerializeField, Tooltip("The base pitch of the sound effect. Default is 1, lower pitch is 0, higher pitch is 2.")] - [Range(0, 2)] private float basePitch = 1; - - [SerializeField, Tooltip("How much lower pitch can the sound play?")] - [Range(0f, 0.5f)] private float pitchModulationLow = 0; - - [SerializeField, Tooltip("How much higher pitch can the sound play?")] - [Range(0f, 0.5f)] private float pitchModulationHigh = 0; - - [SerializeField, Tooltip("How fast this object must hit another in order to make a light impact sound.")] - private float lightImpactVelocity = 1; - - [SerializeField, Tooltip("Does this object make a different sound being struck at a high velocity?")] - private bool useHardImpactSounds = false; - - [SerializeField, Tooltip("How fast this object must hit another in order to make a hard impact sound.")] - private float hardImpactVelocity = 7.5f; - - [SerializeField, Tooltip("List of possible sounds that will play when this object collides lightly.")] - private SoundsIds[] lightImpactSounds; - - [SerializeField, Tooltip("List of possible sounds that will play when this object collides heavily.")] - private SoundsIds[] hardImpactSounds; + [SerializeField] + [Tooltip("How loud sounds will play when colliding.")] + private float _collisionVolume = 0.7f; + + [FormerlySerializedAs("basePitch")] + [SerializeField] + [Range(0, 2)] + [Tooltip("The base pitch of the sound effect. Default is 1, lower pitch is 0, higher pitch is 2.")] + private float _basePitch = 1; + + [FormerlySerializedAs("pitchModulationLow")] + [SerializeField] + [Range(0f, 0.5f)] + [Tooltip("How much lower pitch can the sound play?")] + private float _pitchModulationLow = 0; + + [FormerlySerializedAs("pitchModulationHigh")] + [SerializeField] + [Range(0f, 0.5f)] + [Tooltip("How much higher pitch can the sound play?")] + private float _pitchModulationHigh = 0; + + [FormerlySerializedAs("lightImpactVelocity")] + [SerializeField] + [Tooltip("How fast this object must hit another in order to make a light impact sound.")] + private float _lightImpactVelocity = 1; + + [FormerlySerializedAs("useHardImpactSounds")] + [SerializeField] + [Tooltip("Does this object make a different sound being struck at a high velocity?")] + private bool _useHardImpactSounds = false; + + [FormerlySerializedAs("hardImpactVelocity")] + [SerializeField] + [Tooltip("How fast this object must hit another in order to make a hard impact sound.")] + private float _hardImpactVelocity = 7.5f; + + [FormerlySerializedAs("lightImpactSounds")] + [SerializeField] + [Tooltip("List of possible sounds that will play when this object collides lightly.")] + private AudioClip[] _lightImpactSounds; + + [FormerlySerializedAs("hardImpactSounds")] + [SerializeField] + [Tooltip("List of possible sounds that will play when this object collides heavily.")] + private AudioClip[] _hardImpactSounds; //For some reason, this is needed to have an enable/disable feature. Peculiar. - private void FixedUpdate() { - } + private void FixedUpdate() { } private void OnValidate() { - //Throw a warning if the user configured it retardedly. - if ((lightImpactVelocity > hardImpactVelocity) || (useHardImpactSounds && hardImpactSounds == null) || (lightImpactSounds == null)) + // Throw a warning if the user configured it retardedly. + if ((!(_lightImpactVelocity > _hardImpactVelocity)) && (!_useHardImpactSounds || _hardImpactSounds != null) && (_lightImpactSounds != null)) { - Debug.LogWarning("Woops! " + gameObject.name + " is configured to make collision sounds, but cannot. Make sure the Noisy Collision script is configured correctly."); - this.enabled = false; + return; } - } - void OnCollisionEnter(Collision other) { + Debug.LogWarning("Woops! " + gameObject.name + " is configured to make collision sounds, but cannot. Make sure the Noisy Collision script is configured correctly."); + enabled = false; + } - if (!InstanceFinder.IsServer) return; + private void OnCollisionEnter(Collision other) + { + if (!InstanceFinder.IsServer) + { + return; + } //Only execute this code if we're supposed to make collision noises. - if (useHardImpactSounds && other.relativeVelocity.magnitude > hardImpactVelocity) { - PlayCollisionSound(hardImpactSounds); + if (_useHardImpactSounds && other.relativeVelocity.magnitude > _hardImpactVelocity) + { + PlayCollisionSound(_hardImpactSounds); } - else if (other.relativeVelocity.magnitude > lightImpactVelocity) { - PlayCollisionSound(lightImpactSounds); + else if (other.relativeVelocity.magnitude > _lightImpactVelocity) + { + PlayCollisionSound(_lightImpactSounds); } } /// - // Play some collision sound from the available sounds with some random pitch change + /// Play some collision sound from the available sounds with some random pitch change. /// /// [Server] - private void PlayCollisionSound(SoundsIds[] soundPool) + private void PlayCollisionSound(AudioClip[] soundPool) { - float pitch = Random.Range(basePitch - pitchModulationLow, basePitch + pitchModulationHigh); - Subsystems.Get().PlayAudioSource(AudioType.sfx, PickSound(soundPool), gameObject.transform.position, null, collisionVolume, pitch); + float pitch = Random.Range(_basePitch - _pitchModulationLow, _basePitch + _pitchModulationHigh); + Subsystems.Get().PlayAudioSource(AudioType.Sfx, PickSound(soundPool), gameObject.transform.position, null, _collisionVolume, pitch); } - private SoundsIds PickSound(SoundsIds[] availableSounds) { - //Pick a clip from the supplied array and return it - SoundsIds currentClip = availableSounds[Random.Range(0, availableSounds.Length)]; + private AudioClip PickSound(AudioClip[] availableSounds) + { + // Pick a clip from the supplied array and return it + AudioClip currentClip = availableSounds[Random.Range(0, availableSounds.Length)]; + return currentClip; } } diff --git a/Assets/Scripts/SS3D/Systems/Furniture/AirlockStateMachine.cs b/Assets/Scripts/SS3D/Systems/Furniture/AirlockStateMachine.cs index c348d9992f..dc23490316 100644 --- a/Assets/Scripts/SS3D/Systems/Furniture/AirlockStateMachine.cs +++ b/Assets/Scripts/SS3D/Systems/Furniture/AirlockStateMachine.cs @@ -1,11 +1,7 @@ using FishNet.Object; using SS3D.Core; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Systems.Audio; -using SS3D.Systems.Tile.Connections; -using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using AudioType = SS3D.Systems.Audio.AudioType; @@ -24,8 +20,7 @@ public class AirlockStateMachine : StateMachineBehaviour private readonly Color _closingColor = new Color(1, 0.18f, .2f); private readonly Color _idleColor = new Color(0, 0, 0); - private const int DOOR_LIGHT_MATERIAL_INDEX = 1; - + private const int DoorLightMaterialIndex = 1; public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { @@ -37,12 +32,12 @@ public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo if (stateInfo.IsName(Opening)) { ChangeColors(_openingColor, animator); - Subsystems.Get().PlayAudioSource(AudioType.sfx, SoundsIds.AirlockOpen, animator.gameObject.GetComponent()); + Subsystems.Get().PlayAudioSource(AudioType.Sfx, Sounds.AirlockOpen, animator.GetComponent()); } if (stateInfo.IsName(Closing)) { ChangeColors(_closingColor, animator); - Subsystems.Get().PlayAudioSource(AudioType.sfx, SoundsIds.AirlockClose, animator.gameObject.GetComponent()); + Subsystems.Get().PlayAudioSource(AudioType.Sfx, Sounds.AirlockClose, animator.GetComponent()); } } @@ -50,12 +45,12 @@ private void ChangeColors(Color color, Animator animator) { var renderers = animator.GetComponent().MeshesToColor; var skinnedRenderers = animator.GetComponent().SkinnedMeshesToColor; - foreach (var renderer in renderers) + foreach (MeshRenderer renderer in renderers) { - renderer.materials[DOOR_LIGHT_MATERIAL_INDEX].color = color; + renderer.materials[DoorLightMaterialIndex].color = color; } - foreach (var skinnedRenderer in skinnedRenderers) + foreach (SkinnedMeshRenderer skinnedRenderer in skinnedRenderers) { if (color == _openingColor) { diff --git a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HeadBodyPart.cs b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HeadBodyPart.cs index 3cbc90b739..95ad4d465c 100644 --- a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HeadBodyPart.cs +++ b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HeadBodyPart.cs @@ -1,11 +1,10 @@ using FishNet.Object; using SS3D.Core; -using SS3D.Data.Enums; -using SS3D.Data; +using SS3D.Data.Generated; using SS3D.Systems.Entities; -using SS3D.Systems.Inventory.Items; using System.Collections; using UnityEngine; +using UnityEngine.Serialization; namespace SS3D.Systems.Health { @@ -14,7 +13,8 @@ namespace SS3D.Systems.Health /// public class HeadBodyPart : BodyPart { - public Brain brain; + [FormerlySerializedAs("brain")] + public Brain Brain; public override void Init(BodyPart parent) { @@ -35,7 +35,7 @@ public override void OnStartServer() private IEnumerator AddInternalOrgans() { yield return null; - AddInternalBodyPart(brain); + AddInternalBodyPart(Brain); } protected override void AddInitialLayers() @@ -79,17 +79,16 @@ protected override void AfterSpawningCopiedBodyPart() protected override void BeforeDestroyingBodyPart() { GetComponentInParent()?.DeactivateComponents(); - return; } protected override void SpawnOrgans() { - GameObject brainPrefab = Assets.Get((int)AssetDatabases.Items, (int)ItemId.HumanBrain); + GameObject brainPrefab = Items.HumanBrain; GameObject brainGameObject = Instantiate(brainPrefab); - brain = brainGameObject.GetComponent(); - - brain.HealthController = HealthController; - + Brain = brainGameObject.GetComponent(); + + Brain.HealthController = HealthController; + Spawn(brainGameObject, Owner); } } diff --git a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs index 9420a860c1..8e65f7f7c9 100644 --- a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs +++ b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs @@ -1,16 +1,18 @@ using SS3D.Data; -using SS3D.Data.Enums; -using SS3D.Systems; +using SS3D.Data.Generated; using SS3D.Systems.Health; using System.Collections; -using System.Collections.Generic; using UnityEngine; +using UnityEngine.Serialization; public class HumanTorso : BodyPart { - public Heart heart; - public Lungs leftLung; - public Lungs rightLung; + [FormerlySerializedAs("heart")] + public Heart Heart; + [FormerlySerializedAs("leftLung")] + public Lungs LeftLung; + [FormerlySerializedAs("rightLung")] + public Lungs RightLung; public override void OnStartServer() { @@ -26,25 +28,25 @@ public override void OnStartServer() private IEnumerator AddInternalOrgans() { yield return null; - AddInternalBodyPart(heart); - AddInternalBodyPart(leftLung); - AddInternalBodyPart(rightLung); + AddInternalBodyPart(Heart); + AddInternalBodyPart(LeftLung); + AddInternalBodyPart(RightLung); } protected override void SpawnOrgans() { - GameObject heartPrefab = Assets.Get((int)AssetDatabases.Items, (int)ItemId.HumanHeart); - GameObject leftLungPrefab = Assets.Get((int)AssetDatabases.Items, (int)ItemId.HumanLungLeft); - GameObject rightLungPrefab = Assets.Get((int)AssetDatabases.Items, (int)ItemId.HumanLungRight); - + GameObject heartPrefab = Items.HumanHeart; + GameObject leftLungPrefab = Items.HumanLungLeft; + GameObject rightLungPrefab = Items.HumanLungRight;; + GameObject heartGameObject = Instantiate(heartPrefab); GameObject leftLungGameObject = Instantiate(leftLungPrefab); GameObject rightLungGameObject = Instantiate(rightLungPrefab); - - heart = heartGameObject.GetComponent(); - leftLung = leftLungGameObject.GetComponent(); - rightLung = rightLungGameObject.gameObject.GetComponent(); - + + Heart = heartGameObject.GetComponent(); + LeftLung = leftLungGameObject.GetComponent(); + RightLung = rightLungGameObject.gameObject.GetComponent(); + Spawn(heartGameObject, Owner); Spawn(leftLungGameObject, Owner); Spawn(rightLungGameObject, Owner); @@ -56,16 +58,11 @@ protected override void AddInitialLayers() TryAddBodyLayer(new BoneLayer(this)); TryAddBodyLayer(new CirculatoryLayer(this, 8f)); TryAddBodyLayer(new NerveLayer(this)); + InvokeOnBodyPartLayerAdded(); } - protected override void AfterSpawningCopiedBodyPart() - { - return; - } + protected override void AfterSpawningCopiedBodyPart() { } - protected override void BeforeDestroyingBodyPart() - { - return; - } + protected override void BeforeDestroyingBodyPart() { } } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/BikeHorn.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/BikeHorn.cs index 4e385856c9..7b77c46179 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/BikeHorn.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Generic/BikeHorn.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; using System.Linq; -using FishNet.Object; using SS3D.Core; -using SS3D.Data; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using SS3D.Interactions; using SS3D.Interactions.Interfaces; using SS3D.Systems.Audio; @@ -24,20 +22,17 @@ public class BikeHorn : Item private static readonly int HonkAnimation = Animator.StringToHash("Honk"); - public void Honk() { _animator.SetTrigger(HonkAnimation); - Subsystems.Get().PlayAudioSource(AudioType.sfx, SoundsIds.BikeHorn, GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); + Subsystems.Get().PlayAudioSource(AudioType.Sfx, Sounds.BikeHorn, GameObject.transform.position, NetworkObject, 0.7f, 1, 1, 5); } public bool IsHonking() { - if(!TryGetComponent(out var audioSource)) return false; - // If our audio source exists, and it's rigged up with our honk sound, and it's our child, // check if it's playing. Otherwise, it's honkin' time. - return audioSource.isPlaying; + return TryGetComponent(out AudioSource audioSource) && audioSource.isPlaying; } public override IInteraction[] CreateTargetInteractions(InteractionEvent interactionEvent) diff --git a/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs b/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs index 774f6a8bf0..a298f123ae 100644 --- a/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs +++ b/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs @@ -1,6 +1,5 @@ using Coimbra; -using SS3D.Data; -using SS3D.Data.Enums; +using SS3D.Data.Generated; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -63,24 +62,15 @@ public ConstructionHologram(GameObject ghostObject, Vector3 targetPosition, Dire /// public void ChangeHologramColor(ConstructionMode mode) { - Material ghostMat = null; - - switch (mode) + Material ghostMat = mode switch { - case ConstructionMode.Valid: - ghostMat = Assets.Get((int)AssetDatabases.Materials, (int)MaterialsIds.ValidConstruction); - break; - - case ConstructionMode.Invalid: - ghostMat = Assets.Get((int)AssetDatabases.Materials, (int)MaterialsIds.InvalidConstruction); - break; + ConstructionMode.Valid => Materials.ValidConstruction, + ConstructionMode.Invalid => Materials.InvalidConstruction, + ConstructionMode.Delete => Materials.DeleteConstruction, + _ => null + }; - case ConstructionMode.Delete: - ghostMat = Assets.Get((int)AssetDatabases.Materials, (int)MaterialsIds.DeleteConstruction); - break; - } - - foreach (MeshRenderer mr in Hologram.GetComponentsInChildren()) + foreach (MeshRenderer mr in _hologram.GetComponentsInChildren()) { Material[] materials = mr.materials; for (int i = 0; i < materials.Length; i++) diff --git a/Assets/Settings/AssetDatabaseSettings.asset b/Assets/Settings/AssetDatabaseSettings.asset index 969e5a491c..f0ce416cce 100644 --- a/Assets/Settings/AssetDatabaseSettings.asset +++ b/Assets/Settings/AssetDatabaseSettings.asset @@ -15,11 +15,12 @@ MonoBehaviour: _preload: 1 _type: 2 IncludedAssetDatabases: - - {fileID: 11400000, guid: ca2c2a0941deb144b88d6d8cbf4252ee, type: 2} - {fileID: 11400000, guid: c8a3b9b514b2f7543a544259c3c97b81, type: 2} - {fileID: 11400000, guid: cdf9511d9049fa14ab0433934f3537ec, type: 2} - {fileID: 11400000, guid: c2644d7b34e956743a0bc485e7ca5e37, type: 2} + - {fileID: 11400000, guid: acbbffb4c89caec469bb21b6197c7626, type: 2} - {fileID: 11400000, guid: 099b9943e9299d54b82d2c1163500458, type: 2} - {fileID: 11400000, guid: 3fc0db940ed0bd14cb905a5e15dd32fe, type: 2} + - {fileID: 11400000, guid: 43b69e36c49203a44bf20042cd83de81, type: 2} - {fileID: 11400000, guid: 830650063081cdf4d90087fc2ac74d24, type: 2} _skipCodeGeneration: 0 From c296191e7a1a58c88b08671e60ca90ccb8a40268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Thu, 7 Dec 2023 00:38:33 -0300 Subject: [PATCH 27/32] Fix missing references --- .../Furniture/Generic/JukeboxBlueGreen.prefab | 13 +++++++---- .../Food/Drinks/Soda/SodaCanGeneric.prefab | 23 +++++++++++-------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Assets/Content/WorldObjects/Furniture/Generic/JukeboxBlueGreen.prefab b/Assets/Content/WorldObjects/Furniture/Generic/JukeboxBlueGreen.prefab index b053d04c94..296f0bdc67 100644 --- a/Assets/Content/WorldObjects/Furniture/Generic/JukeboxBlueGreen.prefab +++ b/Assets/Content/WorldObjects/Furniture/Generic/JukeboxBlueGreen.prefab @@ -149,8 +149,11 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 4294524822034227355} _networkObjectCache: {fileID: 4294524822034227355} - soundsIds: 010000000200000003000000 - radioOn: 0 - currentMusic: 0 - interactionIcon: {fileID: 0} - interactionIconOn: {fileID: 0} + _songs: + - {fileID: 8300000, guid: ec8b849764a7e9147b2a565f81a1ca42, type: 3} + - {fileID: 8300000, guid: fd331e360db5fbb448e66367e41d1893, type: 3} + - {fileID: 8300000, guid: 3f51862f0b88a5243a8cceb97147489d, type: 3} + RadioOn: 0 + CurrentMusic: 0 + InteractionIcon: {fileID: 0} + InteractionIconOn: {fileID: 0} diff --git a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanGeneric.prefab b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanGeneric.prefab index 3870b90197..d1cfd42141 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanGeneric.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Food/Drinks/Soda/SodaCanGeneric.prefab @@ -265,6 +265,7 @@ MonoBehaviour: _componentIndexCache: 2 _addedNetworkObject: {fileID: 5958074810027370513} _networkObjectCache: {fileID: 5958074810027370513} + _asset: {fileID: 0} _name: _weight: 1 _startingTraits: [] @@ -306,12 +307,16 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c1ed2939192a85040bcf588bd471b6c7, type: 3} m_Name: m_EditorClassIdentifier: - collisionVolume: 0.7 - basePitch: 1 - pitchModulationLow: 0 - pitchModulationHigh: 0 - lightImpactVelocity: 0.5 - useHardImpactSounds: 0 - hardImpactVelocity: 7.5 - lightImpactSounds: 04000000050000000600000007000000 - hardImpactSounds: + _collisionVolume: 0.7 + _basePitch: 1 + _pitchModulationLow: 0 + _pitchModulationHigh: 0 + _lightImpactVelocity: 0.5 + _useHardImpactSounds: 0 + _hardImpactVelocity: 7.5 + _lightImpactSounds: + - {fileID: 8300000, guid: 1a34c805f84be3b4caac14d7de790607, type: 3} + - {fileID: 8300000, guid: 8d93fdf9dcada204a952e29213f0293f, type: 3} + _hardImpactSounds: + - {fileID: 8300000, guid: f00c6b5a098e84b4b87d80d23b4f295a, type: 3} + - {fileID: 8300000, guid: b315c4abdef36244fb211c5f643d411a, type: 3} From 2589b5e9416acdfa5505c5f6c8eeb97ec4f0e56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Sun, 10 Dec 2023 21:31:51 -0300 Subject: [PATCH 28/32] Fix null ref --- Assets/Scripts/SS3D/Data/Assets.cs | 6 ++++++ Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/SS3D/Data/Assets.cs b/Assets/Scripts/SS3D/Data/Assets.cs index bc9fface48..47cdf0a35e 100644 --- a/Assets/Scripts/SS3D/Data/Assets.cs +++ b/Assets/Scripts/SS3D/Data/Assets.cs @@ -3,6 +3,7 @@ using JetBrains.Annotations; using SS3D.Data.AssetDatabases; using SS3D.Logging; +using System; using Object = UnityEngine.Object; namespace SS3D.Data @@ -70,6 +71,11 @@ public static AssetDatabase GetDatabase([NotNull] string databaseId) LoadAssetDatabases(); } + if (databaseId == String.Empty) + { + return null; + } + bool databaseExists = Databases.TryGetValue(databaseId, out AssetDatabase database); if (!databaseExists) diff --git a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs index 413e2295e4..af61a921f3 100644 --- a/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Crafting/CraftingSystem.cs @@ -38,16 +38,16 @@ public override void OnStartNetwork() private void FillRecipeOrganiser() { AssetDatabase recipesDataBase = Assets.GetDatabase(AssetDatabases.CraftingRecipes); - - foreach(Object asset in recipesDataBase.Assets.Values) + + foreach (Object asset in recipesDataBase.Assets.Values) { - if(asset is not CraftingRecipe) + if (asset is not CraftingRecipe recipe) { Debug.LogError("Crafting recipe database contains object which are not recipes"); + continue; } - CraftingRecipe recipe = (CraftingRecipe) asset; - + _recipeOrganiser.TryAdd(recipe.Target, new Dictionary()); _recipeOrganiser[recipe.Target][recipe.InteractionName] = recipe; } From 326f10ea13e6f93ca9937330d39597c3a5fbfeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Sun, 10 Dec 2023 21:48:14 -0300 Subject: [PATCH 29/32] Fix crafting systems --- Assets/Content/Data/Databases/Items.asset | 12 +++++++++++ .../Content/Data/Recipes/SlicedBananas.asset | 8 +++---- .../Data/Recipes/WeirdComplexRecipe.asset | 10 ++++----- .../{Screwdriver.asset => Doodad.asset} | 4 ++-- ...rewdriver.asset.meta => Doodad.asset.meta} | 2 +- .../Multitool.asset | 16 ++++++++++++++ .../Multitool.asset.meta | 8 +++++++ .../PowerCell.asset | 16 ++++++++++++++ .../PowerCell.asset.meta | 8 +++++++ .../PowerCellAdmin.asset | 16 ++++++++++++++ .../PowerCellAdmin.asset.meta | 8 +++++++ .../ScrewdriverBlue.asset | 16 ++++++++++++++ .../ScrewdriverBlue.asset.meta | 8 +++++++ .../Wirecutters.asset | 16 ++++++++++++++ .../Wirecutters.asset.meta | 8 +++++++ .../Chemical/Medications/BrutePatch.prefab | 3 ++- .../Chemical/Medications/BurnPatch.prefab | 1 + .../Chemical/Medications/MedicalPatch.prefab | 1 + .../Generic/Identification/IDCard.prefab | 1 + .../Generic/Identification/PDA.prefab | 1 + .../Identification/SecurityIDCard.prefab | 1 + .../Generic/Identification/SecurityPDA.prefab | 3 ++- .../Command/NuclearAuthenticationDisk.prefab | 1 + .../Tools/Engineering/Crowbar.prefab | 16 +++++++++++++- .../Tools/Engineering/ScrewdriverBlue.prefab | 21 ++++++++++++++++--- Assets/Scripts/SS3D/Data/Generated/Items.cs | 7 ++++++- .../SS3D/Systems/Inventory/Items/Item.cs | 1 + .../TileMapCreator/ConstructionHologram.cs | 2 +- 28 files changed, 195 insertions(+), 20 deletions(-) rename Assets/Content/Data/WorldObjectAssetReferences/{Screwdriver.asset => Doodad.asset} (90%) rename Assets/Content/Data/WorldObjectAssetReferences/{Screwdriver.asset.meta => Doodad.asset.meta} (79%) create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset.meta create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset create mode 100644 Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset.meta diff --git a/Assets/Content/Data/Databases/Items.asset b/Assets/Content/Data/Databases/Items.asset index 20a730fbf1..6baf17a33d 100644 --- a/Assets/Content/Data/Databases/Items.asset +++ b/Assets/Content/Data/Databases/Items.asset @@ -148,4 +148,16 @@ MonoBehaviour: _value: {fileID: 802333698458937824, guid: ddaa28fac1956b2428aff1dac1d89707, type: 3} - _key: HumanHeart _value: {fileID: 2302397424301738637, guid: fccdc78a6cf916047ba52f2877f755e5, type: 3} + - _key: ScrewdriverBlue + _value: {fileID: 2402587210622244651, guid: 9c8363ee7f934bd4b8ee5a2e30da1269, type: 3} + - _key: Doodad + _value: {fileID: 3792017003477948967, guid: f6528d8afa18fa14998a0158260ef26c, type: 3} + - _key: Wirecutters + _value: {fileID: 2402587210622244651, guid: 41a1c8c211dc32c4d8ffca5f0892f9dc, type: 3} + - _key: Multitool + _value: {fileID: 2402587210622244651, guid: 2ca5f2886cf2f19428b50bf284689b86, type: 3} + - _key: PowerCellAdmin + _value: {fileID: 7927487060350510867, guid: c69ed93dc225ea049bbf1a02662c48c0, type: 3} + - _key: PowerCell + _value: {fileID: 2402587210622244651, guid: de67200a4c96d444f800399a033ddfef, type: 3} _new: diff --git a/Assets/Content/Data/Recipes/SlicedBananas.asset b/Assets/Content/Data/Recipes/SlicedBananas.asset index 9262cef998..402a92b417 100644 --- a/Assets/Content/Data/Recipes/SlicedBananas.asset +++ b/Assets/Content/Data/Recipes/SlicedBananas.asset @@ -14,11 +14,11 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 2 _interactionName: Slice - _target: {fileID: 11400000, guid: 9a6240bc8a7465a4b9ff2949fe1a91ec, type: 2} + _target: {fileID: 11400000, guid: e53ebba96eeba474e8478131c8d24085, type: 2} _result: - - {fileID: 11400000, guid: 4acff5047a23ca546892f6983df848da, type: 2} - - {fileID: 11400000, guid: d5582d2058d277645819b17209031fd5, type: 2} - - {fileID: 11400000, guid: 5f9d538d2b1db574ea0d87ef391eb3fd, type: 2} + - {fileID: 11400000, guid: 9275ab75afcd2ea40b8d00845d500d6a, type: 2} + - {fileID: 11400000, guid: f07bdcc8986b95043be85d4f9d0e7c76, type: 2} + - {fileID: 11400000, guid: bffc6c08d28041549ae1af640b76ce92, type: 2} _elements: _list: [] _new: {fileID: 0} diff --git a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset index 704b143cab..1ccd57abf2 100644 --- a/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset +++ b/Assets/Content/Data/Recipes/WeirdComplexRecipe.asset @@ -14,14 +14,14 @@ MonoBehaviour: m_EditorClassIdentifier: _executionTime: 0 _interactionName: Slice - _target: {fileID: 11400000, guid: d39cddb29d447124aa73725a47e02f78, type: 2} + _target: {fileID: 11400000, guid: 3747dddbc41cad94bbbfc43bfed384c3, type: 2} _result: - - {fileID: 11400000, guid: d9b0944d3ed02ea479b0af556a3cab64, type: 2} - - {fileID: 11400000, guid: 20ad2279ce787e64fb77393b42cffc6a, type: 2} + - {fileID: 11400000, guid: 739991c49857a3d40b2060d96908de45, type: 2} + - {fileID: 11400000, guid: 88cb0aca0b6265d49b25526ca55295e9, type: 2} _elements: _list: - - _key: {fileID: 11400000, guid: a5be2a47daccf6a449459d092254a0bc, type: 2} + - _key: {fileID: 11400000, guid: 162ccd1fc7d534046874df3d9dcf2315, type: 2} _value: 2 - - _key: {fileID: 11400000, guid: 801a4613a54051e47a57bc2bc7287c19, type: 2} + - _key: {fileID: 11400000, guid: c0a5c4fc200a5ae4693d9b02fee23b49, type: 2} _value: 1 _new: {fileID: 0} diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset b/Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset similarity index 90% rename from Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset rename to Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset index dea607258f..e82026634c 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset +++ b/Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: d8ba336da0014235becfe02dce35b6ca, type: 3} - m_Name: Screwdriver + m_Name: Doodad m_EditorClassIdentifier: - Id: Screwdriver + Id: Doodad Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset.meta similarity index 79% rename from Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta rename to Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset.meta index cecf328c89..bc1c1f2e55 100644 --- a/Assets/Content/Data/WorldObjectAssetReferences/Screwdriver.asset.meta +++ b/Assets/Content/Data/WorldObjectAssetReferences/Doodad.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f07bdcc8986b95043be85d4f9d0e7c76 +guid: 27ff1c5556f9d4c40b179cfecee706ea NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset b/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset new file mode 100644 index 0000000000..9e6f88019b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Multitool + m_EditorClassIdentifier: + Id: Multitool + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset.meta new file mode 100644 index 0000000000..83a94eb920 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Multitool.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bd14f7dd0646a2240adf09ba61ce700a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset b/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset new file mode 100644 index 0000000000..b33a287d0a --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: PowerCell + m_EditorClassIdentifier: + Id: PowerCell + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset.meta new file mode 100644 index 0000000000..1a8f8fd27b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PowerCell.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4d84c9a7bcbaa564d8958c6875c8c02d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset b/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset new file mode 100644 index 0000000000..355bac5fdf --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: PowerCellAdmin + m_EditorClassIdentifier: + Id: PowerCellAdmin + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset.meta new file mode 100644 index 0000000000..71e1ecb9fa --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/PowerCellAdmin.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 19be5347e4fe0e346b5f3a3a9b3081fa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset b/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset new file mode 100644 index 0000000000..232e54630b --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: ScrewdriverBlue + m_EditorClassIdentifier: + Id: ScrewdriverBlue + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset.meta new file mode 100644 index 0000000000..cf419b104d --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/ScrewdriverBlue.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9e4b9aa465bc48d4faa9b53cd0132f11 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset b/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset new file mode 100644 index 0000000000..5335f85a34 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset @@ -0,0 +1,16 @@ +%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: d8ba336da0014235becfe02dce35b6ca, type: 3} + m_Name: Wirecutters + m_EditorClassIdentifier: + Id: Wirecutters + Database: Items diff --git a/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset.meta b/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset.meta new file mode 100644 index 0000000000..722bd42887 --- /dev/null +++ b/Assets/Content/Data/WorldObjectAssetReferences/Wirecutters.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f784858d359bb434c9a7ea797c27552d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BrutePatch.prefab b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BrutePatch.prefab index e0e31f2e5d..6efdf42436 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BrutePatch.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BrutePatch.prefab @@ -180,7 +180,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 168 + k__BackingField: 169 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -245,6 +245,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: -2900402353996906960} _networkObjectCache: {fileID: -2900402353996906960} + _asset: {fileID: 11400000, guid: 8ec2a780fae01344a9431a9cb06d8a7c, type: 2} _name: Brute patch _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BurnPatch.prefab b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BurnPatch.prefab index 363d7f6c84..6327891d11 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BurnPatch.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/BurnPatch.prefab @@ -245,6 +245,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 885347571389710399} _networkObjectCache: {fileID: 885347571389710399} + _asset: {fileID: 11400000, guid: e28b644ad26ceae45acf3ceb84b8cbff, type: 2} _name: Burnpatch _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/MedicalPatch.prefab b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/MedicalPatch.prefab index 1671090553..e4bc6b9c48 100644 --- a/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/MedicalPatch.prefab +++ b/Assets/Content/WorldObjects/Items/Consumable/Chemical/Medications/MedicalPatch.prefab @@ -166,6 +166,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 881130758709618923} _networkObjectCache: {fileID: 881130758709618923} + _asset: {fileID: 11400000, guid: 1a9f9df755637c3478bf4649e7ab04fd, type: 2} _name: medical patch _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/IDCard.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/IDCard.prefab index 21e0409036..9d59447f27 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/IDCard.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/IDCard.prefab @@ -247,6 +247,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _asset: {fileID: 11400000, guid: d4a76ab7d8dbea34cb528fc2b784fd70, type: 2} _name: _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/PDA.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/PDA.prefab index 62630c0733..6c9bd722dc 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/PDA.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/PDA.prefab @@ -252,6 +252,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _asset: {fileID: 11400000, guid: 4773cbe0a88c809459547e0d0eff8d29, type: 2} _name: _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityIDCard.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityIDCard.prefab index 163f5bbbc8..9a3568630a 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityIDCard.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityIDCard.prefab @@ -278,6 +278,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _asset: {fileID: 11400000, guid: bca8d36802b3dbc47bc479151a3f7ea1, type: 2} _name: _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityPDA.prefab b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityPDA.prefab index 7df490b9c7..4caf3ddafa 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityPDA.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Generic/Identification/SecurityPDA.prefab @@ -171,7 +171,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 146 + k__BackingField: 147 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -252,6 +252,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 7958861831329766982} _networkObjectCache: {fileID: 7958861831329766982} + _asset: {fileID: 11400000, guid: 4f09dc7f882c18542b750da80a29720f, type: 2} _name: _weight: 1 _startingTraits: diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Command/NuclearAuthenticationDisk.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Command/NuclearAuthenticationDisk.prefab index 7d1f0c567f..9b6d699c59 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Command/NuclearAuthenticationDisk.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Command/NuclearAuthenticationDisk.prefab @@ -182,6 +182,7 @@ MonoBehaviour: _componentIndexCache: 0 _addedNetworkObject: {fileID: 4819234911439508660} _networkObjectCache: {fileID: 4819234911439508660} + _asset: {fileID: 11400000, guid: 50284e9bdc2ff2943ba806e8d5ce8f9f, type: 2} _name: _weight: 1 _startingTraits: [] diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Crowbar.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Crowbar.prefab index 9114ad0bb7..e0ca4292d9 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Crowbar.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Crowbar.prefab @@ -16,6 +16,7 @@ GameObject: - component: {fileID: -8844723469565218506} - component: {fileID: 6294647206769462932} - component: {fileID: -368119461391624815} + - component: {fileID: 8720207852131239820} m_Layer: 10 m_Name: Crowbar m_TagString: Untagged @@ -193,7 +194,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 164 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -213,6 +214,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 6294647206769462932} _networkObjectCache: {fileID: 6294647206769462932} + _asset: {fileID: 11400000, guid: 9310ba3e563558e42bdbd19ee6b8440c, type: 2} _name: Crowbar _weight: 1 _startingTraits: [] @@ -220,6 +222,18 @@ MonoBehaviour: AttachmentPoint: {fileID: 4263568945307503621} AttachmentPointAlt: {fileID: 4263568945307503621} _container: {fileID: 0} +--- !u!114 &8720207852131239820 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1888703706215615217} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &2468349444349537438 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/ScrewdriverBlue.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/ScrewdriverBlue.prefab index 55ca032cc0..376ee22f94 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/ScrewdriverBlue.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/ScrewdriverBlue.prefab @@ -47,6 +47,7 @@ GameObject: - component: {fileID: 4363965162719999430} - component: {fileID: 1602098408367427586} - component: {fileID: 6800495836141411361} + - component: {fileID: 8006545930481202674} m_Layer: 10 m_Name: ScrewdriverBlue m_TagString: Untagged @@ -211,6 +212,7 @@ MonoBehaviour: k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 4363965162719999430} + - {fileID: 6800495836141411361} k__BackingField: {fileID: 0} k__BackingField: [] SerializedTransformProperties: @@ -222,7 +224,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 39 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -239,9 +241,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 1602098408367427586} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 1602098408367427586} + _asset: {fileID: 11400000, guid: 9e4b9aa465bc48d4faa9b53cd0132f11, type: 2} _name: screwdriver _weight: 1 _startingTraits: [] @@ -249,3 +252,15 @@ MonoBehaviour: AttachmentPoint: {fileID: 7991373112210367801} AttachmentPointAlt: {fileID: 7991373112210367801} _container: {fileID: 0} +--- !u!114 &8006545930481202674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2402587210622244651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Scripts/SS3D/Data/Generated/Items.cs b/Assets/Scripts/SS3D/Data/Generated/Items.cs index 1313416a7d..39dd97948f 100644 --- a/Assets/Scripts/SS3D/Data/Generated/Items.cs +++ b/Assets/Scripts/SS3D/Data/Generated/Items.cs @@ -30,7 +30,7 @@ public static class Items public static DatabaseAsset SteelReinforcedSheet = new DatabaseAsset("SteelReinforcedSheet", "Items"); public static DatabaseAsset SteelSheet = new DatabaseAsset("SteelSheet", "Items"); public static DatabaseAsset Crowbar = new DatabaseAsset("Crowbar", "Items"); - public static DatabaseAsset Screwdriver = new DatabaseAsset("Screwdriver", "Items"); + public static DatabaseAsset ScrewdriverBlue = new DatabaseAsset("ScrewdriverBlue", "Items"); public static DatabaseAsset Wrench = new DatabaseAsset("Wrench", "Items"); public static DatabaseAsset FlashlightBlue = new DatabaseAsset("FlashlightBlue", "Items"); public static DatabaseAsset KitchenKnife = new DatabaseAsset("KitchenKnife", "Items"); @@ -71,6 +71,11 @@ public static class Items public static DatabaseAsset Toolbelt = new DatabaseAsset("Toolbelt", "Items"); public static DatabaseAsset Backpack = new DatabaseAsset("Backpack", "Items"); public static DatabaseAsset HumanHeart = new DatabaseAsset("HumanHeart", "Items"); + public static DatabaseAsset Doodad = new DatabaseAsset("Doodad", "Items"); + public static DatabaseAsset Wirecutters = new DatabaseAsset("Wirecutters", "Items"); + public static DatabaseAsset Multitool = new DatabaseAsset("Multitool", "Items"); + public static DatabaseAsset PowerCellAdmin = new DatabaseAsset("PowerCellAdmin", "Items"); + public static DatabaseAsset PowerCell = new DatabaseAsset("PowerCell", "Items"); } } diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs index 75020bcabb..f92a614d7b 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs @@ -13,6 +13,7 @@ using SS3D.Systems.Examine; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Interactions; +using SS3D.Systems.Selection; using UnityEditor; using UnityEngine; using UnityEngine.Serialization; diff --git a/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs b/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs index a298f123ae..30c469817a 100644 --- a/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs +++ b/Assets/Scripts/SS3D/Systems/Tile/TileMapCreator/ConstructionHologram.cs @@ -70,7 +70,7 @@ public void ChangeHologramColor(ConstructionMode mode) _ => null }; - foreach (MeshRenderer mr in _hologram.GetComponentsInChildren()) + foreach (MeshRenderer mr in Hologram.GetComponentsInChildren()) { Material[] materials = mr.materials; for (int i = 0; i < materials.Length; i++) From 51c9d8a6ac4ce15bb229bfb022eec70ab3d7643c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Sun, 10 Dec 2023 21:55:06 -0300 Subject: [PATCH 30/32] Fix build errors --- .../Content/WorldObjects/Items/Doodad.prefab | 16 +++++++++++++- .../Parts/PowerCells/PowerCell.prefab | 16 +++++++++++++- .../Tools/Engineering/Multitool.prefab | 16 +++++++++++++- .../Tools/Engineering/Wirecutters.prefab | 16 +++++++++++++- .../Tools/Engineering/Wrench.prefab | 21 ++++++++++++++++--- .../WorldObjectAssetReference.cs | 1 - .../SS3D/Systems/Inventory/Items/Item.cs | 6 ++---- .../SS3D/Systems/Tile/TileResourceLoader.cs | 1 - 8 files changed, 80 insertions(+), 13 deletions(-) diff --git a/Assets/Content/WorldObjects/Items/Doodad.prefab b/Assets/Content/WorldObjects/Items/Doodad.prefab index afcf1d2241..8490d9ea69 100644 --- a/Assets/Content/WorldObjects/Items/Doodad.prefab +++ b/Assets/Content/WorldObjects/Items/Doodad.prefab @@ -47,6 +47,7 @@ GameObject: - component: {fileID: 2058044439099520297} - component: {fileID: 4052990814619214022} - component: {fileID: 8540712827701727508} + - component: {fileID: 246485557779806861} m_Layer: 10 m_Name: Doodad m_TagString: Untagged @@ -223,7 +224,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 22 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -243,6 +244,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 4052990814619214022} _networkObjectCache: {fileID: 4052990814619214022} + _asset: {fileID: 11400000, guid: 27ff1c5556f9d4c40b179cfecee706ea, type: 2} _name: Doodad _weight: 1 _startingTraits: [] @@ -250,3 +252,15 @@ MonoBehaviour: AttachmentPoint: {fileID: 8876393141157652533} AttachmentPointAlt: {fileID: 8876393141157652533} _container: {fileID: 0} +--- !u!114 &246485557779806861 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3792017003477948967} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Content/WorldObjects/Items/Functional/Parts/PowerCells/PowerCell.prefab b/Assets/Content/WorldObjects/Items/Functional/Parts/PowerCells/PowerCell.prefab index ae79755960..6d68513593 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Parts/PowerCells/PowerCell.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Parts/PowerCells/PowerCell.prefab @@ -136,6 +136,7 @@ GameObject: - component: {fileID: 1602098408367427586} - component: {fileID: 6800495836141411361} - component: {fileID: 8868060696172007296} + - component: {fileID: 8006545930481202674} m_Layer: 10 m_Name: PowerCell m_TagString: Untagged @@ -251,7 +252,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 30 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -271,6 +272,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1602098408367427586} _networkObjectCache: {fileID: 1602098408367427586} + _asset: {fileID: 11400000, guid: 4d84c9a7bcbaa564d8958c6875c8c02d, type: 2} _name: PowerCell _weight: 1 _startingTraits: [] @@ -291,6 +293,18 @@ BoxCollider: serializedVersion: 2 m_Size: {x: 0.20313878, y: 0.14020495, z: 0.13075063} m_Center: {x: -0.0004394725, y: 0.0037705526, z: -0.00023116171} +--- !u!114 &8006545930481202674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2402587210622244651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &3296752347747623008 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Multitool.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Multitool.prefab index 5736e7cb38..101c7bd4fe 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Multitool.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Multitool.prefab @@ -47,6 +47,7 @@ GameObject: - component: {fileID: 4363965162719999430} - component: {fileID: 1602098408367427586} - component: {fileID: 6800495836141411361} + - component: {fileID: 8006545930481202674} m_Layer: 10 m_Name: Multitool m_TagString: Untagged @@ -224,7 +225,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 122 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -244,6 +245,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1602098408367427586} _networkObjectCache: {fileID: 1602098408367427586} + _asset: {fileID: 11400000, guid: bd14f7dd0646a2240adf09ba61ce700a, type: 2} _name: Multitool _weight: 1 _startingTraits: [] @@ -251,3 +253,15 @@ MonoBehaviour: AttachmentPoint: {fileID: 7991373112210367801} AttachmentPointAlt: {fileID: 7991373112210367801} _container: {fileID: 0} +--- !u!114 &8006545930481202674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2402587210622244651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wirecutters.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wirecutters.prefab index 344adcc49f..7bdef8fb28 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wirecutters.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wirecutters.prefab @@ -47,6 +47,7 @@ GameObject: - component: {fileID: 4363965162719999430} - component: {fileID: 1602098408367427586} - component: {fileID: 6800495836141411361} + - component: {fileID: 8006545930481202674} m_Layer: 10 m_Name: Wirecutters m_TagString: Untagged @@ -223,7 +224,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 140 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -243,6 +244,7 @@ MonoBehaviour: _componentIndexCache: 1 _addedNetworkObject: {fileID: 1602098408367427586} _networkObjectCache: {fileID: 1602098408367427586} + _asset: {fileID: 11400000, guid: f784858d359bb434c9a7ea797c27552d, type: 2} _name: Wirecutters _weight: 1 _startingTraits: [] @@ -250,3 +252,15 @@ MonoBehaviour: AttachmentPoint: {fileID: 7991373112210367801} AttachmentPointAlt: {fileID: 7991373112210367801} _container: {fileID: 0} +--- !u!114 &8006545930481202674 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2402587210622244651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wrench.prefab b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wrench.prefab index 573b0054c7..7e5c1dfc57 100644 --- a/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wrench.prefab +++ b/Assets/Content/WorldObjects/Items/Functional/Tools/Engineering/Wrench.prefab @@ -47,6 +47,7 @@ GameObject: - component: {fileID: 2058044439099520297} - component: {fileID: 4052990814619214022} - component: {fileID: 8540712827701727508} + - component: {fileID: 246485557779806861} m_Layer: 10 m_Name: Wrench m_TagString: Untagged @@ -211,6 +212,7 @@ MonoBehaviour: k__BackingField: {fileID: 0} _networkBehaviours: - {fileID: 2058044439099520297} + - {fileID: 8540712827701727508} k__BackingField: {fileID: 0} k__BackingField: [] SerializedTransformProperties: @@ -222,7 +224,7 @@ MonoBehaviour: _initializeOrder: 0 _defaultDespawnType: 0 NetworkObserver: {fileID: 0} - k__BackingField: 65535 + k__BackingField: 141 k__BackingField: 0 _scenePathHash: 0 k__BackingField: 0 @@ -239,9 +241,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: cf76e303c1b57ae4ebbf08dab5bbddc2, type: 3} m_Name: m_EditorClassIdentifier: - _componentIndexCache: 255 + _componentIndexCache: 1 _addedNetworkObject: {fileID: 4052990814619214022} - _networkObjectCache: {fileID: 0} + _networkObjectCache: {fileID: 4052990814619214022} + _asset: {fileID: 11400000, guid: fd8e3cf550cdc704281d3b94b5c8d631, type: 2} _name: Wrench _weight: 1 _startingTraits: [] @@ -249,3 +252,15 @@ MonoBehaviour: AttachmentPoint: {fileID: 8876393141157652533} AttachmentPointAlt: {fileID: 8876393141157652533} _container: {fileID: 0} +--- !u!114 &246485557779806861 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3792017003477948967} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e00534faac6488c47893490f2bf4c5a2, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs index 06675cda16..e37d02e615 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/WorldObjectAssetReference.cs @@ -1,6 +1,5 @@ using JetBrains.Annotations; using SS3D.Attributes; -using UnityEditor.VersionControl; using UnityEngine; namespace SS3D.Data.AssetDatabases diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs index f92a614d7b..48f54b2165 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Items/Item.cs @@ -10,16 +10,14 @@ using SS3D.Interactions; using SS3D.Interactions.Interfaces; using SS3D.Logging; -using SS3D.Systems.Examine; using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Inventory.Interactions; using SS3D.Systems.Selection; -using UnityEditor; using UnityEngine; using UnityEngine.Serialization; -using AssetDatabase = UnityEditor.AssetDatabase; #if UNITY_EDITOR - +using UnityEditor; +using AssetDatabase = UnityEditor.AssetDatabase; #endif namespace SS3D.Systems.Inventory.Items diff --git a/Assets/Scripts/SS3D/Systems/Tile/TileResourceLoader.cs b/Assets/Scripts/SS3D/Systems/Tile/TileResourceLoader.cs index 3c911717b9..a366300099 100644 --- a/Assets/Scripts/SS3D/Systems/Tile/TileResourceLoader.cs +++ b/Assets/Scripts/SS3D/Systems/Tile/TileResourceLoader.cs @@ -4,7 +4,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using UnityEditor.VersionControl; using UnityEngine; namespace SS3D.Systems.Tile From 677af06b5a3bbfa2d7baab9c6806a599e8375100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Tue, 12 Dec 2023 16:24:15 -0300 Subject: [PATCH 31/32] General review asked changes --- .../CodeGeneration/Creators/EnumCreator.cs | 35 --------------- .../Creators/EnumCreator.cs.meta | 3 -- .../Creators/StaticClassCreator.cs | 31 ------------- .../Creators/StaticClassCreator.cs.meta | 3 -- .../SS3D/CodeGeneration/Writers/CodeWriter.cs | 43 ------------------- .../CodeGeneration/Writers/CodeWriter.cs.meta | 3 -- .../Writers/DatabaseAssetWriter.cs | 8 ++++ .../Writers/StaticClassWriter.cs | 43 ------------------- .../Writers/StaticClassWriter.cs.meta | 3 -- .../SS3D/Data/AssetDatabases/DatabaseAsset.cs | 2 + .../Scripts/SS3D/Data/Generated/Bodyparts.cs | 12 ------ .../SS3D/Data/Generated/Bodyparts.cs.meta | 11 ----- .../Scripts/SS3D/Systems/Audio/AudioSystem.cs | 9 +--- Assets/Scripts/SS3D/Systems/Audio/Boombox.cs | 7 +-- .../SS3D/Systems/Audio/NoisyCollision.cs | 9 ---- .../Systems/Health/BodyParts/HumanTorso.cs | 3 -- .../Commands/AddHandCommand.cs | 2 +- 17 files changed, 14 insertions(+), 213 deletions(-) delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs delete mode 100644 Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs delete mode 100644 Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs deleted file mode 100644 index 2c7f198e50..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor; -using UnityEngine; -using Object = UnityEngine.Object; - -namespace SS3D.CodeGeneration.Creators -{ - public static class EnumCreator - { -#if UNITY_EDITOR - /// - /// Creates an enum in the object path, with the defined enum name and using a list of provided assets as its elements. - /// - /// - /// - /// - public static void CreateAtPath(string path, string enumName, IEnumerable assets, string namespaceName = "SS3D.Data.Enums") - { - IEnumerable enums = assets.Select(reference => reference.name); - - List enumerable = enums.ToList(); - - // Added to support the option to not select an enum. - enumerable.Insert(0, "None"); - - string dataPath = Application.dataPath; - string fullPath = dataPath + path; - - CodeWriter.WriteEnum(fullPath, enumName, enumerable, namespaceName); - EditorWindow.focusedWindow.ShowNotification(new GUIContent($"All assets loaded and {namespaceName}.{enumName} enum created at {path}.")); - } -#endif - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta deleted file mode 100644 index 398487e4d8..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/EnumCreator.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 1d6c6ed4b0c24551be847686e31decde -timeCreated: 1672887374 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs deleted file mode 100644 index 12b7727ee0..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs +++ /dev/null @@ -1,31 +0,0 @@ -using JetBrains.Annotations; -using System.Collections.Generic; -using System.Linq; -using UnityEditor; -using UnityEngine; - -namespace SS3D.CodeGeneration -{ - public static class StaticClassCreator - { - #if UNITY_EDITOR - /// - /// Creates an static class in the object path, with the defined class name and using a list of provided assets as its elements. - /// - public static void CreateAtPath(string path, string className, [NotNull] IEnumerable assets, string namespaceName = "SS3D.Data.Enums") - { - IEnumerable enums = assets.Select(reference => reference.name); - - string dataPath = Application.dataPath; - string fullPath = dataPath + path; - - StaticClassWriter.WriteStaticClass(fullPath, className, enums, namespaceName); - - if (EditorWindow.focusedWindow != null) - { - EditorWindow.focusedWindow.ShowNotification(new GUIContent($"All assets loaded and {namespaceName}.{className} class created at {path}.")); - } - } -#endif - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta deleted file mode 100644 index cbd512668c..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Creators/StaticClassCreator.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 66c8c7b5ddf54254b3bfcf5c6223f212 -timeCreated: 1695767234 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs deleted file mode 100644 index ac42fd00a9..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace SS3D.CodeGeneration -{ - public static class CodeWriter - { - public static void WriteEnum(string filePath, string enumName, IEnumerable items, string namespaceName = "SS3D.Data.Enums") - { - IEnumerable filtered = items.GroupBy(name => name).Select(nameGroup => nameGroup.Key); - - SourceFile sourceFile = new(); - using (new NamespaceScope(sourceFile, namespaceName)) - { - sourceFile.AppendLine($"public enum {enumName}"); - - using (new BracesScope(sourceFile)) - { - for (int index = 0; index < filtered.ToList().Count; index++) - { - string member = filtered.ToList()[index]; - if (string.IsNullOrWhiteSpace(member)) - { - continue; - } - - char[] corrected = member.ToCharArray(); - corrected[0] = corrected[0].ToString().ToUpper()[0]; - - StringBuilder stringBuilder = new(); - stringBuilder.Append(corrected); - - sourceFile.AppendLine($"{stringBuilder} = {index}, "); - } - } - } - - File.WriteAllText(filePath + "/" + enumName + ".cs", sourceFile.ToString()); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta deleted file mode 100644 index 9376744326..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Writers/CodeWriter.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 9536f5aac4f242d9a5e7b07f4280d550 -timeCreated: 1668130683 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs index ac9f76e416..9620dde6e9 100644 --- a/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs +++ b/Assets/Scripts/SS3D/CodeGeneration/Writers/DatabaseAssetWriter.cs @@ -8,6 +8,14 @@ namespace SS3D.CodeGeneration { public class DatabaseAssetWriter { + /// + /// Writes a static class of a DatabaseAssets from an AssetDatabase. + /// + /// Where to write this file to. + /// The type of the field elements to use, mainly because assembly conflicts. + /// The name of the class, currently being the asset database name + /// the elements to add to this class + /// the namespace name to use public static void Write(string filePath, Type classType, string className, IEnumerable items, string namespaceName = "SS3D.Data.Enums") { IEnumerable filtered = items.GroupBy(name => name).Select(nameGroup => nameGroup.Key); diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs b/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs deleted file mode 100644 index 68609b0cc2..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace SS3D.CodeGeneration -{ - public static class StaticClassWriter - { - public static void WriteStaticClass(string filePath, string className, IEnumerable items, string namespaceName = "SS3D.Data.Enums") - { - IEnumerable filtered = items.GroupBy(name => name).Select(nameGroup => nameGroup.Key); - - SourceFile sourceFile = new(); - using (new NamespaceScope(sourceFile, namespaceName)) - { - sourceFile.AppendLine($"public class {className}"); - - using (new BracesScope(sourceFile)) - { - for (int index = 0; index < filtered.ToList().Count; index++) - { - string member = filtered.ToList()[index]; - if (string.IsNullOrWhiteSpace(member)) - { - continue; - } - - char[] corrected = member.ToCharArray(); - corrected[0] = corrected[0].ToString().ToUpper()[0]; - - StringBuilder stringBuilder = new(); - stringBuilder.Append(corrected); - - sourceFile.AppendLine($"public static string {stringBuilder} = \"{stringBuilder}\";\n"); - } - } - } - - File.WriteAllText(filePath + "/" + className + ".cs", sourceFile.ToString()); - } - } -} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta b/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta deleted file mode 100644 index 0e1c298255..0000000000 --- a/Assets/Scripts/SS3D/CodeGeneration/Writers/StaticClassWriter.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 37ea9927b0a648c792d075a3499f9db1 -timeCreated: 1695767291 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs index f20f0cce8c..80fb8402cb 100644 --- a/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs +++ b/Assets/Scripts/SS3D/Data/AssetDatabases/DatabaseAsset.cs @@ -5,6 +5,8 @@ namespace SS3D.Data.AssetDatabases { /// /// Represents an asset data asset, contains the name of the asset and the related database. + /// + /// NOTE: The implicit operators have to be manually added for now. /// public sealed class DatabaseAsset { diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs deleted file mode 100644 index dfdddb6cac..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs +++ /dev/null @@ -1,12 +0,0 @@ -using SS3D.Data.AssetDatabases -; -namespace SS3D.Data.Generated -{ - // This class is autogenerated. Do not modify manually. - public static class Bodyparts - { - public static DatabaseAsset HumanHandLeft = new DatabaseAsset("HumanHandLeft", "Bodyparts"); - public static DatabaseAsset HumanHandRight = new DatabaseAsset("HumanHandRight", "Bodyparts"); - } -} - diff --git a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta b/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta deleted file mode 100644 index 8c3e3447c4..0000000000 --- a/Assets/Scripts/SS3D/Data/Generated/Bodyparts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f868fcd3cf3ca04c999f52a026de965 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs b/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs index efeb4e5c8e..5eb3975d23 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/AudioSystem.cs @@ -17,29 +17,24 @@ namespace SS3D.Systems.Audio /// public class AudioSystem : Core.Behaviours.NetworkSystem { - [FormerlySerializedAs("_sfxAudioSourcePrefab")] [Tooltip("The SFX audio source to be spawned.")] public GameObject SfxAudioSourcePrefab; - [FormerlySerializedAs("_musicAudioSourcePrefab")] [Tooltip("The music audio source to be spawned.")] public GameObject MusicAudioSourcePrefab; - [FormerlySerializedAs("_minSfxAudioSources")] [Tooltip("The number of SFX audio sources to start out with.")] public int MinSfxAudioSources = 10; - [FormerlySerializedAs("_maxSfxAudioSources")] + [Tooltip("Any more than this will be considered too many SFX audio sources.")] public int MaxSfxAudioSources = 30; - [FormerlySerializedAs("_minMusicAudioSources")] [Tooltip("The number of music audio sources to start out with.")] public int MinMusicAudioSources = 3; - [FormerlySerializedAs("_maxMusicAudioSources")] + [Tooltip("Any more than this will be considered too many SFX audio sources.")] public int MaxMusicAudioSources = 10; - [FormerlySerializedAs("purgeFrequency")] [Tooltip("How often (in minutes) do we purge unused audio sources?")] [SerializeField] private int _purgeFrequency = 2; diff --git a/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs b/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs index 6f5203790a..64622cedac 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/Boombox.cs @@ -13,23 +13,18 @@ namespace SS3D.Systems.Audio /// public class Boombox : InteractionTargetNetworkBehaviour, IToggleable { - [FormerlySerializedAs("_audioClips")] [SerializeField] private List _songs; // is it playing music - [FormerlySerializedAs("radioOn")] [SyncVar] public bool RadioOn; - [FormerlySerializedAs("currentMusic")] [SyncVar] public int CurrentMusic; - // I hate my life - [FormerlySerializedAs("interactionIcon")] + // TODO: Update this file with boombox icons from asset data. public Sprite InteractionIcon; - [FormerlySerializedAs("interactionIconOn")] public Sprite InteractionIconOn; public void Toggle() diff --git a/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs b/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs index eb5533563f..a89a0dd675 100644 --- a/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs +++ b/Assets/Scripts/SS3D/Systems/Audio/NoisyCollision.cs @@ -13,52 +13,43 @@ public class NoisyCollision : MonoBehaviour { //Variables!!! Wow! - [FormerlySerializedAs("collisionVolume")] [Header("Collision Noises Setup")] [Range(0f, 1f)] [SerializeField] [Tooltip("How loud sounds will play when colliding.")] private float _collisionVolume = 0.7f; - [FormerlySerializedAs("basePitch")] [SerializeField] [Range(0, 2)] [Tooltip("The base pitch of the sound effect. Default is 1, lower pitch is 0, higher pitch is 2.")] private float _basePitch = 1; - [FormerlySerializedAs("pitchModulationLow")] [SerializeField] [Range(0f, 0.5f)] [Tooltip("How much lower pitch can the sound play?")] private float _pitchModulationLow = 0; - [FormerlySerializedAs("pitchModulationHigh")] [SerializeField] [Range(0f, 0.5f)] [Tooltip("How much higher pitch can the sound play?")] private float _pitchModulationHigh = 0; - [FormerlySerializedAs("lightImpactVelocity")] [SerializeField] [Tooltip("How fast this object must hit another in order to make a light impact sound.")] private float _lightImpactVelocity = 1; - [FormerlySerializedAs("useHardImpactSounds")] [SerializeField] [Tooltip("Does this object make a different sound being struck at a high velocity?")] private bool _useHardImpactSounds = false; - [FormerlySerializedAs("hardImpactVelocity")] [SerializeField] [Tooltip("How fast this object must hit another in order to make a hard impact sound.")] private float _hardImpactVelocity = 7.5f; - [FormerlySerializedAs("lightImpactSounds")] [SerializeField] [Tooltip("List of possible sounds that will play when this object collides lightly.")] private AudioClip[] _lightImpactSounds; - [FormerlySerializedAs("hardImpactSounds")] [SerializeField] [Tooltip("List of possible sounds that will play when this object collides heavily.")] private AudioClip[] _hardImpactSounds; diff --git a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs index 8e65f7f7c9..8876471801 100644 --- a/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs +++ b/Assets/Scripts/SS3D/Systems/Health/BodyParts/HumanTorso.cs @@ -7,11 +7,8 @@ public class HumanTorso : BodyPart { - [FormerlySerializedAs("heart")] public Heart Heart; - [FormerlySerializedAs("leftLung")] public Lungs LeftLung; - [FormerlySerializedAs("rightLung")] public Lungs RightLung; public override void OnStartServer() diff --git a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs index b62a4b5f9d..05b391a5cf 100644 --- a/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs +++ b/Assets/Scripts/SS3D/Systems/IngameConsoleSystem/Commands/AddHandCommand.cs @@ -43,7 +43,7 @@ public override string Perform(string[] args, NetworkConnection conn) Player Player = Subsystems.Get().GetPlayer(ckey); Entity entity = Subsystems.Get().GetSpawnedEntity(Player); - GameObject leftHandPrefab = Bodyparts.HumanHandLeft; + GameObject leftHandPrefab = Items.HumanHandLeft; GameObject leftHandObject = GameObject.Instantiate(leftHandPrefab, entity.transform); leftHandObject.transform.localPosition = position; leftHandObject.transform.localEulerAngles = rotation; From ff37062be0b7adc3ed5233bf7eca1046197e222b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Buratto?= Date: Thu, 14 Dec 2023 19:44:57 -0300 Subject: [PATCH 32/32] Fix issue with audio system references --- Assets/Content/Scenes/Game.unity | 133 ++++++++++++++++++++++++++----- 1 file changed, 113 insertions(+), 20 deletions(-) diff --git a/Assets/Content/Scenes/Game.unity b/Assets/Content/Scenes/Game.unity index aedd527c25..e556aa7d12 100644 --- a/Assets/Content/Scenes/Game.unity +++ b/Assets/Content/Scenes/Game.unity @@ -298,13 +298,13 @@ MonoBehaviour: _componentIndexCache: 6 _addedNetworkObject: {fileID: 1506918116} _networkObjectCache: {fileID: 1506918116} - _sfxAudioSourcePrefab: {fileID: 2009473039716497087, guid: c06c615017500c94686e0eb5eb4402cf, type: 3} - _musicAudioSourcePrefab: {fileID: 506012496172542686, guid: 8d3ef04cfa66af24a8803a70f9d93a53, type: 3} - _minSfxAudioSources: 30 - _maxSfxAudioSources: 100 - _minMusicAudioSources: 3 - _maxMusicAudioSources: 10 - purgeFrequency: 3 + SfxAudioSourcePrefab: {fileID: 2009473039716497087, guid: c06c615017500c94686e0eb5eb4402cf, type: 3} + MusicAudioSourcePrefab: {fileID: 506012496172542686, guid: 8d3ef04cfa66af24a8803a70f9d93a53, type: 3} + MinSfxAudioSources: 10 + MaxSfxAudioSources: 30 + MinMusicAudioSources: 3 + MaxMusicAudioSources: 10 + _purgeFrequency: 2 --- !u!114 &327065888 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 4370972904279086842, guid: 8c378d8ec3d1cda4389f92d2d8703b6a, type: 3} @@ -1439,7 +1439,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4468402021075485018, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3} propertyPath: m_AnchoredPosition.y - value: -230.00003 + value: -230.00006 objectReference: {fileID: 0} - target: {fileID: 4468402021449001342, guid: cc5383d385556f443b2a7d3202f2b2c1, type: 3} propertyPath: m_AnchoredPosition.x @@ -2115,17 +2115,6 @@ MonoBehaviour: _scenePathHash: 2499635508 k__BackingField: 10735852762284701941 k__BackingField: 0 ---- !u!114 &1677838619 stripped -MonoBehaviour: - m_CorrespondingSourceObject: {fileID: 7059085592882110939, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} - m_PrefabInstance: {fileID: 3810371244444567007} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 177da45823e2d1d458275216629c83cd, type: 3} - m_Name: - m_EditorClassIdentifier: --- !u!1 &1679380531 GameObject: m_ObjectHideFlags: 0 @@ -3130,6 +3119,26 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 2314162496313497845, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2314162496313497845, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2314162496313497845, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2314162496313497845, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2314162496313497845, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 2527545844909297779, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} propertyPath: ClothingSlotPosition.Array.size value: 11 @@ -3170,6 +3179,30 @@ PrefabInstance: propertyPath: m_AnchorMin.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3242409152173300344, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3640471949036544852, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} propertyPath: m_Size value: 1 @@ -3318,6 +3351,66 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 4394331957901036445, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4394331957901036445, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4394331957901036445, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4394331957901036445, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4394331957901036445, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4534603291001454609, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4534603291001454609, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4534603291001454609, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4534603291001454609, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4534603291001454609, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4606001282313738760, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4606001282313738760, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4606001282313738760, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4606001282313738760, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4606001282313738760, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} - target: {fileID: 5535391432771639728, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} propertyPath: m_AnchorMax.y value: 0 @@ -3513,7 +3606,7 @@ PrefabInstance: - target: {fileID: 8720228674029226883, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} propertyPath: _networkBehaviours.Array.data[2] value: - objectReference: {fileID: 1677838619} + objectReference: {fileID: 0} - target: {fileID: 8720228674029226883, guid: df2268f4f5f6669459174c6d7e2043ce, type: 3} propertyPath: _sceneNetworkObjects.Array.data[0] value: