Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types
This commit is contained in:
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
public Sell(Actor self)
|
||||
{
|
||||
health = self.TraitOrDefault<Health>();
|
||||
sellableInfo = self.Info.Traits.Get<SellableInfo>();
|
||||
sellableInfo = self.Info.TraitInfo<SellableInfo>();
|
||||
playerResources = self.Owner.PlayerActor.Trait<PlayerResources>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user