diff --git a/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml b/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml index 1d9d86846..edf79de9a 100644 --- a/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml +++ b/.idea/.idea.Aetheria-Economy/.idea/contentModel.xml @@ -1762,10 +1762,12 @@ + + diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index aaf570c39..c1b3a6900 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -878,10 +878,12 @@ + + diff --git a/Assets/Prefabs/Property Label.prefab b/Assets/Prefabs/Property Label.prefab deleted file mode 100644 index b2536da47..000000000 --- a/Assets/Prefabs/Property Label.prefab +++ /dev/null @@ -1,387 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1632094985843186602 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1632094985843186603} - - component: {fileID: 1632094985843186605} - - component: {fileID: 1632094985843186604} - m_Layer: 5 - m_Name: Left Side - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1632094985843186603 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094985843186602} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1632094986161186410} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1632094985843186605 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094985843186602} - m_CullTransparentMesh: 0 ---- !u!114 &1632094985843186604 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094985843186602} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Mass - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2} - m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 1 - m_textAlignment: 513 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 1632094985843186604} - characterCount: 4 - spriteCount: 0 - spaceCount: 0 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &1632094986161186409 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1632094986161186410} - - component: {fileID: 1632094986161186411} - - component: {fileID: 5740982411344804251} - m_Layer: 5 - m_Name: Mass - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1632094986161186410 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094986161186409} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1632094985843186603} - - {fileID: 1632094987425363090} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1632094986161186411 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094986161186409} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 32 - m_FlexibleWidth: 1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 ---- !u!114 &5740982411344804251 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094986161186409} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b403db1d8980f544099fedf5735cf364, type: 3} - m_Name: - m_EditorClassIdentifier: - Name: {fileID: 1632094985843186604} - Value: {fileID: 1632094987425363091} ---- !u!1 &1632094987425363089 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1632094987425363090} - - component: {fileID: 1632094987425363092} - - component: {fileID: 1632094987425363091} - m_Layer: 5 - m_Name: Right Side - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1632094987425363090 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094987425363089} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1632094986161186410} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1632094987425363092 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094987425363089} - m_CullTransparentMesh: 0 ---- !u!114 &1632094987425363091 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1632094987425363089} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: 95% - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2} - m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 516 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 1632094987425363091} - characterCount: 3 - spriteCount: 0 - spaceCount: 0 - wordCount: 1 - linkCount: 0 - lineCount: 1 - pageCount: 1 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Prefabs/Property Label.prefab.meta b/Assets/Prefabs/Property Label.prefab.meta deleted file mode 100644 index 3ac2223e3..000000000 --- a/Assets/Prefabs/Property Label.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 01f7b13c5b5bbd749b15faf488e2d746 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Property List Element.prefab b/Assets/Prefabs/Property List Element.prefab deleted file mode 100644 index 2beea6c1b..000000000 --- a/Assets/Prefabs/Property List Element.prefab +++ /dev/null @@ -1,215 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &3323284177650426704 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3323284177650426705} - - component: {fileID: 3323284177650426707} - m_Layer: 5 - m_Name: Prerequisite - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &3323284177650426705 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3323284177650426704} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 3323284177901608003} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &3323284177650426707 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3323284177650426704} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 32 - m_FlexibleWidth: 1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 ---- !u!1 &3323284177901608002 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 3323284177901608003} - - component: {fileID: 3323284177901608005} - - component: {fileID: 3323284177901608004} - m_Layer: 5 - m_Name: Name - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &3323284177901608003 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3323284177901608002} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 3323284177650426705} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &3323284177901608005 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3323284177901608002} - m_CullTransparentMesh: 0 ---- !u!114 &3323284177901608004 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3323284177901608002} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: Dolor I - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: 9dcd07b95faae7641a3ff6fccab43c32, type: 2} - m_sharedMaterial: {fileID: 21906973755630180, guid: 9dcd07b95faae7641a3ff6fccab43c32, - type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_outlineColor: - serializedVersion: 2 - rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_textAlignment: 513 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_firstOverflowCharacterIndex: 0 - m_linkedTextComponent: {fileID: 0} - m_isLinkedTextComponent: 0 - m_isTextTruncated: 0 - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_ignoreRectMaskCulling: 0 - m_ignoreCulling: 1 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_VertexBufferAutoSizeReduction: 1 - m_firstVisibleCharacter: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_textInfo: - textComponent: {fileID: 3323284177901608004} - characterCount: 7 - spriteCount: 0 - spaceCount: 1 - wordCount: 2 - linkCount: 0 - lineCount: 6 - pageCount: 1 - materialCount: 1 - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_spriteAnimator: {fileID: 0} - m_hasFontAssetChanged: 0 - m_subTextObjects: - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - - {fileID: 0} - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Prefabs/Property List Element.prefab.meta b/Assets/Prefabs/Property List Element.prefab.meta deleted file mode 100644 index 702a89b08..000000000 --- a/Assets/Prefabs/Property List Element.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: df470b8b27554594e80b38898d22c563 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Prefabs/Property List.prefab b/Assets/Prefabs/Property List.prefab index 8bdf94952..48d1cb467 100644 --- a/Assets/Prefabs/Property List.prefab +++ b/Assets/Prefabs/Property List.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &1625414104823398761 +--- !u!1 &2088721703192714105 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,10 +8,10 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1625414104823398758} - - component: {fileID: 1625414104823398757} - - component: {fileID: 1625414104823398756} - - component: {fileID: 1625414104823398759} + - component: {fileID: 2088721703192714102} + - component: {fileID: 2088721703192714101} + - component: {fileID: 2088721703192714100} + - component: {fileID: 2088721703192714103} m_Layer: 5 m_Name: Title m_TagString: Untagged @@ -19,40 +19,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1625414104823398758 +--- !u!224 &2088721703192714102 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104823398761} + m_GameObject: {fileID: 2088721703192714105} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1625414104842428050} - m_RootOrder: 0 + m_Father: {fileID: 2088721703295321218} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 32} + m_AnchoredPosition: {x: 2, y: 0} + m_SizeDelta: {x: -4, y: 32} m_Pivot: {x: 0.5, y: 1} ---- !u!222 &1625414104823398757 +--- !u!222 &2088721703192714101 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104823398761} + m_GameObject: {fileID: 2088721703192714105} m_CullTransparentMesh: 0 ---- !u!114 &1625414104823398756 +--- !u!114 &2088721703192714100 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104823398761} + m_GameObject: {fileID: 2088721703192714105} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -93,8 +93,8 @@ MonoBehaviour: m_outlineColor: serializedVersion: 2 rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 20 + m_fontSizeBase: 20 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -110,7 +110,7 @@ MonoBehaviour: m_enableWordWrapping: 1 m_wordWrappingRatios: 0.4 m_overflowMode: 0 - m_firstOverflowCharacterIndex: -1 + m_firstOverflowCharacterIndex: 1 m_linkedTextComponent: {fileID: 0} m_isLinkedTextComponent: 0 m_isTextTruncated: 0 @@ -133,13 +133,13 @@ MonoBehaviour: m_pageToDisplay: 1 m_margin: {x: 0, y: 0, z: 0, w: 0} m_textInfo: - textComponent: {fileID: 1625414104823398756} + textComponent: {fileID: 2088721703192714100} characterCount: 9 spriteCount: 0 spaceCount: 0 wordCount: 1 linkCount: 0 - lineCount: 1 + lineCount: 9 pageCount: 1 materialCount: 1 m_isUsingLegacyAnimationComponent: 0 @@ -157,13 +157,13 @@ MonoBehaviour: - {fileID: 0} m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!114 &1625414104823398759 +--- !u!114 &2088721703192714103 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104823398761} + m_GameObject: {fileID: 2088721703192714105} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} @@ -177,7 +177,7 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!1 &1625414104842428053 +--- !u!1 &2088721703295321221 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -185,28 +185,32 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1625414104842428050} - - component: {fileID: 1625414104842428048} - - component: {fileID: 1625414104842428051} + - component: {fileID: 2088721703295321218} + - component: {fileID: 2088721703295321216} + - component: {fileID: 2088721703295321219} + - component: {fileID: 6914334813923144328} + - component: {fileID: 5436107563273525140} m_Layer: 5 - m_Name: Resources + m_Name: Property List m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &1625414104842428050 +--- !u!224 &2088721703295321218 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104842428053} + m_GameObject: {fileID: 2088721703295321221} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1625414104823398758} + - {fileID: 6724740944390240338} + - {fileID: 2088721703192714102} + - {fileID: 2118837324186690404} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -215,13 +219,13 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1625414104842428048 +--- !u!114 &2088721703295321216 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104842428053} + m_GameObject: {fileID: 2088721703295321221} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} @@ -235,13 +239,13 @@ MonoBehaviour: m_FlexibleWidth: 1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!114 &1625414104842428051 +--- !u!114 &2088721703295321219 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1625414104842428053} + m_GameObject: {fileID: 2088721703295321221} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} @@ -249,12 +253,243 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: m_Left: 32 - m_Right: 0 + m_Right: 8 m_Top: 40 - m_Bottom: 0 + m_Bottom: -8 m_ChildAlignment: 0 - m_Spacing: 0 + m_Spacing: 8 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 0 m_ChildControlWidth: 1 m_ChildControlHeight: 1 +--- !u!114 &6914334813923144328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2088721703295321221} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2544c9c8b6358c54ea58c5fb33bb48b7, type: 3} + m_Name: + m_EditorClassIdentifier: + Title: {fileID: 2088721703192714100} + SectionPrefab: {fileID: 1026668114703092140, guid: 3a149ea40b43fbf47b51ec165cb04e5f, + type: 3} + ListPrefab: {fileID: 6914334813923144328} + PropertyPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b, + type: 3} + ChildRadioSelection: 0 + FoldoutIcon: {fileID: 6485458701090981364} + FoldoutRotationDamping: 10 + Button: {fileID: 5436107563273525140} + LayoutGroup: {fileID: 2088721703295321219} + FoldedPadding: -8 + ExpandedPadding: 8 +--- !u!114 &5436107563273525140 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2088721703295321221} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fafbcd26aa8d175448880b37b7a41b2e, type: 3} + m_Name: + m_EditorClassIdentifier: + StateDamping: 10 + Fill: {fileID: 1992060800398866096} + CurrentState: 0 + DisableClickWhenSelected: 1 + UnselectedColor: {r: 0, g: 0.4180913, b: 1, a: 0.15294118} + SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355} + HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.29803923} + ClickColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196} +--- !u!1 &2755672975795187168 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6724740944390240338} + - component: {fileID: 3053647169083004458} + - component: {fileID: 1992060800398866096} + - component: {fileID: 8453645590874671590} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6724740944390240338 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755672975795187168} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2088721703295321218} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 4} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3053647169083004458 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755672975795187168} + m_CullTransparentMesh: 0 +--- !u!114 &1992060800398866096 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755672975795187168} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &8453645590874671590 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2755672975795187168} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &4248181803077145238 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2118837324186690404} + - component: {fileID: 7097941323566313314} + - component: {fileID: 6485458701090981364} + - component: {fileID: 2754928952561943955} + m_Layer: 5 + m_Name: Foldout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2118837324186690404 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4248181803077145238} + m_LocalRotation: {x: 0, y: 0, z: -0.7071068, w: 0.7071068} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2088721703295321218} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -16, y: -16} + m_SizeDelta: {x: 24, y: 24} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7097941323566313314 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4248181803077145238} + m_CullTransparentMesh: 0 +--- !u!114 &6485458701090981364 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4248181803077145238} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ef87bbaa6e6f6824fa1b758cc93393d5, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!114 &2754928952561943955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4248181803077145238} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 diff --git a/Assets/Prefabs/Property List Property.prefab b/Assets/Prefabs/Property.prefab similarity index 64% rename from Assets/Prefabs/Property List Property.prefab rename to Assets/Prefabs/Property.prefab index d931c116c..65a428bf9 100644 --- a/Assets/Prefabs/Property List Property.prefab +++ b/Assets/Prefabs/Property.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &5427704876334193406 +--- !u!1 &2677123916028371622 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,82 +8,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 5427704876334193401} - - component: {fileID: 5427704876334193403} - - component: {fileID: 7902539716206638097} - m_Layer: 5 - m_Name: Property List Property - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &5427704876334193401 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876334193406} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 5427704876509448083} - - {fileID: 3885286060680318645} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &5427704876334193403 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876334193406} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 32 - m_FlexibleWidth: 1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 ---- !u!114 &7902539716206638097 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876334193406} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b403db1d8980f544099fedf5735cf364, type: 3} - m_Name: - m_EditorClassIdentifier: - Name: {fileID: 5427704876509448082} - Value: {fileID: 7059630196601159823} ---- !u!1 &5427704876509448080 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5427704876509448083} - - component: {fileID: 5427704876509448093} - - component: {fileID: 5427704876509448082} + - component: {fileID: 2677123916028371621} + - component: {fileID: 2677123916028371627} + - component: {fileID: 2677123916028371620} m_Layer: 5 m_Name: Name m_TagString: Untagged @@ -91,40 +18,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &5427704876509448083 +--- !u!224 &2677123916028371621 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876509448080} + m_GameObject: {fileID: 2677123916028371622} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 5427704876334193401} - m_RootOrder: 0 + m_Father: {fileID: 2677123916507168719} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: 2, y: 0} + m_SizeDelta: {x: -4, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &5427704876509448093 +--- !u!222 &2677123916028371627 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876509448080} + m_GameObject: {fileID: 2677123916028371622} m_CullTransparentMesh: 0 ---- !u!114 &5427704876509448082 +--- !u!114 &2677123916028371620 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5427704876509448080} + m_GameObject: {fileID: 2677123916028371622} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -165,8 +92,8 @@ MonoBehaviour: m_outlineColor: serializedVersion: 2 rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 20 + m_fontSizeBase: 20 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -205,7 +132,7 @@ MonoBehaviour: m_pageToDisplay: 1 m_margin: {x: 0, y: 0, z: 0, w: 0} m_textInfo: - textComponent: {fileID: 5427704876509448082} + textComponent: {fileID: 2677123916028371620} characterCount: 5 spriteCount: 0 spaceCount: 0 @@ -229,7 +156,7 @@ MonoBehaviour: - {fileID: 0} m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &6914432219637367135 +--- !u!1 &2677123916507168712 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -237,9 +164,114 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 3885286060680318645} - - component: {fileID: 7069940623071928653} - - component: {fileID: 7059630196601159823} + - component: {fileID: 2677123916507168719} + - component: {fileID: 2677123916507168717} + - component: {fileID: 279061376544739623} + - component: {fileID: 7959015954088891046} + - component: {fileID: 5626264982920981796} + m_Layer: 5 + m_Name: Property + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2677123916507168719 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2677123916507168712} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 5843074710384729622} + - {fileID: 2677123916028371621} + - {fileID: 6602089867192183683} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2677123916507168717 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2677123916507168712} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 32 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &279061376544739623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2677123916507168712} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b403db1d8980f544099fedf5735cf364, type: 3} + m_Name: + m_EditorClassIdentifier: + Name: {fileID: 2677123916028371620} + Value: {fileID: 1120484356114752953} + Button: {fileID: 5626264982920981796} +--- !u!222 &7959015954088891046 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2677123916507168712} + m_CullTransparentMesh: 0 +--- !u!114 &5626264982920981796 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2677123916507168712} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fafbcd26aa8d175448880b37b7a41b2e, type: 3} + m_Name: + m_EditorClassIdentifier: + StateDamping: 10 + Fill: {fileID: 8035498868821314605} + CurrentState: 0 + DisableClickWhenSelected: 1 + UnselectedColor: {r: 0, g: 0.4180913, b: 1, a: 0.15294118} + SelectedColor: {r: 1, g: 0.44583336, b: 0.050000012, a: 0.65882355} + HoverColor: {r: 0, g: 0.4180913, b: 1, a: 0.29803923} + ClickColor: {r: 0, g: 0.4180913, b: 1, a: 0.7490196} +--- !u!1 &3567103445860279401 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6602089867192183683} + - component: {fileID: 894355259237647483} + - component: {fileID: 1120484356114752953} m_Layer: 5 m_Name: Value m_TagString: Untagged @@ -247,40 +279,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &3885286060680318645 +--- !u!224 &6602089867192183683 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6914432219637367135} + m_GameObject: {fileID: 3567103445860279401} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 5427704876334193401} - m_RootOrder: 1 + m_Father: {fileID: 2677123916507168719} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: -2, y: 0} + m_SizeDelta: {x: -4, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7069940623071928653 +--- !u!222 &894355259237647483 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6914432219637367135} + m_GameObject: {fileID: 3567103445860279401} m_CullTransparentMesh: 0 ---- !u!114 &7059630196601159823 +--- !u!114 &1120484356114752953 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 6914432219637367135} + m_GameObject: {fileID: 3567103445860279401} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} @@ -321,8 +353,8 @@ MonoBehaviour: m_outlineColor: serializedVersion: 2 rgba: 4278190080 - m_fontSize: 24 - m_fontSizeBase: 24 + m_fontSize: 20 + m_fontSizeBase: 20 m_fontWeight: 400 m_enableAutoSizing: 0 m_fontSizeMin: 18 @@ -361,7 +393,7 @@ MonoBehaviour: m_pageToDisplay: 1 m_margin: {x: 0, y: 0, z: 0, w: 0} m_textInfo: - textComponent: {fileID: 7059630196601159823} + textComponent: {fileID: 1120484356114752953} characterCount: 9 spriteCount: 0 spaceCount: 0 @@ -385,3 +417,75 @@ MonoBehaviour: - {fileID: 0} m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &7198678740849276813 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5843074710384729622} + - component: {fileID: 7637636659958895358} + - component: {fileID: 8035498868821314605} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5843074710384729622 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7198678740849276813} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2677123916507168719} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 16, y: 4} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &7637636659958895358 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7198678740849276813} + m_CullTransparentMesh: 0 +--- !u!114 &8035498868821314605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7198678740849276813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0.4180913, b: 1, a: 0.15294118} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 84d126f984de5fd42ac66361c00f830c, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 diff --git a/Assets/Prefabs/Property List Property.prefab.meta b/Assets/Prefabs/Property.prefab.meta similarity index 74% rename from Assets/Prefabs/Property List Property.prefab.meta rename to Assets/Prefabs/Property.prefab.meta index d50d429c2..075cf888d 100644 --- a/Assets/Prefabs/Property List Property.prefab.meta +++ b/Assets/Prefabs/Property.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c88ab84dc56cd384b9392a382d0f5441 +guid: 5b8c5126640066e4fabe6e65b7225b3b PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index e015bd96f..f8128e862 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -9460,7 +9460,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &944413849 RectTransform: m_ObjectHideFlags: 0 @@ -9480,7 +9480,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 0, y: -2} - m_SizeDelta: {x: 550, y: -4} + m_SizeDelta: {x: 500, y: -4} m_Pivot: {x: 0, y: 0.5} --- !u!114 &944413850 MonoBehaviour: @@ -9531,7 +9531,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Padding: m_Left: 32 - m_Right: 96 + m_Right: 32 m_Top: 32 m_Bottom: 0 m_ChildAlignment: 0 @@ -9555,14 +9555,11 @@ MonoBehaviour: Title: {fileID: 1572621768} SectionPrefab: {fileID: 1026668114703092140, guid: 3a149ea40b43fbf47b51ec165cb04e5f, type: 3} - ListPrefab: {fileID: 1625414104842428050, guid: 93e63e3a8b352a04897123288d70f04b, + ListPrefab: {fileID: 6914334813923144328, guid: 93e63e3a8b352a04897123288d70f04b, type: 3} - ListItemPrefab: {fileID: 3323284177650426705, guid: df470b8b27554594e80b38898d22c563, - type: 3} - ListPropertyPrefab: {fileID: 7902539716206638097, guid: c88ab84dc56cd384b9392a382d0f5441, - type: 3} - PropertyPrefab: {fileID: 5740982411344804251, guid: 01f7b13c5b5bbd749b15faf488e2d746, + PropertyPrefab: {fileID: 279061376544739623, guid: 5b8c5126640066e4fabe6e65b7225b3b, type: 3} + ChildRadioSelection: 0 --- !u!1 &953390096 GameObject: m_ObjectHideFlags: 0 @@ -14840,10 +14837,10 @@ RectTransform: m_Father: {fileID: 944413849} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 243, y: -113.71509} - m_SizeDelta: {x: 422, y: 163.43} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1572621767 MonoBehaviour: diff --git a/Assets/Scripts/ServerShared/Attributes.cs b/Assets/Scripts/ServerShared/Attributes.cs index 3cbe5830e..e814e400f 100644 --- a/Assets/Scripts/ServerShared/Attributes.cs +++ b/Assets/Scripts/ServerShared/Attributes.cs @@ -42,6 +42,8 @@ public class EntityTypeRestrictionAttribute : Attribute } } +public class RuntimeInspectable : Attribute { } + [AttributeUsage(AttributeTargets.Class)] public class InspectableAttribute : Attribute { } diff --git a/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs b/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs index 146939baa..38fd45381 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Cooldown.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-10), RuntimeInspectable] public class CooldownData : BehaviorData { - [InspectableField, JsonProperty("cooldown"), Key(1)] + [InspectableField, JsonProperty("cooldown"), Key(1), RuntimeInspectable] public PerformanceStat Cooldown = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs b/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs index 61a074208..bf5f9b839 100644 --- a/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs +++ b/Assets/Scripts/ServerShared/Behaviors/EnergyDraw.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(12)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(12), RuntimeInspectable] public class EnergyDrawData : BehaviorData { - [InspectableField, JsonProperty("draw"), Key(1)] + [InspectableField, JsonProperty("draw"), Key(1), RuntimeInspectable] public PerformanceStat Draw = new PerformanceStat(); [InspectableField, JsonProperty("perSecond"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Behaviors/Heat.cs b/Assets/Scripts/ServerShared/Behaviors/Heat.cs index c1389fcd8..5341353c0 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Heat.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Heat.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(10), Inspectable] public class HeatData : BehaviorData { - [InspectableField, JsonProperty("heat"), Key(1)] + [InspectableField, JsonProperty("heat"), Key(1), RuntimeInspectable] public PerformanceStat Heat = new PerformanceStat(); [InspectableField, JsonProperty("perSecond"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs index 16f38159b..8757210bd 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ItemUsage.cs @@ -4,10 +4,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-5)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-5), RuntimeInspectable] public class ItemUsageData : BehaviorData { - [InspectableDatabaseLink(typeof(SimpleCommodityData)), JsonProperty("item"), Key(1)] + [InspectableDatabaseLink(typeof(SimpleCommodityData)), JsonProperty("item"), Key(1), RuntimeInspectable] public Guid Item; public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/MiningController.cs b/Assets/Scripts/ServerShared/Behaviors/MiningController.cs index be800ddef..897f6ac15 100644 --- a/Assets/Scripts/ServerShared/Behaviors/MiningController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/MiningController.cs @@ -85,17 +85,7 @@ public class MiningController : ControllerBase, IBehavior, IPersistentBehavior, else { _entity.SetMessage("Out of cargo space. Returning home to offload cargo."); - GoHome(() => - { - var homeEntity = _context.Cache.Get(HomeEntity); - if (!_entity.Cargo.ToArray().All(ii => - _context.MoveCargo(_entity, homeEntity, _context.Cache.Get(ii)))) - { - homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task."); - FinishTask(); - _taskStarted = false; - } - }); + GoHome(OnArriveHome); } } } @@ -103,6 +93,17 @@ public class MiningController : ControllerBase, IBehavior, IPersistentBehavior, return base.Update(delta); } + private void OnArriveHome() + { + var homeEntity = _context.Cache.Get(HomeEntity); + if (!_entity.Cargo.ToArray().All(ii => _context.MoveCargo(_entity, homeEntity, _context.Cache.Get(ii)))) + { + homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task."); + FinishTask(); + _taskStarted = false; + } + } + private void NextAsteroid() { var miningTask = _context.Cache.Get(Task); diff --git a/Assets/Scripts/ServerShared/Behaviors/Radiance.cs b/Assets/Scripts/ServerShared/Behaviors/Radiance.cs index f9e7d2470..b5e3047b3 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Radiance.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Radiance.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class RadianceData : BehaviorData { - [InspectableField, JsonProperty("radiance"), Key(1)] + [InspectableField, JsonProperty("radiance"), Key(1), RuntimeInspectable] public PerformanceStat Radiance = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Radiator.cs b/Assets/Scripts/ServerShared/Behaviors/Radiator.cs index ddbc0f069..13ac64665 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Radiator.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Radiator.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class RadiatorData : BehaviorData { - [InspectableField, JsonProperty("emissivity"), Key(1)] + [InspectableField, JsonProperty("emissivity"), Key(1), RuntimeInspectable] public PerformanceStat Emissivity = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Reactor.cs b/Assets/Scripts/ServerShared/Behaviors/Reactor.cs index ea298f953..de60f8e3b 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reactor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reactor.cs @@ -1,23 +1,23 @@ using MessagePack; using Newtonsoft.Json; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class ReactorData : BehaviorData { - [InspectableField, JsonProperty("charge"), Key(1)] + [InspectableField, JsonProperty("charge"), Key(1), RuntimeInspectable] public PerformanceStat Charge = new PerformanceStat(); - [InspectableField, JsonProperty("capacitance"), Key(2)] + [InspectableField, JsonProperty("capacitance"), Key(2), RuntimeInspectable] public PerformanceStat Capacitance = new PerformanceStat(); - [InspectableField, JsonProperty("efficiency"), Key(3)] + [InspectableField, JsonProperty("efficiency"), Key(3), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [InspectableField, JsonProperty("overload"), Key(4)] + [InspectableField, JsonProperty("overload"), Key(4), RuntimeInspectable] public PerformanceStat OverloadEfficiency = new PerformanceStat(); - [InspectableField, JsonProperty("underload"), Key(5)] - public PerformanceStat UnderloadRecovery = new PerformanceStat(); + [InspectableField, JsonProperty("underload"), Key(5), RuntimeInspectable] + public PerformanceStat ThrottlingFactor = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) { @@ -55,7 +55,7 @@ public class Reactor : IBehavior if (Entity.Energy > Capacitance) { - Entity.AddHeat(-(Entity.Energy - Capacitance) / efficiency * (1 - 1 / Context.Evaluate(_data.UnderloadRecovery, Item, Entity))); + Entity.AddHeat(-(Entity.Energy - Capacitance) / efficiency * (1 - 1 / Context.Evaluate(_data.ThrottlingFactor, Item, Entity))); Entity.Energy = Capacitance; } diff --git a/Assets/Scripts/ServerShared/Behaviors/Reflector.cs b/Assets/Scripts/ServerShared/Behaviors/Reflector.cs index 59f609982..0b4baffc2 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Reflector.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Reflector.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class ReflectorData : BehaviorData { - [InspectableField, JsonProperty("crossSection"), Key(1)] + [InspectableField, JsonProperty("crossSection"), Key(1), RuntimeInspectable] public PerformanceStat CrossSection = new PerformanceStat(); // [InspectableAnimationCurve, JsonProperty("visibility"), Key(1)] diff --git a/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs b/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs index 21e83ce64..fecca70d9 100644 --- a/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs +++ b/Assets/Scripts/ServerShared/Behaviors/ResourceScanner.cs @@ -5,16 +5,16 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class ResourceScannerData : BehaviorData { - [InspectableField, JsonProperty("range"), Key(1)] + [InspectableField, JsonProperty("range"), Key(1), RuntimeInspectable] public PerformanceStat Range = new PerformanceStat(); - [InspectableField, JsonProperty("minDensity"), Key(2)] + [InspectableField, JsonProperty("minDensity"), Key(2), RuntimeInspectable] public PerformanceStat MinimumDensity = new PerformanceStat(); - [InspectableField, JsonProperty("scanDuration"), Key(3)] + [InspectableField, JsonProperty("scanDuration"), Key(3), RuntimeInspectable] public PerformanceStat ScanDuration = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs index 53a1a1325..108ad5a06 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Sensor.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Sensor.cs @@ -2,10 +2,10 @@ using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class SensorData : BehaviorData { - [InspectableField, JsonProperty("sensitivity"), Key(3)] + [InspectableField, JsonProperty("sensitivity"), Key(3), RuntimeInspectable] public PerformanceStat Sensitivity = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Shield.cs b/Assets/Scripts/ServerShared/Behaviors/Shield.cs index 40630a10f..4e38eba95 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Shield.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Shield.cs @@ -3,13 +3,13 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class ShieldData : BehaviorData { - [InspectableField, JsonProperty("efficiency"), Key(1)] + [InspectableField, JsonProperty("efficiency"), Key(1), RuntimeInspectable] public PerformanceStat Efficiency = new PerformanceStat(); - [InspectableField, JsonProperty("shielding"), Key(2)] + [InspectableField, JsonProperty("shielding"), Key(2), RuntimeInspectable] public PerformanceStat Shielding = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs index 5192c07f7..c202f59bd 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thermotoggle.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-22)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), Order(-22), RuntimeInspectable] public class ThermotoggleData : BehaviorData { - [TemperatureInspectable, JsonProperty("targetTemp"), Key(1)] + [TemperatureInspectable, JsonProperty("targetTemp"), Key(1), RuntimeInspectable] public float TargetTemperature; [InspectableField, JsonProperty("perSecond"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs index 8adf126c6..0b54de876 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Thruster.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Thruster.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), EntityTypeRestriction(HullType.Ship), RuntimeInspectable] public class ThrusterData : BehaviorData { - [InspectableField, JsonProperty("thrust"), Key(1)] + [InspectableField, JsonProperty("thrust"), Key(1), RuntimeInspectable] public PerformanceStat Thrust = new PerformanceStat(); [InspectableField, JsonProperty("visibility"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Behaviors/TowingController.cs b/Assets/Scripts/ServerShared/Behaviors/TowingController.cs index 04c6b5c5a..4637a004f 100644 --- a/Assets/Scripts/ServerShared/Behaviors/TowingController.cs +++ b/Assets/Scripts/ServerShared/Behaviors/TowingController.cs @@ -42,37 +42,54 @@ public class TowingController : ControllerBase, IBehavior, IPersistentBehavior { if (!_taskStarted) { - MoveTo(towingTask.Zone, () => - { - _entity.SetMessage("Entering pickup phase."); - MoveTo(_context.Cache.Get(towingTask.Station), true, () => - { - var target = _context.ZoneEntities[_entity.Zone][towingTask.Station] as OrbitalEntity; - _context.SetParent(target, _entity); - _entity.SetMessage("Entering delivery phase."); - MoveTo(() => - { - var orbitParent = _context.GetOrbitPosition(towingTask.OrbitParent); - var parentToUs = _entity.Position - orbitParent; - return orbitParent + normalize(parentToUs) * towingTask.OrbitDistance; - }, () => _context.GetOrbitVelocity(towingTask.OrbitParent), () => - { - _context.RemoveParent(target); - _entity.SetMessage("Target delivered. Returning Home."); - - var orbit = _context.CreateOrbit(towingTask.Zone, towingTask.OrbitParent, _entity.Position); - target.OrbitData = orbit.ID; - - FinishTask(); - _taskStarted = false; - }); - }); - }); + MoveTo(towingTask.Zone, OnZoneArrival); _taskStarted = true; } } return base.Update(delta); } + + void OnZoneArrival() + { + var towingTask = _context.Cache.Get(Task); + + _entity.SetMessage("Entering pickup phase."); + + MoveTo(_context.Cache.Get(towingTask.Station), true, OnPickup); + } + + void OnPickup() + { + var towingTask = _context.Cache.Get(Task); + var target = _context.ZoneEntities[_entity.Zone][towingTask.Station] as OrbitalEntity; + + _context.SetParent(target, _entity); + + _entity.SetMessage("Entering delivery phase."); + + MoveTo(() => + { + var orbitParent = _context.GetOrbitPosition(towingTask.OrbitParent); + var parentToUs = _entity.Position - orbitParent; + return orbitParent + normalize(parentToUs) * towingTask.OrbitDistance; + }, () => _context.GetOrbitVelocity(towingTask.OrbitParent), OnDelivery); + } + + void OnDelivery() + { + var towingTask = _context.Cache.Get(Task); + var target = _context.ZoneEntities[_entity.Zone][towingTask.Station] as OrbitalEntity; + + _context.RemoveParent(target); + + _entity.SetMessage("Target delivered. Returning Home."); + + var orbit = _context.CreateOrbit(towingTask.Zone, towingTask.OrbitParent, _entity.Position); + target.OrbitData = orbit.ID; + + FinishTask(); + _taskStarted = false; + } public PersistentBehaviorData Store() { diff --git a/Assets/Scripts/ServerShared/Behaviors/Turning.cs b/Assets/Scripts/ServerShared/Behaviors/Turning.cs index 974d1a8e7..d377ecff3 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Turning.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Turning.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class TurningData : BehaviorData { - [InspectableField, JsonProperty("torque"), Key(1)] + [InspectableField, JsonProperty("torque"), Key(1), RuntimeInspectable] public PerformanceStat Torque = new PerformanceStat(); [InspectableField, JsonProperty("visibility"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs index c884986ad..092dac6ac 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityConversion.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class VelocityConversionData : BehaviorData { - [InspectableField, JsonProperty("traction"), Key(1)] + [InspectableField, JsonProperty("traction"), Key(1), RuntimeInspectable] public PerformanceStat Traction = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs b/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs index 1e93a801c..f07104daf 100644 --- a/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs +++ b/Assets/Scripts/ServerShared/Behaviors/VelocityLimit.cs @@ -3,10 +3,10 @@ using Newtonsoft.Json; using Unity.Mathematics; using static Unity.Mathematics.math; -[MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class VelocityLimitData : BehaviorData { - [InspectableField, JsonProperty("topSpeed"), Key(1)] + [InspectableField, JsonProperty("topSpeed"), Key(1), RuntimeInspectable] public PerformanceStat TopSpeed = new PerformanceStat(); public override IBehavior CreateInstance(GameContext context, Entity entity, Gear item) diff --git a/Assets/Scripts/ServerShared/Behaviors/Visibility.cs b/Assets/Scripts/ServerShared/Behaviors/Visibility.cs index dee3a90c1..809b86439 100644 --- a/Assets/Scripts/ServerShared/Behaviors/Visibility.cs +++ b/Assets/Scripts/ServerShared/Behaviors/Visibility.cs @@ -3,10 +3,10 @@ using System.Linq; using MessagePack; using Newtonsoft.Json; -[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn)] +[InspectableField, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable] public class VisibilityData : BehaviorData { - [InspectableField, JsonProperty("visibility"), Key(1)] + [InspectableField, JsonProperty("visibility"), Key(1), RuntimeInspectable] public PerformanceStat Visibility = new PerformanceStat(); [InspectableField, JsonProperty("visibilityDecay"), Key(2)] diff --git a/Assets/Scripts/ServerShared/Extensions.cs b/Assets/Scripts/ServerShared/Extensions.cs index b71003c7a..1a5f3f939 100644 --- a/Assets/Scripts/ServerShared/Extensions.cs +++ b/Assets/Scripts/ServerShared/Extensions.cs @@ -2,6 +2,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; +using System.Numerics; using System.Reflection; using System.Text.RegularExpressions; using LiteNetLib; @@ -47,6 +48,16 @@ public static class Extensions "$1 $2" ); } + + public static string SignificantDigits(this float d, int digits=10) + { + int magnitude = (d == 0.0f) ? 0 : (int)Math.Floor(Math.Log10(Math.Abs(d))) + 1; + digits -= magnitude; + if (digits < 0) + digits = 0; + string fmt = "f" + digits.ToString(); + return d.ToString(fmt); + } private static Random? _random; private static Random Random => (Random) (_random ?? (_random = new Random((uint) (DateTime.Now.Ticks%uint.MaxValue)))); diff --git a/Assets/Scripts/ServerShared/GlobalData.cs b/Assets/Scripts/ServerShared/GlobalData.cs index 22fa0576b..28a6d2863 100644 --- a/Assets/Scripts/ServerShared/GlobalData.cs +++ b/Assets/Scripts/ServerShared/GlobalData.cs @@ -160,6 +160,9 @@ public class GlobalData : DatabaseEntry [InspectableField, JsonProperty("messageDuration"), Key(50)] public float MessageDuration = 4f; + + [InspectableField, JsonProperty("significantDigits"), Key(51)] + public int SignificantDigits = 3; public float PlanetRadius(float mass) { diff --git a/Assets/Scripts/StrategyGameManager.cs b/Assets/Scripts/StrategyGameManager.cs index b198ee6e6..10b4180a7 100644 --- a/Assets/Scripts/StrategyGameManager.cs +++ b/Assets/Scripts/StrategyGameManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Reflection; using NaughtyAttributes; using RethinkDb.Driver.Net; using TMPro; @@ -178,7 +179,7 @@ public class StrategyGameManager : MonoBehaviour } } - CorpMenuContinueButton.OnClick += _ => + CorpMenuContinueButton.OnClick += () => { if (_selectedParent != null && !string.IsNullOrEmpty(CorpNameInputField.text)) { @@ -681,11 +682,14 @@ public class StrategyGameManager : MonoBehaviour if(!detectedResources.Any()) PropertiesPanel.AddProperty("No resources detected", () => ""); else - PropertiesPanel.AddList("Resources", detectedResources.Select, (string, Func)>(resource => + { + var list = PropertiesPanel.AddList("Resources"); + foreach (var resource in detectedResources) { var itemData = _context.Cache.Get(resource.Key); - return (itemData.Name, () => $"{resource.Value:0}"); - })); + list.AddProperty(itemData.Name, () => $"{resource.Value:0}"); + } + } } } } @@ -700,18 +704,34 @@ public class StrategyGameManager : MonoBehaviour hullData.HullType == HullType.Ship ? "Drone Ship" : hullData.HullType == HullType.Station ? "Colony" : "Weapons Platform"); - PropertiesPanel.AddProperty("Hull", () => $"{hullData.Name}"); - PropertiesPanel.AddProperty("Capacity", () => $"{entity.OccupiedCapacity}/{entity.Capacity}"); - PropertiesPanel.AddProperty("Mass", () => $"{entity.Mass}"); + PopulateGearProperties(PropertiesPanel.AddList(hullData.Name), hull, entity); + //PropertiesPanel.AddProperty("Hull", () => $"{hullData.Name}"); + PropertiesPanel.AddProperty("Capacity", () => $"{entity.OccupiedCapacity}/{entity.Capacity:0}"); + PropertiesPanel.AddProperty("Mass", () => $"{entity.Mass.SignificantDigits(_context.GlobalData.SignificantDigits)}"); PropertiesPanel.AddProperty("Temperature", () => $"{entity.Temperature:0}°K"); PropertiesPanel.AddProperty("Energy", () => $"{entity.Energy:0}/{entity.GetBehaviors().First().Capacitance:0}"); - PropertiesPanel.AddList("Gear", entity.EquippedItems.Select(g=>_context.Cache.Get(g).ItemData.Name)); - PropertiesPanel.AddList("Cargo", entity.Cargo.Select)>(ii=> + var gearList = PropertiesPanel.AddList("Gear"); + var equippedItems = entity.EquippedItems.Select(g => _context.Cache.Get(g)); + foreach(var gear in equippedItems) + PopulateGearProperties(gearList.AddList(gear.ItemData.Name), gear, entity); + // gearList.AddProperty(gear.ItemData.Name); + // var firstGear = equippedItems.First(); + // PopulateGearProperties(gearList.AddList(firstGear.ItemData.Name), firstGear, entity); + if(!entity.Cargo.Any()) + PropertiesPanel.AddProperty("No Cargo"); + else { - var itemInstance = _context.Cache.Get(ii); - var data = _context.Cache.Get(itemInstance.Data); - return (data.Name, () => itemInstance is SimpleCommodity simpleCommodity ? simpleCommodity.Quantity.ToString() : ""); - })); + var cargoList = PropertiesPanel.AddList("Cargo"); + foreach (var itemID in entity.Cargo) + { + var itemInstance = _context.Cache.Get(itemID); + var data = _context.Cache.Get(itemInstance.Data); + if(itemInstance is SimpleCommodity simpleCommodity) + cargoList.AddProperty(data.Name, () => simpleCommodity.Quantity.ToString()); + else + cargoList.AddProperty(data.Name); + } + } } if (targetObject is ZoneData zone) @@ -723,6 +743,32 @@ public class StrategyGameManager : MonoBehaviour } } + void PopulateGearProperties(PropertiesList panel, Gear gear, Entity entity) + { + var data = gear.ItemData; + panel.AddProperty("Durability", () => $"{gear.Durability.SignificantDigits(_context.GlobalData.SignificantDigits)}/{_context.Evaluate(data.Durability, gear).SignificantDigits(_context.GlobalData.SignificantDigits)}"); + foreach (var behavior in data.Behaviors) + { + var type = behavior.GetType(); + if (type.GetCustomAttribute(typeof(RuntimeInspectable)) != null) + { + foreach (var field in type.GetFields().Where(f => f.GetCustomAttribute() != null)) + { + var fieldType = field.FieldType; + if (fieldType == typeof(float)) + panel.AddProperty(field.Name, () => $"{((float) field.GetValue(behavior)).SignificantDigits(_context.GlobalData.SignificantDigits)}"); + else if (fieldType == typeof(int)) + panel.AddProperty(field.Name, () => $"{(int) field.GetValue(behavior)}"); + else if (fieldType == typeof(PerformanceStat)) + { + var stat = (PerformanceStat) field.GetValue(behavior); + panel.AddProperty(field.Name, () => $"{_context.Evaluate(stat, gear, entity).SignificantDigits(_context.GlobalData.SignificantDigits)}"); + } + } + } + } + } + void PopulateGalaxy() { _galaxyPopulated = true; diff --git a/Assets/Scripts/TechTreeMsagl.cs b/Assets/Scripts/TechTreeMsagl.cs index 93c807998..49e323bfd 100644 --- a/Assets/Scripts/TechTreeMsagl.cs +++ b/Assets/Scripts/TechTreeMsagl.cs @@ -337,18 +337,26 @@ public class TechTreeMsagl : MonoBehaviour PropertiesPanel.AddProperty("Produces", () => $"{blueprint.Quantity} {Context.Cache.Get(blueprint.Item).Name}"); PropertiesPanel.AddProperty("Production Quality", () => $"{Mathf.RoundToInt(blueprint.Quality * 100)}%"); PropertiesPanel.AddProperty("Production Time", () => $"{blueprint.ProductionTime:0.##} MH"); - PropertiesPanel.AddList("Ingredients", blueprint.Ingredients.Select(ingredient => + + var ingredientsList = PropertiesPanel.AddList("Ingredients"); + foreach (var ingredient in blueprint.Ingredients) { var ingredientData = Context.Cache.Get(ingredient.Key); - return $"{ingredient.Value} {ingredientData.Name}"; - })); - PropertiesPanel.AddList("Dependencies", blueprint.Dependencies.Select(dependency => + ingredientsList.AddProperty(ingredientData.Name, () => ingredient.Value.ToString()); + } + + var dependenciesList = PropertiesPanel.AddList("Dependencies"); + foreach (var dependency in blueprint.Dependencies) { var dependencyBlueprint = Context.Cache.Get(dependency); - return $"{dependencyBlueprint.Name}"; - })); - PropertiesPanel.AddList("Descendants", Blueprints.Where(bp => - bp.Dependencies.Any(dep => blueprint.ID == dep)).Select(descendant => $"{descendant.Name}")); + dependenciesList.AddProperty(dependencyBlueprint.Name); + } + + var descendantsList = PropertiesPanel.AddList("Descendants"); + foreach (var descendant in Blueprints.Where(bp => bp.Dependencies.Any(dep => blueprint.ID == dep))) + { + descendantsList.AddProperty(descendant.Name); + } }; _techInstances.Add(tech.GetComponent()); } diff --git a/Assets/Scripts/UI/FlatButton.cs b/Assets/Scripts/UI/FlatButton.cs index d1985b4d5..9dafe9264 100644 --- a/Assets/Scripts/UI/FlatButton.cs +++ b/Assets/Scripts/UI/FlatButton.cs @@ -8,12 +8,11 @@ using UnityEngine.UI; public class FlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler { - public event Action OnClick; + public event Action OnClick; public float StateDamping; // public RectTransform Tab; public Image Fill; public Image Outline; - public TextMeshProUGUI Label; public VerticalLayoutGroup LabelLayout; public FlatButtonState CurrentState = FlatButtonState.Unselected; public bool DisableClickWhenSelected = true; @@ -50,7 +49,7 @@ public class FlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandl { Fill.color = ClickAppearance.FillColor; Outline.color = ClickAppearance.OutlineColor; - OnClick?.Invoke(this); + OnClick?.Invoke(); } } diff --git a/Assets/Scripts/UI/FlatFlatButton.cs b/Assets/Scripts/UI/FlatFlatButton.cs new file mode 100644 index 000000000..ef7336075 --- /dev/null +++ b/Assets/Scripts/UI/FlatFlatButton.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +public class FlatFlatButton : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler +{ + public event Action OnClick; + public float StateDamping; +// public RectTransform Tab; + public Image Fill; + public FlatButtonState CurrentState = FlatButtonState.Unselected; + public bool DisableClickWhenSelected = true; + + public Color UnselectedColor; + public Color SelectedColor; + public Color HoverColor; + public Color ClickColor; + + public void OnPointerEnter(PointerEventData eventData) + { + if (OnClick != null && CurrentState == FlatButtonState.Unselected) + CurrentState = FlatButtonState.Hover; + } + + public void OnPointerExit(PointerEventData eventData) + { + if (CurrentState == FlatButtonState.Hover) + CurrentState = FlatButtonState.Unselected; + } + + public void OnPointerClick(PointerEventData eventData) + { + if (!DisableClickWhenSelected || CurrentState != FlatButtonState.Selected) + { + if (OnClick != null) + { + Fill.color = ClickColor; + OnClick(); + } + } + } + + private void Update() + { + Color appearance; + switch (CurrentState) + { + case FlatButtonState.Unselected: + appearance = UnselectedColor; + break; + case FlatButtonState.Selected: + appearance = SelectedColor; + break; + case FlatButtonState.Hover: + appearance = HoverColor; + break; + default: + appearance = Color.white; + break; + } + + Fill.color = Color.Lerp(Fill.color, appearance, StateDamping * Time.deltaTime); + } +} \ No newline at end of file diff --git a/Assets/Scripts/UI/FlatFlatButton.cs.meta b/Assets/Scripts/UI/FlatFlatButton.cs.meta new file mode 100644 index 000000000..44720ad43 --- /dev/null +++ b/Assets/Scripts/UI/FlatFlatButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fafbcd26aa8d175448880b37b7a41b2e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/LoginScreen.cs b/Assets/Scripts/UI/LoginScreen.cs index 48ced5dc6..e1c3ea901 100644 --- a/Assets/Scripts/UI/LoginScreen.cs +++ b/Assets/Scripts/UI/LoginScreen.cs @@ -24,7 +24,7 @@ public class LoginScreen : MonoBehaviour LoginButton.CurrentState = FlatButtonState.Selected; CultClient.AddMessageListener(success => SceneManager.LoadScene("Main")); CultClient.OnError += s => Error.text = s; - RegisterButton.OnClick += _ => + RegisterButton.OnClick += () => { if(!CultClient.Connected) CultClient.Connect(Server.text); @@ -42,7 +42,7 @@ public class LoginScreen : MonoBehaviour RegisterButton.CurrentState = FlatButtonState.Selected; } }; - LoginButton.OnClick += _ => + LoginButton.OnClick += () => { if(!CultClient.Connected) CultClient.Connect(Server.text); diff --git a/Assets/Scripts/UI/PropertiesList.cs b/Assets/Scripts/UI/PropertiesList.cs new file mode 100644 index 000000000..473440328 --- /dev/null +++ b/Assets/Scripts/UI/PropertiesList.cs @@ -0,0 +1,68 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using TMPro; +using UnityEngine; +using UnityEngine.UI; + +public class PropertiesList : ReadOnlyPropertiesPanel +{ + public Image FoldoutIcon; + public float FoldoutRotationDamping; + public FlatFlatButton Button; + public VerticalLayoutGroup LayoutGroup; + public int FoldedPadding = -8; + public int ExpandedPadding = 8; + + private bool _expanded = false; + private float _targetFoldoutRotation = 0; + private float _foldoutRotation = 0; + + public bool Expanded + { + set + { + _expanded = value; + var padding = LayoutGroup.padding; + padding = new RectOffset(padding.left, padding.right, padding.top, _expanded ? ExpandedPadding : FoldedPadding); + LayoutGroup.padding = padding; + foreach (var property in Properties) property.SetActive(_expanded); + _targetFoldoutRotation = _expanded ? -90 : 0; + } + } + + public void Start() + { + Button.OnClick += ToggleExpand; + } + + public void ToggleExpand() => Expanded = !_expanded; + + private void Update() + { + _foldoutRotation = + Mathf.Lerp(_foldoutRotation, _targetFoldoutRotation, FoldoutRotationDamping * Time.deltaTime); + FoldoutIcon.transform.localRotation = Quaternion.Euler(0,0, _foldoutRotation); + } + + public new PropertyLabel AddProperty(string name, Func value = null, Action onClick = null) + { + var prop = base.AddProperty(name, value, onClick); + prop.gameObject.SetActive(false); + return prop; + } + + public new PropertiesList AddList(string name) + { + var list = base.AddList(name); + list.gameObject.SetActive(false); + return list; + } + + public new RectTransform AddSection(string name) + { + var section = base.AddSection(name); + section.gameObject.SetActive(false); + return section; + } +} diff --git a/Assets/Scripts/UI/PropertiesList.cs.meta b/Assets/Scripts/UI/PropertiesList.cs.meta new file mode 100644 index 000000000..77684cab6 --- /dev/null +++ b/Assets/Scripts/UI/PropertiesList.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2544c9c8b6358c54ea58c5fb33bb48b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/UI/PropertyLabel.cs b/Assets/Scripts/UI/PropertyLabel.cs index a35f98c1f..3b7489a69 100644 --- a/Assets/Scripts/UI/PropertyLabel.cs +++ b/Assets/Scripts/UI/PropertyLabel.cs @@ -9,9 +9,11 @@ public class PropertyLabel : MonoBehaviour public TextMeshProUGUI Name; public TextMeshProUGUI Value; public Func ValueFunction; + public FlatFlatButton Button; private void Update() { - Value.text = ValueFunction?.Invoke() ?? ""; + if(ValueFunction != null) + Value.text = ValueFunction(); } } diff --git a/Assets/Scripts/UI/ReadOnlyPropertiesPanel.cs b/Assets/Scripts/UI/ReadOnlyPropertiesPanel.cs index b3baf0496..ca772d6a2 100644 --- a/Assets/Scripts/UI/ReadOnlyPropertiesPanel.cs +++ b/Assets/Scripts/UI/ReadOnlyPropertiesPanel.cs @@ -8,60 +8,67 @@ public class ReadOnlyPropertiesPanel : MonoBehaviour { public TextMeshProUGUI Title; public RectTransform SectionPrefab; - public RectTransform ListPrefab; - public RectTransform ListItemPrefab; - public PropertyLabel ListPropertyPrefab; + public PropertiesList ListPrefab; public PropertyLabel PropertyPrefab; + public bool ChildRadioSelection; - private List _properties = new List(); + protected List Properties = new List(); + protected List Buttons = new List(); + protected FlatFlatButton SelectedChild; public void Clear() { - foreach(var property in _properties) + foreach(var property in Properties) Destroy(property); + Properties.Clear(); + Buttons.Clear(); + SelectedChild = null; } - public void AddProperty(string name, Func value) + public PropertyLabel AddProperty(string name, Func value = null, Action onClick = null) { var property = Instantiate(PropertyPrefab, transform); property.Name.text = name; - property.Value.text = value(); + property.Value.text = value?.Invoke() ?? ""; property.ValueFunction = value; - _properties.Add(property.gameObject); + if (ChildRadioSelection) + { + Buttons.Add(property.Button); + property.Button.OnClick += () => + { + if (SelectedChild != null) + SelectedChild.CurrentState = FlatButtonState.Unselected; + SelectedChild = property.Button; + SelectedChild.CurrentState = FlatButtonState.Selected; + onClick?.Invoke(); + }; + } + else if(onClick!=null) property.Button.OnClick += onClick; + Properties.Add(property.gameObject); + return property; } - public void AddSection(string name) + public RectTransform AddSection(string name) { var section = Instantiate(SectionPrefab, transform); section.GetComponentInChildren().text = name; - _properties.Add(section.gameObject); + Properties.Add(section.gameObject); + return section; } - public void AddList(string name, IEnumerable elements) + public PropertiesList AddList(string name) //, IEnumerable<(string, Func)> elements) { var list = Instantiate(ListPrefab, transform); - list.GetComponentInChildren().text = name; - foreach (var element in elements) - { - var item = Instantiate(ListItemPrefab, list); - item.GetComponentInChildren().text = element; - _properties.Add(item.gameObject); - } - _properties.Add(list.gameObject); - } - - public void AddList(string name, IEnumerable<(string, Func)> elements) - { - var list = Instantiate(ListPrefab, transform); - list.GetComponentInChildren().text = name; - foreach (var element in elements) - { - var item = Instantiate(ListPropertyPrefab, list); - item.Name.text = element.Item1; - item.Value.text = element.Item2(); - item.ValueFunction = element.Item2; - _properties.Add(item.gameObject); - } - _properties.Add(list.gameObject); + list.Title.text = name; + // foreach (var element in elements) + // { + // var item = Instantiate(PropertyPrefab, list); + // item.Name.text = element.Item1; + // item.Value.text = element.Item2(); + // item.ValueFunction = element.Item2; + // Properties.Add(item.gameObject); + // } + Properties.Add(list.gameObject); + return list; } } diff --git a/Assets/Scripts/UI/TabGroup.cs b/Assets/Scripts/UI/TabGroup.cs index c8db9ac53..2971ff4dd 100644 --- a/Assets/Scripts/UI/TabGroup.cs +++ b/Assets/Scripts/UI/TabGroup.cs @@ -15,7 +15,7 @@ public class TabGroup : MonoBehaviour _tabButtons = GetComponentsInChildren(); foreach (var thisButton in _tabButtons) { - thisButton.OnClick += button => + thisButton.OnClick += () => { if (_currentButton != null) {