From cdcc8ceaaebffc8d0322d794c869daf6a64e9e5a Mon Sep 17 00:00:00 2001 From: JackPlaymint Date: Fri, 24 May 2024 14:44:47 +0100 Subject: [PATCH 1/3] Fix ducks and building rotation --- frontend/src/components/map/Buildings.tsx | 3 ++- .../DisplayBuildingMapElement.prefab | 14 ++++++------- .../FactoryBuilding_2.0/Roof_04.prefab | 20 +++++++++---------- .../ScriptableBuildPipeline.json | 13 ++++++++++++ 4 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 map/ProjectSettings/ScriptableBuildPipeline.json diff --git a/frontend/src/components/map/Buildings.tsx b/frontend/src/components/map/Buildings.tsx index 8e888416b..b5838ea59 100644 --- a/frontend/src/components/map/Buildings.tsx +++ b/frontend/src/components/map/Buildings.tsx @@ -75,7 +75,8 @@ export const Buildings = memo( const coords = getCoords(b.location.tile); const height = getTileHeightFromCoords(coords); const selected = selectedElementID === b.id ? 'outline' : 'none'; - const rotation = b.facingDirection == FacingDirectionKind.RIGHT ? -30 : 30; + console.log(b); + const rotation = b.facingDirection && b.facingDirection == FacingDirectionKind.LEFT ? 30 : -30; const tile = tiles.find(({ id }) => id === b.location?.tile.id); const overrideModel = (pluginBuildingProperties || []) .find((prop) => prop.id == b.id && prop.key == 'model') diff --git a/map/Assets/Addressables/DisplayBuilding/DisplayBuildingMapElement.prefab b/map/Assets/Addressables/DisplayBuilding/DisplayBuildingMapElement.prefab index 306b2898f..1a06ca066 100644 --- a/map/Assets/Addressables/DisplayBuilding/DisplayBuildingMapElement.prefab +++ b/map/Assets/Addressables/DisplayBuilding/DisplayBuildingMapElement.prefab @@ -449,7 +449,7 @@ PrefabInstance: - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalPosition.x - value: 0.038 + value: 0.0043643117 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} @@ -459,27 +459,27 @@ PrefabInstance: - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: 0.05016914 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalRotation.w - value: 0 + value: 0.70710576 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalRotation.x - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalRotation.y - value: 1 + value: 0.70710784 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalRotation.z - value: 0 + value: -0 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} @@ -489,7 +489,7 @@ PrefabInstance: - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 180 + value: 90 objectReference: {fileID: 0} - target: {fileID: 2481613906286960452, guid: 249851de4fb29b548ae1f53ad9c8dcb7, type: 3} diff --git a/map/Assets/Addressables/FactoryBuilding/FactoryBuilding_2.0/Roof_04.prefab b/map/Assets/Addressables/FactoryBuilding/FactoryBuilding_2.0/Roof_04.prefab index d58e44922..c482b14c0 100644 --- a/map/Assets/Addressables/FactoryBuilding/FactoryBuilding_2.0/Roof_04.prefab +++ b/map/Assets/Addressables/FactoryBuilding/FactoryBuilding_2.0/Roof_04.prefab @@ -135,22 +135,22 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0.7071068 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: -0.7071068 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} @@ -160,7 +160,7 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: -90 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} @@ -241,22 +241,22 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0.7071068 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: -0.7071068 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} @@ -266,7 +266,7 @@ PrefabInstance: - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: -90 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 39ef6f0947a150742b03acab7789bd28, type: 3} diff --git a/map/ProjectSettings/ScriptableBuildPipeline.json b/map/ProjectSettings/ScriptableBuildPipeline.json new file mode 100644 index 000000000..e6738dc22 --- /dev/null +++ b/map/ProjectSettings/ScriptableBuildPipeline.json @@ -0,0 +1,13 @@ +{ + "useBuildCacheServer": false, + "cacheServerHost": "", + "cacheServerPort": 8126, + "threadedArchiving": true, + "logCacheMiss": false, + "slimWriteResults": true, + "maximumCacheSize": 20, + "useDetailedBuildLog": false, + "useV2Hasher": true, + "fileIDHashSeed": 0, + "prefabPackedHeaderSize": 2 +} \ No newline at end of file From b6e2180d51190b77f16ebcffc7a943f3c7e91029 Mon Sep 17 00:00:00 2001 From: JackPlaymint Date: Fri, 24 May 2024 14:48:44 +0100 Subject: [PATCH 2/3] remove console log --- frontend/src/components/map/Buildings.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/map/Buildings.tsx b/frontend/src/components/map/Buildings.tsx index b5838ea59..93c2b082a 100644 --- a/frontend/src/components/map/Buildings.tsx +++ b/frontend/src/components/map/Buildings.tsx @@ -75,7 +75,6 @@ export const Buildings = memo( const coords = getCoords(b.location.tile); const height = getTileHeightFromCoords(coords); const selected = selectedElementID === b.id ? 'outline' : 'none'; - console.log(b); const rotation = b.facingDirection && b.facingDirection == FacingDirectionKind.LEFT ? 30 : -30; const tile = tiles.find(({ id }) => id === b.location?.tile.id); const overrideModel = (pluginBuildingProperties || []) From a6e3120ff2f5468c7fe2e59ad98195087533b1c2 Mon Sep 17 00:00:00 2001 From: Lewis Dunn Date: Fri, 24 May 2024 16:33:24 +0100 Subject: [PATCH 3/3] Added ScriptableBuildPipeline.json to gitignore --- .dockerignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.dockerignore b/.dockerignore index 0da249ef0..74cf358d6 100644 --- a/.dockerignore +++ b/.dockerignore @@ -21,3 +21,4 @@ /contracts/node_modules/ /contracts/lib/cog/services/ !/contracts/lib/cog/services/schema/ +/map/ProjectSettings/ScriptableBuildPipeline.json \ No newline at end of file