Remove IFogVisibilityModifier.
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.Mods.Cnc.Effects;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
@@ -26,7 +24,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
interface IOnGpsRefreshed { void OnGpsRefresh(Actor self, Player player); }
|
||||
|
||||
class GpsWatcher : ISync, IFogVisibilityModifier
|
||||
class GpsWatcher : ISync, IPreventsShroudReset
|
||||
{
|
||||
[Sync] public bool Launched { get; private set; }
|
||||
[Sync] public bool GrantedAllies { get; private set; }
|
||||
@@ -92,20 +90,11 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
tp.Trait.OnGpsRefresh(tp.Actor, owner);
|
||||
}
|
||||
|
||||
public bool HasFogVisibility()
|
||||
bool IPreventsShroudReset.PreventShroudReset(Actor self)
|
||||
{
|
||||
return Granted || GrantedAllies;
|
||||
}
|
||||
|
||||
public bool IsVisible(Actor actor)
|
||||
{
|
||||
var gpsDot = actor.TraitOrDefault<GpsDot>();
|
||||
if (gpsDot == null)
|
||||
return false;
|
||||
|
||||
return gpsDot.IsDotVisible(owner);
|
||||
}
|
||||
|
||||
public void RegisterForOnGpsRefreshed(Actor actor, IOnGpsRefreshed toBeNotified)
|
||||
{
|
||||
notifyOnRefresh.Add(new TraitPair<IOnGpsRefreshed>(actor, toBeNotified));
|
||||
|
||||
Reference in New Issue
Block a user