Merge pull request #3009 from ScottNZ/mtm-shroud
Fixes a couple of shroud issues
This commit is contained in:
@@ -48,13 +48,7 @@ namespace OpenRA.Traits
|
|||||||
get { return Disabled ? null : exploredBounds; }
|
get { return Disabled ? null : exploredBounds; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public event Action Dirty = () => { };
|
public Action Dirty = () => { };
|
||||||
|
|
||||||
public void Jank()
|
|
||||||
{
|
|
||||||
Dirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Shroud(World world)
|
public Shroud(World world)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -281,13 +281,23 @@ namespace OpenRA.Mods.RA.Missions
|
|||||||
void OnSuperTankDomeInfiltrated(Actor spy)
|
void OnSuperTankDomeInfiltrated(Actor spy)
|
||||||
{
|
{
|
||||||
if (superTankDomeInfiltratedTick != -1) return;
|
if (superTankDomeInfiltratedTick != -1) return;
|
||||||
|
|
||||||
superTankDome.QueueActivity(new Transform(superTankDome, "dome") { SkipMakeAnims = true });
|
superTankDome.QueueActivity(new Transform(superTankDome, "dome") { SkipMakeAnims = true });
|
||||||
turkey.Stances[greece] = turkey.Stances[neutral] = Stance.Ally;
|
|
||||||
greece.Stances[turkey] = neutral.Stances[turkey] = Stance.Ally;
|
world.AddFrameEndTask(_ =>
|
||||||
greece.Shroud.ExploreAll(world);
|
{
|
||||||
|
superTanks.Do(world.Remove);
|
||||||
|
turkey.Stances[greece] = turkey.Stances[neutral] = Stance.Ally;
|
||||||
|
greece.Stances[turkey] = neutral.Stances[turkey] = Stance.Ally;
|
||||||
|
greece.Shroud.ExploreAll(world);
|
||||||
|
superTanks.Do(world.Add);
|
||||||
|
});
|
||||||
|
|
||||||
foreach (var tank in superTanks.Where(t => !t.IsDead() && t.IsInWorld))
|
foreach (var tank in superTanks.Where(t => !t.IsDead() && t.IsInWorld))
|
||||||
MissionUtils.AttackNearestLandActor(false, tank, ussr);
|
MissionUtils.AttackNearestLandActor(false, tank, ussr);
|
||||||
|
|
||||||
superTankDomeInfiltratedTick = world.FrameNumber;
|
superTankDomeInfiltratedTick = world.FrameNumber;
|
||||||
|
|
||||||
objectives[InfiltrateRadarDomeID].Status = ObjectiveStatus.Completed;
|
objectives[InfiltrateRadarDomeID].Status = ObjectiveStatus.Completed;
|
||||||
OnObjectivesUpdated(true);
|
OnObjectivesUpdated(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var views = world.Players.Where(p => !p.NonCombatant).ToDictionary(p => p.PlayerName,
|
var views = world.Players.Where(p => !p.NonCombatant).ToDictionary(p => p.PlayerName,
|
||||||
p => new CameraOption("{0}'s view".F(p.PlayerName),
|
p => new CameraOption("{0}'s view".F(p.PlayerName),
|
||||||
() => world.RenderedPlayer == p,
|
() => world.RenderedPlayer == p,
|
||||||
() => { world.RenderedPlayer = p; world.RenderedShroud.Jank(); }
|
() => { world.RenderedPlayer = p; world.RenderedShroud.Dirty(); }
|
||||||
));
|
));
|
||||||
views.Add("", new CameraOption("World view",
|
views.Add("", new CameraOption("World view",
|
||||||
() => world.RenderedPlayer == null,
|
() => world.RenderedPlayer == null,
|
||||||
() => { world.RenderedPlayer = null; world.RenderedShroud.Jank(); }
|
() => { world.RenderedPlayer = null; world.RenderedShroud.Dirty(); }
|
||||||
));
|
));
|
||||||
|
|
||||||
var shroudSelector = widget.Get<DropDownButtonWidget>("SHROUD_SELECTOR");
|
var shroudSelector = widget.Get<DropDownButtonWidget>("SHROUD_SELECTOR");
|
||||||
|
|||||||
Reference in New Issue
Block a user