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

@@ -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