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

@@ -25,22 +25,22 @@ namespace OpenRA.Mods.Common.Scripting
: base(context, player) { }
[Desc("The player's internal name.")]
public string InternalName { get { return Player.InternalName; } }
public string InternalName => Player.InternalName;
[Desc("The player's name.")]
public string Name { get { return Player.PlayerName; } }
public string Name => Player.PlayerName;
[Desc("The player's color.")]
public Color Color { get { return Player.Color; } }
public Color Color => Player.Color;
[Desc("The player's faction.")]
public string Faction { get { return Player.Faction.InternalName; } }
public string Faction => Player.Faction.InternalName;
[Desc("The player's spawnpoint ID.")]
public int Spawn { get { return Player.SpawnPoint; } }
public int Spawn => Player.SpawnPoint;
[Desc("The player's home/starting location.")]
public CPos HomeLocation { get { return Player.HomeLocation; } }
public CPos HomeLocation => Player.HomeLocation;
[Desc("The player's team ID.")]
public int Team
@@ -63,13 +63,13 @@ namespace OpenRA.Mods.Common.Scripting
}
[Desc("Returns true if the player is a bot.")]
public bool IsBot { get { return Player.IsBot; } }
public bool IsBot => Player.IsBot;
[Desc("Returns true if the player is non combatant.")]
public bool IsNonCombatant { get { return Player.NonCombatant; } }
public bool IsNonCombatant => Player.NonCombatant;
[Desc("Returns true if the player is the local player.")]
public bool IsLocalPlayer { get { return Player == (Player.World.RenderPlayer ?? Player.World.LocalPlayer); } }
public bool IsLocalPlayer => Player == (Player.World.RenderPlayer ?? Player.World.LocalPlayer);
[Desc("Returns all living actors staying inside the world for this player.")]
public Actor[] GetActors()