StyleCop clean OpenRA.Game

This commit is contained in:
Matthias Mailänder
2015-01-04 11:56:13 +01:00
parent d2d715765c
commit bc3acfeee7
345 changed files with 835 additions and 833 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Returns true if the player is allied with the other player.")]
public bool IsAlliedWith(Player targetPlayer)
{
return player.IsAlliedWith(targetPlayer);
return Player.IsAlliedWith(targetPlayer);
}
[Desc("Changes the current stance of the player against the target player. " +
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Scripting
public void SetStance(Player targetPlayer, string newStance)
{
var emergingStance = Enum<Stance>.Parse(newStance);
player.SetStance(targetPlayer, emergingStance);
Player.SetStance(targetPlayer, emergingStance);
}
}
}

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Scripting
public int Health
{
get { return health.HP; }
set { health.InflictDamage(self, self, health.HP - value, null, true); }
set { health.InflictDamage(Self, Self, health.HP - value, null, true); }
}
[Desc("Maximum health of the actor.")]
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Kill the actor.")]
public void Kill()
{
health.InflictDamage(self, self, health.MaxHP, null, true);
health.InflictDamage(Self, Self, health.MaxHP, null, true);
}
}
}

View File

@@ -27,25 +27,25 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Grant an upgrade to this actor.")]
public void GrantUpgrade(string upgrade)
{
um.GrantUpgrade(self, upgrade, this);
um.GrantUpgrade(Self, upgrade, this);
}
[Desc("Revoke an upgrade that was previously granted using GrantUpgrade.")]
public void RevokeUpgrade(string upgrade)
{
um.RevokeUpgrade(self, upgrade, this);
um.RevokeUpgrade(Self, upgrade, this);
}
[Desc("Grant a limited-time upgrade to this actor.")]
public void GrantTimedUpgrade(string upgrade, int duration)
{
um.GrantTimedUpgrade(self, upgrade, duration);
um.GrantTimedUpgrade(Self, upgrade, duration);
}
[Desc("Check whether this actor accepts a specific upgrade.")]
public bool AcceptsUpgrade(string upgrade)
{
return um.AcceptsUpgrade(self, upgrade);
return um.AcceptsUpgrade(Self, upgrade);
}
}
}