Remove hardcoded default carryable conditions.
This commit is contained in:
@@ -19,11 +19,11 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
[UpgradeGrantedReference]
|
[UpgradeGrantedReference]
|
||||||
[Desc("The condition to grant to self while a carryall has been reserved.")]
|
[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]
|
[UpgradeGrantedReference]
|
||||||
[Desc("The condition to grant to self while being carried.")]
|
[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.")]
|
[Desc("Carryall attachment point relative to body.")]
|
||||||
public readonly WVec LocalOffset = WVec.Zero;
|
public readonly WVec LocalOffset = WVec.Zero;
|
||||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
attached = true;
|
attached = true;
|
||||||
|
|
||||||
if (carriedToken == UpgradeManager.InvalidConditionToken)
|
if (carriedToken == UpgradeManager.InvalidConditionToken && !string.IsNullOrEmpty(Info.CarriedCondition))
|
||||||
carriedToken = upgradeManager.GrantCondition(self, Info.CarriedCondition);
|
carriedToken = upgradeManager.GrantCondition(self, Info.CarriedCondition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
state = State.Reserved;
|
state = State.Reserved;
|
||||||
Carrier = carrier;
|
Carrier = carrier;
|
||||||
|
|
||||||
if (reservedToken == UpgradeManager.InvalidConditionToken)
|
if (reservedToken == UpgradeManager.InvalidConditionToken && !string.IsNullOrEmpty(Info.ReservedCondition))
|
||||||
reservedToken = upgradeManager.GrantCondition(self, Info.ReservedCondition);
|
reservedToken = upgradeManager.GrantCondition(self, Info.ReservedCondition);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -160,6 +160,7 @@
|
|||||||
VoiceSet: VehicleVoice
|
VoiceSet: VehicleVoice
|
||||||
AutoCarryable:
|
AutoCarryable:
|
||||||
CarriedCondition: notmobile
|
CarriedCondition: notmobile
|
||||||
|
ReservedCondition: carryall-reserved
|
||||||
WithDecoration@CARRYALL:
|
WithDecoration@CARRYALL:
|
||||||
Image: pips
|
Image: pips
|
||||||
Sequence: pickup-indicator
|
Sequence: pickup-indicator
|
||||||
|
|||||||
Reference in New Issue
Block a user