check name for Actor.GrantCondition()
This commit is contained in:
@@ -323,7 +323,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void OnDeployCompleted()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Info.DeployedCondition) && deployedToken == Actor.InvalidConditionToken)
|
||||
if (deployedToken == Actor.InvalidConditionToken)
|
||||
deployedToken = self.GrantCondition(Info.DeployedCondition);
|
||||
|
||||
deployState = DeployState.Deployed;
|
||||
@@ -339,7 +339,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void OnUndeployCompleted()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Info.UndeployedCondition) && undeployedToken == Actor.InvalidConditionToken)
|
||||
if (undeployedToken == Actor.InvalidConditionToken)
|
||||
undeployedToken = self.GrantCondition(Info.UndeployedCondition);
|
||||
|
||||
deployState = DeployState.Undeployed;
|
||||
|
||||
@@ -40,10 +40,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void INotifyCreated.Created(Actor self)
|
||||
{
|
||||
if (direction != info.Direction)
|
||||
return;
|
||||
|
||||
if (!string.IsNullOrEmpty(info.Condition))
|
||||
if (direction == info.Direction)
|
||||
self.GrantCondition(info.Condition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user