Fixed ProductionQueue freezing Transform

This commit is contained in:
huwpascoe
2014-10-16 03:07:49 +01:00
parent 19c1f4ca99
commit 56551c29c4
2 changed files with 10 additions and 5 deletions

View File

@@ -55,6 +55,9 @@ namespace OpenRA.Mods.RA
{
if (x.Actor.Owner == self.Owner && x.Trait.Info.Produces.Contains(Info.Type))
{
var b = x.Actor.TraitOrDefault<Building>();
if (b != null && b.Locked)
continue;
isActive = true;
break;
}

View File

@@ -145,12 +145,12 @@ namespace OpenRA.Mods.RA
newOwner.PlayerActor.Trait<TechTree>().Update();
}
public void Killed(Actor killed, AttackInfo e) { if (killed == self) ClearQueue(); }
public void Selling(Actor self) { }
public void Sold(Actor self) { ClearQueue(); }
public void Killed(Actor killed, AttackInfo e) { if (killed == self) { ClearQueue(); Enabled = false; } }
public void Selling(Actor self) { ClearQueue(); Enabled = false; }
public void Sold(Actor self) { }
public void BeforeTransform(Actor self) { }
public void OnTransform(Actor self) { ClearQueue(); }
public void BeforeTransform(Actor self) { ClearQueue(); Enabled = false; }
public void OnTransform(Actor self) { }
public void AfterTransform(Actor self) { }
void CacheProduceables(Actor playerActor)
@@ -225,6 +225,8 @@ namespace OpenRA.Mods.RA
public virtual IEnumerable<ActorInfo> BuildableItems()
{
if (!Enabled)
return Enumerable.Empty<ActorInfo>();
if (self.World.AllowDevCommands && developerMode.AllTech)
return produceable.Select(a => a.Key);