Cargo improvements
This commit is contained in:
committed by
Oliver Brakmann
parent
30de4df749
commit
a46ec5d930
@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public object Create(ActorInitializer init) { return new Passenger(this); }
|
||||
}
|
||||
|
||||
public class Passenger : INotifyCreated, IIssueOrder, IResolveOrder, IOrderVoice, INotifyRemovedFromWorld, INotifyEnteredCargo, INotifyExitedCargo
|
||||
public class Passenger : INotifyCreated, IIssueOrder, IResolveOrder, IOrderVoice, INotifyRemovedFromWorld, INotifyEnteredCargo, INotifyExitedCargo, INotifyKilled
|
||||
{
|
||||
public readonly PassengerInfo Info;
|
||||
public Actor Transport;
|
||||
@@ -183,5 +183,13 @@ namespace OpenRA.Mods.Common.Traits
|
||||
ReservedCargo.UnreserveSpace(self);
|
||||
ReservedCargo = null;
|
||||
}
|
||||
|
||||
void INotifyKilled.Killed(Actor self, AttackInfo e)
|
||||
{
|
||||
if (Transport == null)
|
||||
return;
|
||||
|
||||
Transport.Trait<Cargo>().Unload(Transport, self);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user