Actor properties consistency improved
This commit is contained in:
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
}
|
||||
|
||||
[Desc("Specifies whether the actor is alive or dead.")]
|
||||
public bool IsDead { get { return self.IsDead(); } }
|
||||
public bool IsDead { get { return self.IsDead; } }
|
||||
|
||||
[Desc("Specifies whether the actor is idle (not performing any activities).")]
|
||||
public bool IsIdle { get { return self.IsIdle; } }
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
public Actor[] GetGroundAttackers()
|
||||
{
|
||||
return player.World.ActorsWithTrait<AttackBase>().Select(a => a.Actor)
|
||||
.Where(a => a.Owner == player && !a.IsDead() && a.IsInWorld && a.HasTrait<Mobile>())
|
||||
.Where(a => a.Owner == player && !a.IsDead && a.IsInWorld && a.HasTrait<Mobile>())
|
||||
.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
if (squad.Count >= squadSize)
|
||||
{
|
||||
using (func)
|
||||
using (var luaSquad = squad.Where(u => !u.IsDead()).ToArray().ToLuaValue(context))
|
||||
using (var luaSquad = squad.Where(u => !u.IsDead).ToArray().ToLuaValue(context))
|
||||
func.Call(luaSquad).Dispose();
|
||||
|
||||
triggers.OnProducedInternal -= productionHandler;
|
||||
@@ -230,7 +230,7 @@ namespace OpenRA.Mods.RA.Scripting
|
||||
if (squad.Count >= squadSize)
|
||||
{
|
||||
using (func)
|
||||
using (var luaSquad = squad.Where(u => !u.IsDead()).ToArray().ToLuaValue(context))
|
||||
using (var luaSquad = squad.Where(u => !u.IsDead).ToArray().ToLuaValue(context))
|
||||
func.Call(luaSquad).Dispose();
|
||||
|
||||
foreach (var q in queueTypes)
|
||||
|
||||
Reference in New Issue
Block a user