New revised CLEANUP class

This commit is contained in:
FlightControl
2017-06-30 10:27:44 +02:00
parent 862f2ab3ac
commit 133910ac3b
24 changed files with 524 additions and 577 deletions

View File

@@ -4,10 +4,6 @@
--
-- ===
--
-- The @{#BASE} class is the core root class from where every other class in moose is derived.
--
-- ===
--
-- ### Author: **Sven Van de Velde (FlightControl)**
-- ### Contributions:
--

View File

@@ -375,7 +375,12 @@ function DATABASE:Spawn( SpawnTemplate )
SpawnTemplate.CountryID = SpawnCountryID
SpawnTemplate.CategoryID = SpawnCategoryID
-- Ensure that for the spawned group and its units, there are GROUP and UNIT objects created in the DATABASE.
local SpawnGroup = self:AddGroup( SpawnTemplate.name )
for UnitID, UnitData in pairs( SpawnTemplate.units ) do
self:AddUnit( UnitData.name )
end
return SpawnGroup
end

View File

@@ -279,6 +279,14 @@ do -- COORDINATE
return RandomVec3
end
--- Return the height of the land at the coordinate.
-- @param #COORDINATE self
-- @return #number
function COORDINATE:GetLandHeight()
local Vec2 = { x = self.x, y = self.z }
return land.getHeight( Vec2 )
end
function COORDINATE:SetHeading( Heading )