diff --git a/OpenRA.Game/Traits/World/ResourceType.cs b/OpenRA.Game/Traits/World/ResourceType.cs index 0e5df25e93..19295ae009 100644 --- a/OpenRA.Game/Traits/World/ResourceType.cs +++ b/OpenRA.Game/Traits/World/ResourceType.cs @@ -31,6 +31,7 @@ namespace OpenRA.Traits public readonly string[] AllowedTerrainTypes = { }; public readonly bool AllowUnderActors = false; public readonly bool AllowUnderBuildings = false; + public readonly bool AllowOnRamps = false; public PipType PipColor = PipType.Yellow; diff --git a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs index 5f80af57b4..da226d769b 100644 --- a/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/ResourceLayer.cs @@ -151,6 +151,14 @@ namespace OpenRA.Mods.Common.Traits if (!rt.Info.AllowUnderBuildings && buildingInfluence.GetBuildingAt(cell) != null) return false; + if (!rt.Info.AllowOnRamps) + { + var tile = world.Map.MapTiles.Value[cell]; + var tileInfo = world.TileSet.GetTileInfo(tile); + if (tileInfo != null && tileInfo.RampType > 0) + return false; + } + return true; }