Compare commits
1 Commits
playtest-2
...
playtest-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21c7501e70 |
@@ -52,7 +52,11 @@ namespace OpenRA
|
||||
|
||||
public IEnumerable<Actor> Actors { get { return actors; } }
|
||||
public void Clear() { actors = new List<Actor>(); }
|
||||
|
||||
public void Remove(Actor a)
|
||||
{
|
||||
actors.Remove(a);
|
||||
}
|
||||
|
||||
public void Tick(World world)
|
||||
{
|
||||
actors.RemoveAll(a => !a.IsInWorld);
|
||||
|
||||
@@ -136,6 +136,9 @@ namespace OpenRA
|
||||
public void Remove(Actor a)
|
||||
{
|
||||
a.IsInWorld = false;
|
||||
if (Selection.Contains(a))
|
||||
Selection.Remove(a);
|
||||
|
||||
actors.Remove(a);
|
||||
ActorRemoved(a);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
public void SelectionChanged()
|
||||
{
|
||||
// Queue-per-structure
|
||||
var perqueue = world.Selection.Actors.FirstOrDefault(
|
||||
a => a.IsInWorld && a.World.LocalPlayer == a.Owner && a.HasTrait<ProductionQueue>());
|
||||
var perqueue = world.Selection.Actors.FirstOrDefault(a =>
|
||||
a.World.LocalPlayer == a.Owner && a.HasTrait<ProductionQueue>());
|
||||
|
||||
if (perqueue != null)
|
||||
{
|
||||
@@ -42,8 +42,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
}
|
||||
|
||||
// Queue-per-player
|
||||
var types = world.Selection.Actors.Where(a => a.IsInWorld)
|
||||
.SelectMany(a => a.TraitsImplementing<Production>())
|
||||
var types = world.Selection.Actors.SelectMany(a => a.TraitsImplementing<Production>())
|
||||
.SelectMany(t => t.Info.Produces)
|
||||
.Distinct();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user