Merge pull request #8477 from pchote/actor-visibility
Move actor visibility checks out of Shroud
This commit is contained in:
@@ -49,6 +49,8 @@ namespace OpenRA
|
|||||||
public Shroud Shroud;
|
public Shroud Shroud;
|
||||||
public World World { get; private set; }
|
public World World { get; private set; }
|
||||||
|
|
||||||
|
readonly IFogVisibilityModifier[] fogVisibilities;
|
||||||
|
|
||||||
CountryInfo ChooseCountry(World world, string name, bool requireSelectable = true)
|
CountryInfo ChooseCountry(World world, string name, bool requireSelectable = true)
|
||||||
{
|
{
|
||||||
var selectableCountries = world.Map.Rules.Actors["world"].Traits
|
var selectableCountries = world.Map.Rules.Actors["world"].Traits
|
||||||
@@ -113,6 +115,9 @@ namespace OpenRA
|
|||||||
PlayerActor = world.CreateActor("Player", new TypeDictionary { new OwnerInit(this) });
|
PlayerActor = world.CreateActor("Player", new TypeDictionary { new OwnerInit(this) });
|
||||||
Shroud = PlayerActor.Trait<Shroud>();
|
Shroud = PlayerActor.Trait<Shroud>();
|
||||||
|
|
||||||
|
fogVisibilities = PlayerActor.TraitsImplementing<IFogVisibilityModifier>()
|
||||||
|
.ToArray();
|
||||||
|
|
||||||
// Enable the bot logic on the host
|
// Enable the bot logic on the host
|
||||||
IsBot = botType != null;
|
IsBot = botType != null;
|
||||||
if (IsBot && Game.IsHost)
|
if (IsBot && Game.IsHost)
|
||||||
@@ -149,6 +154,27 @@ namespace OpenRA
|
|||||||
nsc.Trait.StanceChanged(nsc.Actor, this, target, oldStance, s);
|
nsc.Trait.StanceChanged(nsc.Actor, this, target, oldStance, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CanViewActor(Actor a)
|
||||||
|
{
|
||||||
|
if (a.TraitsImplementing<IVisibilityModifier>().Any(t => !t.IsVisible(a, this)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return a.Trait<IDefaultVisibility>().IsVisible(a, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CanTargetActor(Actor a)
|
||||||
|
{
|
||||||
|
if (HasFogVisibility)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (a.TraitsImplementing<IVisibilityModifier>().Any(t => !t.IsVisible(a, this)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return a.Trait<IDefaultVisibility>().IsVisible(a, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool HasFogVisibility { get { return fogVisibilities.Any(f => f.HasFogVisibility(this)); } }
|
||||||
|
|
||||||
#region Scripting interface
|
#region Scripting interface
|
||||||
|
|
||||||
Lazy<ScriptPlayerInterface> luaInterface;
|
Lazy<ScriptPlayerInterface> luaInterface;
|
||||||
|
|||||||
@@ -167,6 +167,8 @@ namespace OpenRA.Traits
|
|||||||
IEnumerable<Pair<CPos, Color>> RadarSignatureCells(Actor self);
|
IEnumerable<Pair<CPos, Color>> RadarSignatureCells(Actor self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface IDefaultVisibilityInfo { }
|
||||||
|
public interface IDefaultVisibility { bool IsVisible(Actor self, Player byPlayer); }
|
||||||
public interface IVisibilityModifier { bool IsVisible(Actor self, Player byPlayer); }
|
public interface IVisibilityModifier { bool IsVisible(Actor self, Player byPlayer); }
|
||||||
public interface IFogVisibilityModifier { bool HasFogVisibility(Player byPlayer); }
|
public interface IFogVisibilityModifier { bool HasFogVisibility(Player byPlayer); }
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ namespace OpenRA.Traits
|
|||||||
readonly CellLayer<short> generatedShroudCount;
|
readonly CellLayer<short> generatedShroudCount;
|
||||||
readonly CellLayer<bool> explored;
|
readonly CellLayer<bool> explored;
|
||||||
|
|
||||||
readonly Lazy<IFogVisibilityModifier[]> fogVisibilities;
|
|
||||||
|
|
||||||
// Cache of visibility that was added, so no matter what crazy trait code does, it
|
// Cache of visibility that was added, so no matter what crazy trait code does, it
|
||||||
// can't make us invalid.
|
// can't make us invalid.
|
||||||
readonly Dictionary<Actor, CPos[]> visibility = new Dictionary<Actor, CPos[]>();
|
readonly Dictionary<Actor, CPos[]> visibility = new Dictionary<Actor, CPos[]>();
|
||||||
@@ -62,8 +60,6 @@ namespace OpenRA.Traits
|
|||||||
self.World.ActorAdded += a => { CPos[] shrouded = null; AddShroudGeneration(a, ref shrouded); };
|
self.World.ActorAdded += a => { CPos[] shrouded = null; AddShroudGeneration(a, ref shrouded); };
|
||||||
self.World.ActorRemoved += RemoveShroudGeneration;
|
self.World.ActorRemoved += RemoveShroudGeneration;
|
||||||
|
|
||||||
fogVisibilities = Exts.Lazy(() => self.TraitsImplementing<IFogVisibilityModifier>().ToArray());
|
|
||||||
|
|
||||||
shroudEdgeTest = map.Contains;
|
shroudEdgeTest = map.Contains;
|
||||||
isExploredTest = IsExploredCore;
|
isExploredTest = IsExploredCore;
|
||||||
isVisibleTest = IsVisibleCore;
|
isVisibleTest = IsVisibleCore;
|
||||||
@@ -342,11 +338,6 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsExplored(Actor a)
|
|
||||||
{
|
|
||||||
return GetVisOrigins(a).Any(IsExplored);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsVisible(WPos pos)
|
public bool IsVisible(WPos pos)
|
||||||
{
|
{
|
||||||
return IsVisible(map.CellContaining(pos));
|
return IsVisible(map.CellContaining(pos));
|
||||||
@@ -394,31 +385,6 @@ namespace OpenRA.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Actors are hidden under shroud, but not under fog by default
|
|
||||||
public bool IsVisible(Actor a)
|
|
||||||
{
|
|
||||||
if (a.TraitsImplementing<IVisibilityModifier>().Any(t => !t.IsVisible(a, self.Owner)))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return a.Owner.IsAlliedWith(self.Owner) || IsExplored(a);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsTargetable(Actor a)
|
|
||||||
{
|
|
||||||
if (HasFogVisibility())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (a.TraitsImplementing<IVisibilityModifier>().Any(t => !t.IsVisible(a, self.Owner)))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return GetVisOrigins(a).Any(IsVisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasFogVisibility()
|
|
||||||
{
|
|
||||||
return fogVisibilities.Value.Any(f => f.HasFogVisibility(self.Owner));
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Contains(MPos uv)
|
public bool Contains(MPos uv)
|
||||||
{
|
{
|
||||||
// Check that uv is inside the map area. There is nothing special
|
// Check that uv is inside the map area. There is nothing special
|
||||||
|
|||||||
@@ -70,12 +70,9 @@ namespace OpenRA
|
|||||||
set { renderPlayer = value; }
|
set { renderPlayer = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool FogObscures(Actor a) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(a); }
|
public bool FogObscures(Actor a) { return RenderPlayer != null && !RenderPlayer.CanViewActor(a); }
|
||||||
public bool FogObscures(CPos p) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(p); }
|
public bool FogObscures(CPos p) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(p); }
|
||||||
public bool FogObscures(WPos pos) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(pos); }
|
public bool FogObscures(WPos pos) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(pos); }
|
||||||
public bool FogObscures(MPos uv) { return RenderPlayer != null && !RenderPlayer.Shroud.IsVisible(uv); }
|
|
||||||
|
|
||||||
public bool ShroudObscures(Actor a) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(a); }
|
|
||||||
public bool ShroudObscures(CPos p) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(p); }
|
public bool ShroudObscures(CPos p) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(p); }
|
||||||
public bool ShroudObscures(WPos pos) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(pos); }
|
public bool ShroudObscures(WPos pos) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(pos); }
|
||||||
public bool ShroudObscures(MPos uv) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(uv); }
|
public bool ShroudObscures(MPos uv) { return RenderPlayer != null && !RenderPlayer.Shroud.IsExplored(uv); }
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
// HACK: This would otherwise break targeting frozen actors
|
// HACK: This would otherwise break targeting frozen actors
|
||||||
// The problem is that Shroud.IsTargetable returns false (as it should) for
|
// The problem is that Shroud.IsTargetable returns false (as it should) for
|
||||||
// frozen actors, but we do want to explicitly target the underlying actor here.
|
// frozen actors, but we do want to explicitly target the underlying actor here.
|
||||||
if (!attack.Info.IgnoresVisibility && type == TargetType.Actor && !Target.Actor.HasTrait<FrozenUnderFog>() && !self.Owner.Shroud.IsTargetable(Target.Actor))
|
if (!attack.Info.IgnoresVisibility && type == TargetType.Actor && !Target.Actor.HasTrait<FrozenUnderFog>() && !self.Owner.CanTargetActor(Target.Actor))
|
||||||
return NextActivity;
|
return NextActivity;
|
||||||
|
|
||||||
// Try to move within range
|
// Try to move within range
|
||||||
|
|||||||
36
OpenRA.Mods.Common/Lint/CheckDefaultVisibility.cs
Normal file
36
OpenRA.Mods.Common/Lint/CheckDefaultVisibility.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.GameRules;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Lint
|
||||||
|
{
|
||||||
|
class CheckDefaultVisibility : ILintPass
|
||||||
|
{
|
||||||
|
public void Run(Action<string> emitError, Action<string> emitWarning, Map map)
|
||||||
|
{
|
||||||
|
foreach (var actorInfo in map.Rules.Actors)
|
||||||
|
{
|
||||||
|
if (actorInfo.Key.StartsWith("^"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
var count = actorInfo.Value.Traits.WithInterface<IDefaultVisibilityInfo>().Count();
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
emitError("Actor type `{0}` does not define a default visibility type!".F(actorInfo.Key));
|
||||||
|
else if (count > 1)
|
||||||
|
emitError("Actor type `{0}` defines multiple default visibility types!".F(actorInfo.Key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -676,6 +676,9 @@
|
|||||||
<Compile Include="Widgets\EditorViewportControllerWidget.cs" />
|
<Compile Include="Widgets\EditorViewportControllerWidget.cs" />
|
||||||
<Compile Include="Traits\World\PaletteFromPaletteWithAlpha.cs" />
|
<Compile Include="Traits\World\PaletteFromPaletteWithAlpha.cs" />
|
||||||
<Compile Include="Traits\World\PaletteFromPlayerPaletteWithAlpha.cs" />
|
<Compile Include="Traits\World\PaletteFromPlayerPaletteWithAlpha.cs" />
|
||||||
|
<Compile Include="Traits\Modifiers\HiddenUnderShroud.cs" />
|
||||||
|
<Compile Include="Lint\CheckDefaultVisibility.cs" />
|
||||||
|
<Compile Include="Traits\Modifiers\AlwaysVisible.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
a.AppearsHostileTo(self) &&
|
a.AppearsHostileTo(self) &&
|
||||||
!a.HasTrait<AutoTargetIgnore>() &&
|
!a.HasTrait<AutoTargetIgnore>() &&
|
||||||
attack.HasAnyValidWeapons(Target.FromActor(a)) &&
|
attack.HasAnyValidWeapons(Target.FromActor(a)) &&
|
||||||
self.Owner.Shroud.IsTargetable(a))
|
self.Owner.CanTargetActor(a))
|
||||||
.ClosestTo(self);
|
.ClosestTo(self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
public override int GetSelectionShares(Actor collector)
|
public override int GetSelectionShares(Actor collector)
|
||||||
{
|
{
|
||||||
// don't ever hide the map for people who have GPS.
|
// don't ever hide the map for people who have GPS.
|
||||||
if (collector.Owner.Shroud.HasFogVisibility())
|
if (collector.Owner.HasFogVisibility)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return base.GetSelectionShares(collector);
|
return base.GetSelectionShares(collector);
|
||||||
|
|||||||
24
OpenRA.Mods.Common/Traits/Modifiers/AlwaysVisible.cs
Normal file
24
OpenRA.Mods.Common/Traits/Modifiers/AlwaysVisible.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Traits
|
||||||
|
{
|
||||||
|
[Desc("The actor is always considered visible for targeting and rendering purposes.")]
|
||||||
|
public class AlwaysVisibleInfo : TraitInfo<AlwaysVisible>, IDefaultVisibilityInfo { }
|
||||||
|
public class AlwaysVisible : IDefaultVisibility
|
||||||
|
{
|
||||||
|
public bool IsVisible(Actor self, Player byPlayer)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,17 +17,21 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")]
|
[Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")]
|
||||||
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>
|
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>, IDefaultVisibilityInfo
|
||||||
{
|
{
|
||||||
public readonly bool StartsRevealed = false;
|
public readonly bool StartsRevealed = false;
|
||||||
|
|
||||||
|
[Desc("Players with these stances can always see the actor.")]
|
||||||
|
public readonly Stance AlwaysVisibleStances = Stance.Ally;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); }
|
public object Create(ActorInitializer init) { return new FrozenUnderFog(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class FrozenUnderFog : IRenderModifier, IVisibilityModifier, ITick, ISync
|
public class FrozenUnderFog : IRenderModifier, IDefaultVisibility, ITick, ISync
|
||||||
{
|
{
|
||||||
[Sync] public int VisibilityHash;
|
[Sync] public int VisibilityHash;
|
||||||
|
|
||||||
|
readonly FrozenUnderFogInfo info;
|
||||||
readonly bool startsRevealed;
|
readonly bool startsRevealed;
|
||||||
readonly MPos[] footprint;
|
readonly MPos[] footprint;
|
||||||
|
|
||||||
@@ -41,6 +45,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public FrozenUnderFog(ActorInitializer init, FrozenUnderFogInfo info)
|
public FrozenUnderFog(ActorInitializer init, FrozenUnderFogInfo info)
|
||||||
{
|
{
|
||||||
|
this.info = info;
|
||||||
|
|
||||||
// Spawned actors (e.g. building husks) shouldn't be revealed
|
// Spawned actors (e.g. building husks) shouldn't be revealed
|
||||||
startsRevealed = info.StartsRevealed && !init.Contains<ParentActorInit>();
|
startsRevealed = info.StartsRevealed && !init.Contains<ParentActorInit>();
|
||||||
var footprintCells = FootprintUtils.Tiles(init.Self).ToList();
|
var footprintCells = FootprintUtils.Tiles(init.Self).ToList();
|
||||||
@@ -54,7 +60,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
public bool IsVisible(Actor self, Player byPlayer)
|
public bool IsVisible(Actor self, Player byPlayer)
|
||||||
{
|
{
|
||||||
return byPlayer == null || visible[byPlayer];
|
if (byPlayer == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
var stance = self.Owner.Stances[byPlayer];
|
||||||
|
return info.AlwaysVisibleStances.HasFlag(stance) || visible[byPlayer];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Tick(Actor self)
|
public void Tick(Actor self)
|
||||||
|
|||||||
@@ -16,18 +16,22 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Common.Traits
|
namespace OpenRA.Mods.Common.Traits
|
||||||
{
|
{
|
||||||
[Desc("The actor stays invisible under fog of war.")]
|
[Desc("The actor stays invisible under fog of war.")]
|
||||||
public class HiddenUnderFogInfo : TraitInfo<HiddenUnderFog> { }
|
public class HiddenUnderFogInfo : HiddenUnderShroudInfo
|
||||||
|
|
||||||
public class HiddenUnderFog : IRenderModifier, IVisibilityModifier
|
|
||||||
{
|
{
|
||||||
public bool IsVisible(Actor self, Player byPlayer)
|
public override object Create(ActorInitializer init) { return new HiddenUnderFog(this); }
|
||||||
{
|
}
|
||||||
return byPlayer == null || Shroud.GetVisOrigins(self).Any(byPlayer.Shroud.IsVisible);
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<IRenderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<IRenderable> r)
|
public class HiddenUnderFog : HiddenUnderShroud
|
||||||
|
{
|
||||||
|
public HiddenUnderFog(HiddenUnderFogInfo info)
|
||||||
|
: base(info) { }
|
||||||
|
|
||||||
|
protected override bool IsVisibleInner(Actor self, Player byPlayer)
|
||||||
{
|
{
|
||||||
return IsVisible(self, self.World.RenderPlayer) ? r : SpriteRenderable.None;
|
if (!VisibilityFootprint(self).Any(byPlayer.Shroud.IsVisible))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return base.IsVisibleInner(self, byPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
60
OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs
Normal file
60
OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2015 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.Common.Traits
|
||||||
|
{
|
||||||
|
[Desc("The actor stays invisible under the shroud.")]
|
||||||
|
public class HiddenUnderShroudInfo : ITraitInfo, IDefaultVisibilityInfo
|
||||||
|
{
|
||||||
|
[Desc("Players with these stances can always see the actor.")]
|
||||||
|
public readonly Stance AlwaysVisibleStances = Stance.Ally;
|
||||||
|
|
||||||
|
public virtual object Create(ActorInitializer init) { return new HiddenUnderShroud(this); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HiddenUnderShroud : IDefaultVisibility, IRenderModifier
|
||||||
|
{
|
||||||
|
readonly HiddenUnderShroudInfo info;
|
||||||
|
|
||||||
|
public HiddenUnderShroud(HiddenUnderShroudInfo info)
|
||||||
|
{
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected IEnumerable<CPos> VisibilityFootprint(Actor self)
|
||||||
|
{
|
||||||
|
return Shroud.GetVisOrigins(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual bool IsVisibleInner(Actor self, Player byPlayer)
|
||||||
|
{
|
||||||
|
return VisibilityFootprint(self).Any(byPlayer.Shroud.IsExplored);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsVisible(Actor self, Player byPlayer)
|
||||||
|
{
|
||||||
|
if (byPlayer == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
var stance = self.Owner.Stances[byPlayer];
|
||||||
|
return info.AlwaysVisibleStances.HasFlag(stance) || IsVisibleInner(self, byPlayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<IRenderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<IRenderable> r)
|
||||||
|
{
|
||||||
|
return IsVisible(self, self.World.RenderPlayer) ? r : SpriteRenderable.None;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// The actor is not currently visible
|
// The actor is not currently visible
|
||||||
if (!self.Owner.Shroud.IsVisible(actor.Actor))
|
if (!self.Owner.CanViewActor(actor.Actor))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
visibleActorIds.Add(actor.Actor.ActorID);
|
visibleActorIds.Add(actor.Actor.ActorID);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.RA.Traits
|
|||||||
public void Infiltrated(Actor self, Actor infiltrator)
|
public void Infiltrated(Actor self, Actor infiltrator)
|
||||||
{
|
{
|
||||||
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
infiltrator.Owner.Shroud.Explore(self.Owner.Shroud);
|
||||||
if (!self.Owner.Shroud.HasFogVisibility())
|
if (!self.Owner.HasFogVisibility)
|
||||||
self.Owner.Shroud.ResetExploration();
|
self.Owner.Shroud.ResetExploration();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ namespace OpenRA.Mods.RA.Traits
|
|||||||
var targetUnits = power.UnitsInRange(xy).Where(a => !world.FogObscures(a));
|
var targetUnits = power.UnitsInRange(xy).Where(a => !world.FogObscures(a));
|
||||||
|
|
||||||
foreach (var unit in targetUnits)
|
foreach (var unit in targetUnits)
|
||||||
if (manager.Self.Owner.Shroud.IsTargetable(unit))
|
if (manager.Self.Owner.CanTargetActor(unit))
|
||||||
yield return new SelectionBoxRenderable(unit, Color.Red);
|
yield return new SelectionBoxRenderable(unit, Color.Red);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ namespace OpenRA.Mods.RA.Traits
|
|||||||
public IEnumerable<IRenderable> RenderAfterWorld(WorldRenderer wr, World world)
|
public IEnumerable<IRenderable> RenderAfterWorld(WorldRenderer wr, World world)
|
||||||
{
|
{
|
||||||
foreach (var unit in power.UnitsInRange(sourceLocation))
|
foreach (var unit in power.UnitsInRange(sourceLocation))
|
||||||
if (manager.Self.Owner.Shroud.IsTargetable(unit))
|
if (manager.Self.Owner.CanTargetActor(unit))
|
||||||
yield return new SelectionBoxRenderable(unit, Color.Red);
|
yield return new SelectionBoxRenderable(unit, Color.Red);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ namespace OpenRA.Mods.RA.Traits
|
|||||||
foreach (var unit in power.UnitsInRange(sourceLocation))
|
foreach (var unit in power.UnitsInRange(sourceLocation))
|
||||||
{
|
{
|
||||||
var offset = world.Map.CenterOfCell(xy) - world.Map.CenterOfCell(sourceLocation);
|
var offset = world.Map.CenterOfCell(xy) - world.Map.CenterOfCell(sourceLocation);
|
||||||
if (manager.Self.Owner.Shroud.IsTargetable(unit))
|
if (manager.Self.Owner.CanTargetActor(unit))
|
||||||
foreach (var r in unit.Render(wr))
|
foreach (var r in unit.Render(wr))
|
||||||
yield return r.OffsetBy(offset);
|
yield return r.OffsetBy(offset);
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ namespace OpenRA.Mods.RA.Traits
|
|||||||
// Unit tiles
|
// Unit tiles
|
||||||
foreach (var unit in power.UnitsInRange(sourceLocation))
|
foreach (var unit in power.UnitsInRange(sourceLocation))
|
||||||
{
|
{
|
||||||
if (manager.Self.Owner.Shroud.IsTargetable(unit))
|
if (manager.Self.Owner.CanTargetActor(unit))
|
||||||
{
|
{
|
||||||
var targetCell = unit.Location + (xy - sourceLocation);
|
var targetCell = unit.Location + (xy - sourceLocation);
|
||||||
var canEnter = manager.Self.Owner.Shroud.IsExplored(targetCell) &&
|
var canEnter = manager.Self.Owner.Shroud.IsExplored(targetCell) &&
|
||||||
|
|||||||
@@ -826,6 +826,7 @@ Rules:
|
|||||||
Description: Provides an overview of the battlefield.\n Requires power to operate.
|
Description: Provides an overview of the battlefield.\n Requires power to operate.
|
||||||
-AirstrikePower:
|
-AirstrikePower:
|
||||||
airstrike.proxy:
|
airstrike.proxy:
|
||||||
|
AlwaysVisible:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Icon: airstrike
|
Icon: airstrike
|
||||||
StartFullyCharged: True
|
StartFullyCharged: True
|
||||||
|
|||||||
@@ -921,6 +921,7 @@ Rules:
|
|||||||
Amount: 500
|
Amount: 500
|
||||||
UseCashTick: yes
|
UseCashTick: yes
|
||||||
airstrike.proxy:
|
airstrike.proxy:
|
||||||
|
AlwaysVisible:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Icon: airstrike
|
Icon: airstrike
|
||||||
StartFullyCharged: True
|
StartFullyCharged: True
|
||||||
|
|||||||
@@ -753,6 +753,7 @@ Rules:
|
|||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: ~disabled
|
Prerequisites: ~disabled
|
||||||
airstrike.proxy:
|
airstrike.proxy:
|
||||||
|
AlwaysVisible:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Icon: airstrike
|
Icon: airstrike
|
||||||
StartFullyCharged: True
|
StartFullyCharged: True
|
||||||
|
|||||||
@@ -162,6 +162,8 @@ C17:
|
|||||||
HP: 25
|
HP: 25
|
||||||
Armor:
|
Armor:
|
||||||
Type: Heavy
|
Type: Heavy
|
||||||
|
HiddenUnderFog:
|
||||||
|
AlwaysVisibleStances: None
|
||||||
WithFacingSpriteBody:
|
WithFacingSpriteBody:
|
||||||
Cargo:
|
Cargo:
|
||||||
MaxWeight: 10
|
MaxWeight: 10
|
||||||
|
|||||||
@@ -367,6 +367,7 @@ BRIDGE4:
|
|||||||
SpawnOffset: 3,2
|
SpawnOffset: 3,2
|
||||||
|
|
||||||
BRIDGEHUT:
|
BRIDGEHUT:
|
||||||
|
HiddenUnderShroud:
|
||||||
Building:
|
Building:
|
||||||
Footprint: __ __
|
Footprint: __ __
|
||||||
Dimensions: 2,2
|
Dimensions: 2,2
|
||||||
|
|||||||
@@ -642,6 +642,7 @@
|
|||||||
-TargetableUnit:
|
-TargetableUnit:
|
||||||
|
|
||||||
^Bridge:
|
^Bridge:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Bridge
|
Name: Bridge
|
||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
@@ -656,6 +657,7 @@
|
|||||||
ScriptTriggers:
|
ScriptTriggers:
|
||||||
|
|
||||||
^Crate:
|
^Crate:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Crate
|
Name: Crate
|
||||||
GenericName: Crate
|
GenericName: Crate
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ CRATE:
|
|||||||
Units: mcv
|
Units: mcv
|
||||||
|
|
||||||
mpspawn:
|
mpspawn:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
@@ -38,6 +39,7 @@ mpspawn:
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
waypoint:
|
waypoint:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
@@ -51,6 +53,7 @@ waypoint:
|
|||||||
Palette: colorpicker
|
Palette: colorpicker
|
||||||
|
|
||||||
CAMERA:
|
CAMERA:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
@@ -60,6 +63,7 @@ CAMERA:
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
CAMERA.small:
|
CAMERA.small:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Player:
|
Player:
|
||||||
|
AlwaysVisible:
|
||||||
PlaceBuilding:
|
PlaceBuilding:
|
||||||
TechTree:
|
TechTree:
|
||||||
SupportPowerManager:
|
SupportPowerManager:
|
||||||
|
|||||||
@@ -938,21 +938,25 @@ BRIK:
|
|||||||
Type: concrete
|
Type: concrete
|
||||||
|
|
||||||
BARRACKS:
|
BARRACKS:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Infantry Production
|
Name: Infantry Production
|
||||||
Description: Infantry Production
|
Description: Infantry Production
|
||||||
|
|
||||||
VEHICLEPRODUCTION:
|
VEHICLEPRODUCTION:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Vehicle Production
|
Name: Vehicle Production
|
||||||
Description: Vehicle Production
|
Description: Vehicle Production
|
||||||
|
|
||||||
ANYPOWER:
|
ANYPOWER:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Power Plant
|
Name: Power Plant
|
||||||
Description: Power Plant
|
Description: Power Plant
|
||||||
|
|
||||||
ANYHQ:
|
ANYHQ:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: a communications center
|
Name: a communications center
|
||||||
Description: a communications center
|
Description: a communications center
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
^BaseWorld:
|
^BaseWorld:
|
||||||
|
AlwaysVisible:
|
||||||
Inherits: ^Palettes
|
Inherits: ^Palettes
|
||||||
ScreenMap:
|
ScreenMap:
|
||||||
ActorMap:
|
ActorMap:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
spicebloom:
|
spicebloom:
|
||||||
|
HiddenUnderShroud:
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
Building:
|
Building:
|
||||||
Footprint: x
|
Footprint: x
|
||||||
|
|||||||
@@ -278,6 +278,7 @@
|
|||||||
TargetTypes: Air
|
TargetTypes: Air
|
||||||
GroundedTargetTypes: Ground
|
GroundedTargetTypes: Ground
|
||||||
HiddenUnderFog:
|
HiddenUnderFog:
|
||||||
|
AlwaysVisibleStances: None
|
||||||
GivesExperience:
|
GivesExperience:
|
||||||
DrawLineToTarget:
|
DrawLineToTarget:
|
||||||
ActorLostNotification:
|
ActorLostNotification:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
crate:
|
crate:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Crate
|
Name: Crate
|
||||||
Crate:
|
Crate:
|
||||||
@@ -114,12 +115,14 @@ crate:
|
|||||||
CustomBounds: 16,16
|
CustomBounds: 16,16
|
||||||
|
|
||||||
mpspawn:
|
mpspawn:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
waypoint:
|
waypoint:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
@@ -136,6 +139,7 @@ waypoint:
|
|||||||
Palette: colorpicker
|
Palette: colorpicker
|
||||||
|
|
||||||
camera:
|
camera:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
@@ -145,6 +149,7 @@ camera:
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
wormspawner:
|
wormspawner:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
@@ -152,6 +157,7 @@ wormspawner:
|
|||||||
WormSpawner:
|
WormSpawner:
|
||||||
|
|
||||||
upgrade.conyard:
|
upgrade.conyard:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Construction Yard Upgrade
|
Name: Construction Yard Upgrade
|
||||||
Description: Unlocks new construction options
|
Description: Unlocks new construction options
|
||||||
@@ -170,6 +176,7 @@ upgrade.conyard:
|
|||||||
ProvidesPrerequisite@upgradename:
|
ProvidesPrerequisite@upgradename:
|
||||||
|
|
||||||
upgrade.barracks:
|
upgrade.barracks:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Barracks Upgrade
|
Name: Barracks Upgrade
|
||||||
Description: Unlocks additional infantry
|
Description: Unlocks additional infantry
|
||||||
@@ -188,6 +195,7 @@ upgrade.barracks:
|
|||||||
ProvidesPrerequisite@upgradename:
|
ProvidesPrerequisite@upgradename:
|
||||||
|
|
||||||
upgrade.light:
|
upgrade.light:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Light Factory Upgrade
|
Name: Light Factory Upgrade
|
||||||
Description: Unlocks additional light units
|
Description: Unlocks additional light units
|
||||||
@@ -206,6 +214,7 @@ upgrade.light:
|
|||||||
ProvidesPrerequisite@upgradename:
|
ProvidesPrerequisite@upgradename:
|
||||||
|
|
||||||
upgrade.heavy:
|
upgrade.heavy:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Heavy Factory Upgrade
|
Name: Heavy Factory Upgrade
|
||||||
Description: Unlocks advanced technology and heavy weapons
|
Description: Unlocks advanced technology and heavy weapons
|
||||||
@@ -225,6 +234,7 @@ upgrade.heavy:
|
|||||||
ProvidesPrerequisite@upgradename:
|
ProvidesPrerequisite@upgradename:
|
||||||
|
|
||||||
upgrade.hightech:
|
upgrade.hightech:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: High Tech Factory Upgrade
|
Name: High Tech Factory Upgrade
|
||||||
Description: Unlocks the Air Strike superweapon
|
Description: Unlocks the Air Strike superweapon
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Player:
|
Player:
|
||||||
|
AlwaysVisible:
|
||||||
TechTree:
|
TechTree:
|
||||||
ClassicProductionQueue@Building:
|
ClassicProductionQueue@Building:
|
||||||
Type: Building
|
Type: Building
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
^concrete:
|
^concrete:
|
||||||
|
AlwaysVisible:
|
||||||
Building:
|
Building:
|
||||||
Adjacent: 4
|
Adjacent: 4
|
||||||
TerrainTypes: Rock
|
TerrainTypes: Rock
|
||||||
@@ -493,6 +494,7 @@ starport:
|
|||||||
VisualBounds: 96,64
|
VisualBounds: 96,64
|
||||||
|
|
||||||
wall:
|
wall:
|
||||||
|
HiddenUnderShroud:
|
||||||
Buildable:
|
Buildable:
|
||||||
Queue: Building
|
Queue: Building
|
||||||
Prerequisites: barracks
|
Prerequisites: barracks
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
^BaseWorld:
|
^BaseWorld:
|
||||||
Inherits: ^Palettes
|
Inherits: ^Palettes
|
||||||
|
AlwaysVisible:
|
||||||
ScreenMap:
|
ScreenMap:
|
||||||
ActorMap:
|
ActorMap:
|
||||||
TerrainGeometryOverlay:
|
TerrainGeometryOverlay:
|
||||||
|
|||||||
@@ -1405,6 +1405,7 @@ Rules:
|
|||||||
RenderSprites:
|
RenderSprites:
|
||||||
Image: E7
|
Image: E7
|
||||||
PRISON:
|
PRISON:
|
||||||
|
HiddenUnderShroud:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|||||||
@@ -1301,6 +1301,7 @@ Rules:
|
|||||||
RenderSprites:
|
RenderSprites:
|
||||||
Image: E7
|
Image: E7
|
||||||
PRISON:
|
PRISON:
|
||||||
|
HiddenUnderShroud:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
@@ -1321,6 +1322,7 @@ Rules:
|
|||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
Range: 40c0
|
Range: 40c0
|
||||||
CAMERA.Jeep:
|
CAMERA.Jeep:
|
||||||
|
AlwaysVisible:
|
||||||
Mobile:
|
Mobile:
|
||||||
TerrainSpeeds:
|
TerrainSpeeds:
|
||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
|
|||||||
@@ -1622,6 +1622,7 @@ Rules:
|
|||||||
Tooltip:
|
Tooltip:
|
||||||
ShowOwnerRow: false
|
ShowOwnerRow: false
|
||||||
Camera.Truk:
|
Camera.Truk:
|
||||||
|
AlwaysVisible:
|
||||||
Mobile:
|
Mobile:
|
||||||
TerrainSpeeds:
|
TerrainSpeeds:
|
||||||
RevealsShroud:
|
RevealsShroud:
|
||||||
@@ -1674,6 +1675,7 @@ Rules:
|
|||||||
CloakDelay: 0
|
CloakDelay: 0
|
||||||
Palette:
|
Palette:
|
||||||
CloakUpgrade:
|
CloakUpgrade:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|||||||
@@ -879,6 +879,7 @@ Rules:
|
|||||||
Power:
|
Power:
|
||||||
Amount: 0
|
Amount: 0
|
||||||
MINVV:
|
MINVV:
|
||||||
|
HiddenUnderFog:
|
||||||
Building:
|
Building:
|
||||||
Adjacent: 99
|
Adjacent: 99
|
||||||
TerrainTypes: Clear,Road
|
TerrainTypes: Clear,Road
|
||||||
|
|||||||
@@ -1329,10 +1329,12 @@ Rules:
|
|||||||
E7:
|
E7:
|
||||||
-AnnounceOnKill:
|
-AnnounceOnKill:
|
||||||
powerproxy.paratroopers:
|
powerproxy.paratroopers:
|
||||||
|
AlwaysVisible:
|
||||||
ParatroopersPower:
|
ParatroopersPower:
|
||||||
DisplayBeacon: false
|
DisplayBeacon: false
|
||||||
DropItems: E1,E1,E2,E3,E4
|
DropItems: E1,E1,E2,E3,E4
|
||||||
powerproxy.parazombies:
|
powerproxy.parazombies:
|
||||||
|
AlwaysVisible:
|
||||||
ParatroopersPower:
|
ParatroopersPower:
|
||||||
DropItems: ZOMBIE,ZOMBIE,ZOMBIE,ZOMBIE,ZOMBIE
|
DropItems: ZOMBIE,ZOMBIE,ZOMBIE,ZOMBIE,ZOMBIE
|
||||||
QuantizedFacings: 8
|
QuantizedFacings: 8
|
||||||
|
|||||||
@@ -2258,6 +2258,7 @@ Rules:
|
|||||||
ProvidesPrerequisite:
|
ProvidesPrerequisite:
|
||||||
Prerequisite: givefix
|
Prerequisite: givefix
|
||||||
MAINLAND:
|
MAINLAND:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Reach the mainland
|
Name: Reach the mainland
|
||||||
ProvidesPrerequisite:
|
ProvidesPrerequisite:
|
||||||
@@ -2269,6 +2270,7 @@ Rules:
|
|||||||
Buildable:
|
Buildable:
|
||||||
Prerequisites: givefix
|
Prerequisites: givefix
|
||||||
GIVEFIX:
|
GIVEFIX:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Weapons Factory or Helipad
|
Name: Weapons Factory or Helipad
|
||||||
MIG:
|
MIG:
|
||||||
|
|||||||
@@ -1059,11 +1059,13 @@ Rules:
|
|||||||
GenericStancePrefix: false
|
GenericStancePrefix: false
|
||||||
ShowOwnerRow: false
|
ShowOwnerRow: false
|
||||||
SovietSquad:
|
SovietSquad:
|
||||||
|
AlwaysVisible:
|
||||||
ParatroopersPower:
|
ParatroopersPower:
|
||||||
DropItems: E1,E1,E2,E4,E4
|
DropItems: E1,E1,E2,E4,E4
|
||||||
QuantizedFacings: 8
|
QuantizedFacings: 8
|
||||||
DisplayBeacon: false
|
DisplayBeacon: false
|
||||||
SovietPlatoonUnits:
|
SovietPlatoonUnits:
|
||||||
|
AlwaysVisible:
|
||||||
ParatroopersPower:
|
ParatroopersPower:
|
||||||
DropItems: E1,E1,E2,E4,E4,E1,E1,E2,E4,E4
|
DropItems: E1,E1,E2,E4,E4,E1,E1,E2,E4,E4
|
||||||
QuantizedFacings: 8
|
QuantizedFacings: 8
|
||||||
|
|||||||
@@ -487,6 +487,7 @@ SBRIDGE4:
|
|||||||
SpawnOffset: 2,1
|
SpawnOffset: 2,1
|
||||||
|
|
||||||
BRIDGEHUT:
|
BRIDGEHUT:
|
||||||
|
HiddenUnderShroud:
|
||||||
Building:
|
Building:
|
||||||
Footprint: __ __
|
Footprint: __ __
|
||||||
Dimensions: 2,2
|
Dimensions: 2,2
|
||||||
@@ -497,6 +498,7 @@ BRIDGEHUT:
|
|||||||
TargetTypes: BridgeHut, C4
|
TargetTypes: BridgeHut, C4
|
||||||
|
|
||||||
BRIDGEHUT.small:
|
BRIDGEHUT.small:
|
||||||
|
HiddenUnderShroud:
|
||||||
Building:
|
Building:
|
||||||
Footprint: _
|
Footprint: _
|
||||||
Dimensions: 1,1
|
Dimensions: 1,1
|
||||||
|
|||||||
@@ -604,6 +604,7 @@
|
|||||||
-TransformOnCapture:
|
-TransformOnCapture:
|
||||||
|
|
||||||
^Bridge:
|
^Bridge:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Bridge
|
Name: Bridge
|
||||||
TargetableBuilding:
|
TargetableBuilding:
|
||||||
@@ -653,6 +654,7 @@
|
|||||||
RequireTilesets: DESERT
|
RequireTilesets: DESERT
|
||||||
|
|
||||||
^Crate:
|
^Crate:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Crate
|
Name: Crate
|
||||||
GenericName: Crate
|
GenericName: Crate
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
MINP:
|
MINP:
|
||||||
|
HiddenUnderShroud:
|
||||||
Mine:
|
Mine:
|
||||||
CrushClasses: mine
|
CrushClasses: mine
|
||||||
DetonateClasses: mine
|
DetonateClasses: mine
|
||||||
@@ -27,6 +28,7 @@ MINP:
|
|||||||
OccupiesSpace: true
|
OccupiesSpace: true
|
||||||
|
|
||||||
MINV:
|
MINV:
|
||||||
|
HiddenUnderShroud:
|
||||||
Mine:
|
Mine:
|
||||||
CrushClasses: mine
|
CrushClasses: mine
|
||||||
DetonateClasses: mine
|
DetonateClasses: mine
|
||||||
@@ -165,6 +167,7 @@ HEALCRATE:
|
|||||||
Effect: heal
|
Effect: heal
|
||||||
|
|
||||||
CAMERA:
|
CAMERA:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
@@ -180,6 +183,7 @@ CAMERA:
|
|||||||
Image: camera
|
Image: camera
|
||||||
|
|
||||||
camera.paradrop:
|
camera.paradrop:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
@@ -191,6 +195,7 @@ camera.paradrop:
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
SONAR:
|
SONAR:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
@@ -220,6 +225,7 @@ FLARE:
|
|||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
MINE:
|
MINE:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Ore Mine
|
Name: Ore Mine
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
@@ -238,6 +244,7 @@ MINE:
|
|||||||
SeedsResource:
|
SeedsResource:
|
||||||
|
|
||||||
GMINE:
|
GMINE:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Gem Mine
|
Name: Gem Mine
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
@@ -257,6 +264,7 @@ GMINE:
|
|||||||
ResourceType: Gems
|
ResourceType: Gems
|
||||||
|
|
||||||
RAILMINE:
|
RAILMINE:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Abandoned Mine
|
Name: Abandoned Mine
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
@@ -273,6 +281,7 @@ RAILMINE:
|
|||||||
ExcludeTilesets: INTERIOR
|
ExcludeTilesets: INTERIOR
|
||||||
|
|
||||||
QUEE:
|
QUEE:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Queen Ant
|
Name: Queen Ant
|
||||||
Building:
|
Building:
|
||||||
@@ -288,6 +297,7 @@ QUEE:
|
|||||||
UseTerrainPalette: true
|
UseTerrainPalette: true
|
||||||
|
|
||||||
LAR1:
|
LAR1:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Ant Larva
|
Name: Ant Larva
|
||||||
Building:
|
Building:
|
||||||
@@ -304,6 +314,7 @@ LAR1:
|
|||||||
UseTerrainPalette: true
|
UseTerrainPalette: true
|
||||||
|
|
||||||
LAR2:
|
LAR2:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Ant Larvae
|
Name: Ant Larvae
|
||||||
Building:
|
Building:
|
||||||
@@ -320,6 +331,7 @@ LAR2:
|
|||||||
UseTerrainPalette: true
|
UseTerrainPalette: true
|
||||||
|
|
||||||
powerproxy.parabombs:
|
powerproxy.parabombs:
|
||||||
|
AlwaysVisible:
|
||||||
AirstrikePower:
|
AirstrikePower:
|
||||||
Icon: parabombs
|
Icon: parabombs
|
||||||
Description: Parabombs (Single Use)
|
Description: Parabombs (Single Use)
|
||||||
@@ -334,6 +346,7 @@ powerproxy.parabombs:
|
|||||||
CameraActor: camera
|
CameraActor: camera
|
||||||
|
|
||||||
powerproxy.sonarpulse:
|
powerproxy.sonarpulse:
|
||||||
|
AlwaysVisible:
|
||||||
SpawnActorPower:
|
SpawnActorPower:
|
||||||
Icon: sonar
|
Icon: sonar
|
||||||
Description: Sonar Pulse
|
Description: Sonar Pulse
|
||||||
@@ -348,6 +361,7 @@ powerproxy.sonarpulse:
|
|||||||
EffectPalette: moveflash
|
EffectPalette: moveflash
|
||||||
|
|
||||||
powerproxy.paratroopers:
|
powerproxy.paratroopers:
|
||||||
|
AlwaysVisible:
|
||||||
ParatroopersPower:
|
ParatroopersPower:
|
||||||
Icon: paratroopers
|
Icon: paratroopers
|
||||||
Description: Paratroopers
|
Description: Paratroopers
|
||||||
@@ -361,12 +375,14 @@ powerproxy.paratroopers:
|
|||||||
BeaconPoster: pinficon
|
BeaconPoster: pinficon
|
||||||
|
|
||||||
mpspawn:
|
mpspawn:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
waypoint:
|
waypoint:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Player:
|
Player:
|
||||||
|
AlwaysVisible:
|
||||||
TechTree:
|
TechTree:
|
||||||
ClassicProductionQueue@Building:
|
ClassicProductionQueue@Building:
|
||||||
Type: Building
|
Type: Building
|
||||||
|
|||||||
@@ -1617,16 +1617,19 @@ WOOD:
|
|||||||
Type: woodfence
|
Type: woodfence
|
||||||
|
|
||||||
BARRACKS:
|
BARRACKS:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Infantry Production
|
Name: Infantry Production
|
||||||
Description: Infantry Production
|
Description: Infantry Production
|
||||||
|
|
||||||
TECHCENTER:
|
TECHCENTER:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Tech Center
|
Name: Tech Center
|
||||||
Description: Tech Center
|
Description: Tech Center
|
||||||
|
|
||||||
ANYPOWER:
|
ANYPOWER:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Power Plant
|
Name: Power Plant
|
||||||
Description: Power Plant
|
Description: Power Plant
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
^BaseWorld:
|
^BaseWorld:
|
||||||
Inherits: ^Palettes
|
Inherits: ^Palettes
|
||||||
|
AlwaysVisible:
|
||||||
ActorMap:
|
ActorMap:
|
||||||
ScreenMap:
|
ScreenMap:
|
||||||
TerrainGeometryOverlay:
|
TerrainGeometryOverlay:
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
RequireTilesets: TEMPERAT
|
RequireTilesets: TEMPERAT
|
||||||
|
|
||||||
^Crate:
|
^Crate:
|
||||||
|
HiddenUnderShroud:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Crate
|
Name: Crate
|
||||||
Crate:
|
Crate:
|
||||||
@@ -140,6 +141,7 @@
|
|||||||
CustomBounds: 24,24
|
CustomBounds: 24,24
|
||||||
|
|
||||||
^Wall:
|
^Wall:
|
||||||
|
HiddenUnderShroud:
|
||||||
AppearsOnRadar:
|
AppearsOnRadar:
|
||||||
Building:
|
Building:
|
||||||
Dimensions: 1,1
|
Dimensions: 1,1
|
||||||
@@ -184,6 +186,7 @@
|
|||||||
MustBeDestroyed:
|
MustBeDestroyed:
|
||||||
|
|
||||||
^BuildingPlug:
|
^BuildingPlug:
|
||||||
|
AlwaysVisible:
|
||||||
Building:
|
Building:
|
||||||
BuildSounds: place2.aud
|
BuildSounds: place2.aud
|
||||||
KillsSelf:
|
KillsSelf:
|
||||||
@@ -534,6 +537,7 @@
|
|||||||
WithActiveAnimation:
|
WithActiveAnimation:
|
||||||
|
|
||||||
^Tree:
|
^Tree:
|
||||||
|
HiddenUnderShroud:
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
Palette: terrain
|
Palette: terrain
|
||||||
Building:
|
Building:
|
||||||
@@ -545,6 +549,7 @@
|
|||||||
Name: Tree
|
Name: Tree
|
||||||
|
|
||||||
^Rock:
|
^Rock:
|
||||||
|
HiddenUnderShroud:
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
Palette: terrain
|
Palette: terrain
|
||||||
Building:
|
Building:
|
||||||
@@ -556,6 +561,7 @@
|
|||||||
Name: Rock
|
Name: Rock
|
||||||
|
|
||||||
^Veinhole:
|
^Veinhole:
|
||||||
|
HiddenUnderShroud:
|
||||||
RadarColorFromTerrain:
|
RadarColorFromTerrain:
|
||||||
Terrain: Tiberium
|
Terrain: Tiberium
|
||||||
RenderBuilding:
|
RenderBuilding:
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
mpspawn:
|
mpspawn:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
BodyOrientation:
|
BodyOrientation:
|
||||||
|
|
||||||
waypoint:
|
waypoint:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
RenderEditorOnly:
|
RenderEditorOnly:
|
||||||
@@ -26,6 +28,7 @@ waypoint:
|
|||||||
Palette: colorpicker
|
Palette: colorpicker
|
||||||
|
|
||||||
CAMERA:
|
CAMERA:
|
||||||
|
AlwaysVisible:
|
||||||
Immobile:
|
Immobile:
|
||||||
OccupiesSpace: false
|
OccupiesSpace: false
|
||||||
Health:
|
Health:
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Player:
|
Player:
|
||||||
|
AlwaysVisible:
|
||||||
TechTree:
|
TechTree:
|
||||||
ClassicProductionQueue@Building:
|
ClassicProductionQueue@Building:
|
||||||
Type: Building
|
Type: Building
|
||||||
|
|||||||
@@ -137,26 +137,31 @@ GASILO:
|
|||||||
VisualBounds: 80, 48, -5, 0
|
VisualBounds: 80, 48, -5, 0
|
||||||
|
|
||||||
ANYPOWER:
|
ANYPOWER:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Power Plant
|
Name: Power Plant
|
||||||
Description: Power Plant
|
Description: Power Plant
|
||||||
|
|
||||||
BARRACKS:
|
BARRACKS:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Infantry Production
|
Name: Infantry Production
|
||||||
Description: Infantry Production
|
Description: Infantry Production
|
||||||
|
|
||||||
FACTORY:
|
FACTORY:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Vehicle Production
|
Name: Vehicle Production
|
||||||
Description: Vehicle Production
|
Description: Vehicle Production
|
||||||
|
|
||||||
RADAR:
|
RADAR:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Radar
|
Name: Radar
|
||||||
Description: Radar
|
Description: Radar
|
||||||
|
|
||||||
TECH:
|
TECH:
|
||||||
|
AlwaysVisible:
|
||||||
Tooltip:
|
Tooltip:
|
||||||
Name: Tech Center
|
Name: Tech Center
|
||||||
Description: Tech Center
|
Description: Tech Center
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
^BaseWorld:
|
^BaseWorld:
|
||||||
Inherits: ^Palettes
|
Inherits: ^Palettes
|
||||||
|
AlwaysVisible:
|
||||||
ScreenMap:
|
ScreenMap:
|
||||||
ActorMap:
|
ActorMap:
|
||||||
LoadWidgetAtGameStart:
|
LoadWidgetAtGameStart:
|
||||||
|
|||||||
Reference in New Issue
Block a user