Make Cargo and Carryall conditional.
This commit is contained in:
committed by
Gustas
parent
a14cc8cc4d
commit
98896f9a75
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
// Make sure we can still enter the transport
|
||||
// (but not before, because this may stop the actor in the middle of nowhere)
|
||||
if (enterCargo == null || !passenger.Reserve(self, enterCargo))
|
||||
if (enterCargo == null || enterCargo.IsTraitDisabled || !passenger.Reserve(self, enterCargo))
|
||||
{
|
||||
Cancel(self, true);
|
||||
return false;
|
||||
@@ -49,6 +49,12 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void TickInner(Actor self, in Target target, bool targetIsDeadOrHiddenActor)
|
||||
{
|
||||
if (enterCargo != null && enterCargo.IsTraitDisabled)
|
||||
Cancel(self, true);
|
||||
}
|
||||
|
||||
protected override void OnEnterComplete(Actor self, Actor targetActor)
|
||||
{
|
||||
self.World.AddFrameEndTask(w =>
|
||||
|
||||
Reference in New Issue
Block a user