Replace IsDisabled checks in production with IsTraitPaused/Disabled checks

Note: We might want to separate IsTraitDisabled checks later (possibly make the latter cancel the currently produced item), but that can be done in a follow-up.
This commit is contained in:
reaperrr
2017-11-19 17:45:44 +01:00
committed by Paul Chote
parent 3aa8b3ae29
commit 383840135f
9 changed files with 93 additions and 34 deletions

View File

@@ -45,6 +45,9 @@ namespace OpenRA.Mods.Common.Traits
public override bool Produce(Actor self, ActorInfo producee, string productionType, TypeDictionary inits)
{
if (IsTraitDisabled || IsTraitPaused)
return false;
var owner = self.Owner;
var exit = SelectExit(self, producee, productionType);