Small code style fixes
This commit is contained in:
@@ -61,9 +61,7 @@ namespace OpenRA.Mods.Common.Lint
|
|||||||
var actorReference = new ActorReference(kv.Value.Value, kv.Value.ToDictionary());
|
var actorReference = new ActorReference(kv.Value.Value, kv.Value.ToDictionary());
|
||||||
var ownerInit = actorReference.InitDict.GetOrDefault<OwnerInit>();
|
var ownerInit = actorReference.InitDict.GetOrDefault<OwnerInit>();
|
||||||
if (ownerInit == null)
|
if (ownerInit == null)
|
||||||
{
|
|
||||||
emitError("Actor {0} is not owned by any player.".F(kv.Key));
|
emitError("Actor {0} is not owned by any player.".F(kv.Key));
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var ownerName = ownerInit.PlayerName;
|
var ownerName = ownerInit.PlayerName;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
};
|
};
|
||||||
|
|
||||||
foreach (var nd in self.TraitsImplementing<INotifyDamage>()
|
foreach (var nd in self.TraitsImplementing<INotifyDamage>()
|
||||||
.Concat(self.Owner.PlayerActor.TraitsImplementing<INotifyDamage>()))
|
.Concat(self.Owner.PlayerActor.TraitsImplementing<INotifyDamage>()))
|
||||||
nd.Damaged(self, ai);
|
nd.Damaged(self, ai);
|
||||||
|
|
||||||
foreach (var nd in self.TraitsImplementing<INotifyDamageStateChanged>())
|
foreach (var nd in self.TraitsImplementing<INotifyDamageStateChanged>())
|
||||||
@@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (Info.NotifyAppliedDamage && repairer != null && repairer.IsInWorld && !repairer.IsDead)
|
if (Info.NotifyAppliedDamage && repairer != null && repairer.IsInWorld && !repairer.IsDead)
|
||||||
foreach (var nd in repairer.TraitsImplementing<INotifyAppliedDamage>()
|
foreach (var nd in repairer.TraitsImplementing<INotifyAppliedDamage>()
|
||||||
.Concat(repairer.Owner.PlayerActor.TraitsImplementing<INotifyAppliedDamage>()))
|
.Concat(repairer.Owner.PlayerActor.TraitsImplementing<INotifyAppliedDamage>()))
|
||||||
nd.AppliedDamage(repairer, self, ai);
|
nd.AppliedDamage(repairer, self, ai);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
};
|
};
|
||||||
|
|
||||||
foreach (var nd in self.TraitsImplementing<INotifyDamage>()
|
foreach (var nd in self.TraitsImplementing<INotifyDamage>()
|
||||||
.Concat(self.Owner.PlayerActor.TraitsImplementing<INotifyDamage>()))
|
.Concat(self.Owner.PlayerActor.TraitsImplementing<INotifyDamage>()))
|
||||||
nd.Damaged(self, ai);
|
nd.Damaged(self, ai);
|
||||||
|
|
||||||
if (DamageState != oldState)
|
if (DamageState != oldState)
|
||||||
@@ -142,7 +142,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (Info.NotifyAppliedDamage && attacker != null && attacker.IsInWorld && !attacker.IsDead)
|
if (Info.NotifyAppliedDamage && attacker != null && attacker.IsInWorld && !attacker.IsDead)
|
||||||
foreach (var nd in attacker.TraitsImplementing<INotifyAppliedDamage>()
|
foreach (var nd in attacker.TraitsImplementing<INotifyAppliedDamage>()
|
||||||
.Concat(attacker.Owner.PlayerActor.TraitsImplementing<INotifyAppliedDamage>()))
|
.Concat(attacker.Owner.PlayerActor.TraitsImplementing<INotifyAppliedDamage>()))
|
||||||
nd.AppliedDamage(attacker, self, ai);
|
nd.AppliedDamage(attacker, self, ai);
|
||||||
|
|
||||||
if (hp == 0)
|
if (hp == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user