Add RevealGeneratedShroud toggle to NukePower
To give modders a choice.
This commit is contained in:
@@ -57,6 +57,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Range of cells the camera should reveal around target cell.")]
|
||||
public readonly WDist CameraRange = WDist.Zero;
|
||||
|
||||
[Desc("Can the camera reveal shroud generated by the GeneratesShroud trait?")]
|
||||
public readonly bool RevealGeneratedShroud = true;
|
||||
|
||||
[Desc("Reveal cells to players with these stances only.")]
|
||||
public readonly Stance CameraStances = Stance.Ally;
|
||||
|
||||
@@ -118,7 +121,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
if (info.CameraRange != WDist.Zero)
|
||||
{
|
||||
self.World.AddFrameEndTask(w => w.Add(new RevealShroudEffect(targetPosition, info.CameraRange, Shroud.SourceType.Visibility, self.Owner, info.CameraStances,
|
||||
var type = info.RevealGeneratedShroud ? Shroud.SourceType.Visibility
|
||||
: Shroud.SourceType.PassiveVisibility;
|
||||
|
||||
self.World.AddFrameEndTask(w => w.Add(new RevealShroudEffect(targetPosition, info.CameraRange, type, self.Owner, info.CameraStances,
|
||||
info.FlightDelay - info.CameraSpawnAdvance, info.CameraSpawnAdvance + info.CameraRemoveDelay)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user