Remove hardcoded default carryable conditions.

This commit is contained in:
Paul Chote
2016-12-01 20:48:24 +00:00
parent 02e7b1ebfb
commit fe8f2acd62
2 changed files with 5 additions and 4 deletions

View File

@@ -19,11 +19,11 @@ namespace OpenRA.Mods.Common.Traits
{
[UpgradeGrantedReference]
[Desc("The condition to grant to self while a carryall has been reserved.")]
public readonly string ReservedCondition = "carryall-reserved";
public readonly string ReservedCondition = null;
[UpgradeGrantedReference]
[Desc("The condition to grant to self while being carried.")]
public readonly string CarriedCondition = "carried";
public readonly string CarriedCondition = null;
[Desc("Carryall attachment point relative to body.")]
public readonly WVec LocalOffset = WVec.Zero;
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
attached = true;
if (carriedToken == UpgradeManager.InvalidConditionToken)
if (carriedToken == UpgradeManager.InvalidConditionToken && !string.IsNullOrEmpty(Info.CarriedCondition))
carriedToken = upgradeManager.GrantCondition(self, Info.CarriedCondition);
}
@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Traits
state = State.Reserved;
Carrier = carrier;
if (reservedToken == UpgradeManager.InvalidConditionToken)
if (reservedToken == UpgradeManager.InvalidConditionToken && !string.IsNullOrEmpty(Info.ReservedCondition))
reservedToken = upgradeManager.GrantCondition(self, Info.ReservedCondition);
return true;