783 fixed -- mines are visible to spec and allies now
This commit is contained in:
@@ -14,9 +14,9 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class InvisibleToOthersInfo : TraitInfo<InvisibleToOthers> { }
|
||||
class InvisibleToEnemyInfo : TraitInfo<InvisibleToEnemy> { }
|
||||
|
||||
class InvisibleToOthers : IRenderModifier, IVisibilityModifier, IRadarColorModifier
|
||||
class InvisibleToEnemy : IRenderModifier, IVisibilityModifier, IRadarColorModifier
|
||||
{
|
||||
public bool IsVisible(Actor self)
|
||||
{
|
||||
@@ -25,13 +25,14 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public Color RadarColorOverride(Actor self)
|
||||
{
|
||||
// todo: why is making this half-opaque conflated with hiding the actor from non-allies?
|
||||
return Color.FromArgb(128, self.Owner.ColorRamp.GetColor(0));
|
||||
}
|
||||
|
||||
static readonly Renderable[] Nothing = { };
|
||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||
{
|
||||
return self.World.LocalPlayer == self.Owner
|
||||
return self.World.LocalPlayer == null || self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally
|
||||
? r : Nothing;
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,6 @@
|
||||
<Compile Include="FreeActor.cs" />
|
||||
<Compile Include="Air\Helicopter.cs" />
|
||||
<Compile Include="Husk.cs" />
|
||||
<Compile Include="InvisibleToOthers.cs" />
|
||||
<Compile Include="LeavesHusk.cs" />
|
||||
<Compile Include="LightPaletteRotator.cs" />
|
||||
<Compile Include="OreRefinery.cs" />
|
||||
@@ -346,6 +345,7 @@
|
||||
<Compile Include="Sellable.cs" />
|
||||
<Compile Include="Captures.cs" />
|
||||
<Compile Include="Activities\CaptureActor.cs" />
|
||||
<Compile Include="InvisibleToEnemy.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -207,7 +207,7 @@ MINP:
|
||||
HP: 1
|
||||
RenderUnit:
|
||||
BelowUnits:
|
||||
InvisibleToOthers:
|
||||
InvisibleToEnemy:
|
||||
Tooltip:
|
||||
Name: Anti-Personnel Mine
|
||||
ProximityCaptor:
|
||||
@@ -222,7 +222,7 @@ MINV:
|
||||
HP: 1
|
||||
RenderUnit:
|
||||
BelowUnits:
|
||||
InvisibleToOthers:
|
||||
InvisibleToEnemy:
|
||||
Tooltip:
|
||||
Name: Anti-Tank Mine
|
||||
ProximityCaptor:
|
||||
|
||||
Reference in New Issue
Block a user