Remove building lock from Production.

This commit is contained in:
Paul Chote
2018-10-28 12:55:57 +00:00
committed by abcdefg30
parent 7bc53dd266
commit e57087cb5b
2 changed files with 8 additions and 10 deletions

View File

@@ -34,8 +34,6 @@ namespace OpenRA.Mods.Common.Traits
public string Faction { get; private set; }
Building building;
public Production(ActorInitializer init, ProductionInfo info)
: base(info)
{
@@ -43,11 +41,6 @@ namespace OpenRA.Mods.Common.Traits
Faction = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : init.Self.Owner.Faction.InternalName;
}
void INotifyCreated.Created(Actor self)
{
building = self.TraitOrDefault<Building>();
}
public virtual void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo, string productionType, TypeDictionary inits)
{
var exit = CPos.Zero;
@@ -131,7 +124,7 @@ namespace OpenRA.Mods.Common.Traits
public virtual bool Produce(Actor self, ActorInfo producee, string productionType, TypeDictionary inits)
{
if (IsTraitDisabled || IsTraitPaused || Reservable.IsReserved(self) || (building != null && building.Locked))
if (IsTraitDisabled || IsTraitPaused || Reservable.IsReserved(self))
return false;
// Pick a spawn/exit point pair