Remove the temperate RA shellmap and port the desert shellmap to Lua.

This commit is contained in:
ScottNZ
2014-03-02 18:47:24 +13:00
parent 79d1a944bc
commit 7d43ecc33f
17 changed files with 858 additions and 2277 deletions

View File

@@ -76,7 +76,14 @@ Actor.FlyOffMap = function(actor)
end
Actor.Hunt = function(actor)
actor:QueueActivity(OpenRA.New("Hunt", { actor }))
if Actor.HasTrait(actor, "AttackBase") and Actor.HasTrait(actor, "IMove") then
actor:QueueActivity(OpenRA.New("Hunt", { actor }))
end
end
Actor.CargoIsEmpty = function(actor)
local cargo = Actor.TraitOrDefault(actor, "Cargo")
return cargo == nil or cargo:IsEmpty(actor)
end
Actor.UnloadCargo = function(actor, unloadAll)
@@ -163,6 +170,14 @@ Actor.OnCaptured = function(actor, eh)
Actor.Trait(actor, "LuaScriptEvents").OnCaptured:Add(eh)
end
Actor.OnIdle = function(actor, eh)
Actor.Trait(actor, "LuaScriptEvents").OnIdle:Add(eh)
end
Actor.OnProduced = function(actor, eh)
Actor.Trait(actor, "LuaScriptEvents").OnProduced:Add(eh)
end
Actor.ActorsWithTrait = function(className)
local ret = { }
for item in Utils.Enumerate(Internal.ActorsWithTrait(className)) do