Progress on tasking

This commit is contained in:
FlightControl
2017-03-09 13:37:13 +01:00
parent 40884cd411
commit fbae55b9f9
17 changed files with 8796 additions and 4696 deletions

View File

@@ -54,6 +54,8 @@ DATABASE = {
PLAYERSJOINED = {},
CLIENTS = {},
AIRBASES = {},
COUNTRY_ID = {},
COUNTRY_NAME = {},
NavPoints = {},
}
@@ -761,6 +763,9 @@ function DATABASE:_RegisterTemplates()
local CountryName = string.upper(cntry_data.name)
local CountryID = cntry_data.id
self.COUNTRY_ID[CountryName] = CountryID
self.COUNTRY_NAME[CountryID] = CountryName
--self.Units[coa_name][countryName] = {}
--self.Units[coa_name][countryName]["countryId"] = cntry_data.id

View File

@@ -408,7 +408,7 @@ end
-- @param #number Points (optional) The amount of points in the circle.
-- @param #boolean UnBound If true the tyres will be destroyed.
-- @return #ZONE_RADIUS self
function ZONE_RADIUS:BoundZone( Points, UnBound )
function ZONE_RADIUS:BoundZone( Points, CountryID, UnBound )
local Point = {}
local Vec2 = self:GetVec2()
@@ -424,8 +424,10 @@ function ZONE_RADIUS:BoundZone( Points, UnBound )
Point.x = Vec2.x + math.cos( Radial ) * self:GetRadius()
Point.y = Vec2.y + math.sin( Radial ) * self:GetRadius()
local CountryName = _DATABASE.COUNTRY_NAME[CountryID]
local Tire = {
["country"] = "USA",
["country"] = CountryName,
["category"] = "Fortifications",
["canCargo"] = false,
["shape_name"] = "H-tyre_B_WF",
@@ -437,7 +439,7 @@ function ZONE_RADIUS:BoundZone( Points, UnBound )
["heading"] = 0,
} -- end of ["group"]
local Group = coalition.addStaticObject( country.id.USA, Tire )
local Group = coalition.addStaticObject( CountryID, Tire )
if UnBound and UnBound == true then
Group:destroy()
end