Add production-related Lua functions

This commit is contained in:
Oliver Brakmann
2014-01-31 20:41:47 +01:00
parent 42532efd8f
commit 886efd0b97
6 changed files with 51 additions and 0 deletions

View File

@@ -180,3 +180,4 @@ LuaScripts:
mods/common/lua/reinforcements.lua
mods/common/lua/supportpowers.lua
mods/common/lua/rules.lua
mods/common/lua/production.lua

View File

@@ -0,0 +1,17 @@
Production = { }
Production.BuildWithSharedQueue = function(player, unit, amount)
Internal.BuildWithSharedQueue(player, unit, amount or 1)
end
Production.BuildWithPerFactoryQueue = function(factory, unit, amount)
Internal.BuildWithPerFactoryQueue(factory, unit, amount or 1)
end
Production.SetRallyPoint = function(factory, location)
Actor.Trait(factory, "RallyPoint").rallyPoint = location.Location
end
Production.SetPrimaryBuilding = function(factory)
Actor.Trait(factory, "PrimaryBuilding"):SetPrimaryProducer(factory, true)
end

View File

@@ -161,3 +161,4 @@ LuaScripts:
mods/common/lua/reinforcements.lua
mods/common/lua/supportpowers.lua
mods/common/lua/rules.lua
mods/common/lua/production.lua

View File

@@ -177,3 +177,4 @@ LuaScripts:
mods/common/lua/reinforcements.lua
mods/common/lua/supportpowers.lua
mods/common/lua/rules.lua
mods/common/lua/production.lua

View File

@@ -199,3 +199,4 @@ LuaScripts:
mods/common/lua/reinforcements.lua
mods/common/lua/supportpowers.lua
mods/common/lua/rules.lua
mods/common/lua/production.lua