diff --git a/OpenRA.Mods.RA/World/SmudgeLayer.cs b/OpenRA.Mods.RA/World/SmudgeLayer.cs index b009e6876f..2716d38099 100755 --- a/OpenRA.Mods.RA/World/SmudgeLayer.cs +++ b/OpenRA.Mods.RA/World/SmudgeLayer.cs @@ -14,7 +14,8 @@ using System.Drawing; using System.Linq; using OpenRA.FileFormats; using OpenRA.Graphics; -using OpenRA.Traits; +using OpenRA.Traits; +using OpenRA.Mods.RA.Effects; namespace OpenRA.Mods.RA { @@ -22,7 +23,9 @@ namespace OpenRA.Mods.RA { public readonly string Type = "Scorch"; public readonly string[] Types = {"sc1", "sc2", "sc3", "sc4", "sc5", "sc6"}; - public readonly int[] Depths = {1,1,1,1,1,1}; + public readonly int[] Depths = {1,1,1,1,1,1}; + public readonly int SmokePercentage = 25; + public readonly string SmokeType = "smoke_m"; public object Create(ActorInitializer init) { return new SmudgeLayer(this); } } @@ -53,7 +56,10 @@ namespace OpenRA.Mods.RA public void AddSmudge(int2 loc) { if (!world.GetTerrainInfo(loc).AcceptSmudge) - return; + return; + + if (Game.CosmeticRandom.Next(0,100) <= Info.SmokePercentage) + world.AddFrameEndTask(w => w.Add(new Smoke(w, Traits.Util.CenterOfCell(loc), Info.SmokeType))); // No smudge; create a new one if (!tiles.ContainsKey(loc)) diff --git a/mods/cnc/rules/system.yaml b/mods/cnc/rules/system.yaml index 34869afa68..b629ba35d7 100644 --- a/mods/cnc/rules/system.yaml +++ b/mods/cnc/rules/system.yaml @@ -119,6 +119,7 @@ World: AllowUnderActors: false SmudgeLayer@SCORCH: Type:Scorch + SmokePercentage:50 Types:sc1,sc2,sc3,sc4,sc5,sc6 Depths:1,1,1,1,1,1 SmudgeLayer@CRATER: diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 00a61bae55..ec7a139aaf 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -177,6 +177,7 @@ World: AllowUnderActors: false SmudgeLayer@SCORCH: Type:Scorch + SmokePercentage:50 Types:sc1,sc2,sc3,sc4,sc5,sc6 Depths:1,1,1,1,1,1 SmudgeLayer@CRATER: