diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/APC.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/APC.asset index 5476344d44..0d0740c51c 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/APC.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/APC.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: APC m_EditorClassIdentifier: - nameString: apc prefab: {fileID: 5287103069661579500, guid: 4c966398d6624164c910cd29c1faa980, type: 3} icon: {fileID: 0} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/AirAlarm.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/AirAlarm.asset index 1b36d1d026..fe5058a940 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/AirAlarm.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/AirAlarm.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: AirAlarm m_EditorClassIdentifier: - nameString: airalarm prefab: {fileID: 6961426338783081091, guid: 11a2276338ebc64429dfc565b491e437, type: 3} icon: {fileID: 0} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/FireAlarm.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/FireAlarm.asset index 006b03b1b9..9051037301 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/FireAlarm.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/FireAlarm.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: FireAlarm m_EditorClassIdentifier: - nameString: firealarm prefab: {fileID: 4866668043303595546, guid: 50dd6be959d44844ab1abf8a3f2adb01, type: 3} icon: {fileID: 0} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Mirror.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Mirror.asset index 910b90e72b..3e5bef2a7a 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Mirror.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Mirror.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: Mirror m_EditorClassIdentifier: - nameString: mirror prefab: {fileID: 4866668043303595546, guid: a777a6da30f0704478e25312963a8151, type: 3} icon: {fileID: 21300000, guid: 9e89894392ee65f45bd559d4619cbade, type: 3} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterHorizontal.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterHorizontal.asset index c1d69c2fdc..412a2ed4af 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterHorizontal.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterHorizontal.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: PosterHorizontal m_EditorClassIdentifier: - nameString: poster_horizontal prefab: {fileID: 5161561551087789900, guid: fdaaabc96a55d824a86a3636906240c1, type: 3} icon: {fileID: 0} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterVertical.asset b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterVertical.asset index ca6b61f86c..472dda647e 100644 --- a/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterVertical.asset +++ b/Assets/Content/Data/TileMap/Resources/Structures/WallMounts/Posters/PosterVertical.asset @@ -12,7 +12,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4584c35d672b8a74797cc5efa123ce16, type: 3} m_Name: PosterVertical m_EditorClassIdentifier: - nameString: poster_vertical prefab: {fileID: 5927714388255546572, guid: 0d6ab6288624c7348bdcbfb81d07088f, type: 3} icon: {fileID: 0} layer: 6 @@ -20,3 +19,4 @@ MonoBehaviour: specificType: 0 width: 1 height: 1 + isLarge: 1 diff --git a/Assets/Scripts/SS3D/Systems/Tile/BuildChecker.cs b/Assets/Scripts/SS3D/Systems/Tile/BuildChecker.cs index 547b75468c..d2e3f54a96 100644 --- a/Assets/Scripts/SS3D/Systems/Tile/BuildChecker.cs +++ b/Assets/Scripts/SS3D/Systems/Tile/BuildChecker.cs @@ -47,6 +47,10 @@ public static bool CanBuild(ITileLocation[] tileLocations, TileObjectSo tileObje case TileLayer.WallMountHigh when canBuild: case TileLayer.WallMountLow when canBuild: { + // If a wall mount is large, check to see if there are other large wall mounts + canBuild &= !(tileObjectSo.isLarge && !tileLocations[(int)placedLayer].IsEmpty(TileHelper.GetNextCardinalDir(dir))); + canBuild &= !(tileObjectSo.isLarge && !tileLocations[(int)placedLayer].IsEmpty(TileHelper.GetPreviousCardinalDir(dir))); + canBuild &= CanBuildWallAttachment((SingleTileLocation) tileLocations[(int)TileLayer.Turf], tileObjectSo, dir, adjacentObjects); break; diff --git a/Assets/Scripts/SS3D/Systems/Tile/SO/TileObjectSo.cs b/Assets/Scripts/SS3D/Systems/Tile/SO/TileObjectSo.cs index a0278916a6..0bf6d57337 100644 --- a/Assets/Scripts/SS3D/Systems/Tile/SO/TileObjectSo.cs +++ b/Assets/Scripts/SS3D/Systems/Tile/SO/TileObjectSo.cs @@ -21,6 +21,9 @@ public class TileObjectSo : GenericObjectSo public int width = 1; public int height = 1; + // Whether or not a wall mount is large + public bool isLarge; + /// /// TODO : document and understand properly this method. Why the diagonal directions are not treated ? ///