Use expression body syntax

This commit is contained in:
teinarss
2021-02-25 20:52:13 +01:00
committed by Paul Chote
parent 555c43843b
commit 4a1e4f3e16
403 changed files with 1342 additions and 2031 deletions

View File

@@ -29,13 +29,7 @@ namespace OpenRA.Mods.Common.Traits
{
readonly Actor self;
public Player Owner
{
get
{
return self.EffectiveOwner != null ? self.EffectiveOwner.Owner : self.Owner;
}
}
public Player Owner => self.EffectiveOwner != null ? self.EffectiveOwner.Owner : self.Owner;
public TooltipDescription(Actor self, TooltipDescriptionInfo info)
: base(info)
@@ -55,12 +49,6 @@ namespace OpenRA.Mods.Common.Traits
return Info.ValidRelationships.HasRelationship(Owner.RelationshipWith(forPlayer));
}
public string TooltipText
{
get
{
return Info.Description;
}
}
public string TooltipText => Info.Description;
}
}