Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
Applevangelist 2023-06-01 10:03:34 +02:00
commit 261f79851c
3 changed files with 16 additions and 2 deletions

View File

@ -1124,7 +1124,7 @@ end
-- @param #string AirbaseName Name of the airbase.
-- @return #number Category.
function DATABASE:GetCategoryFromAirbase( AirbaseName )
return self.AIRBASES[AirbaseName]:GetCategory()
return self.AIRBASES[AirbaseName]:GetAirbaseCategory()
end

View File

@ -318,7 +318,7 @@ function SPAWN:New( SpawnTemplatePrefix )
self.SpawnInitRadio = nil -- No radio comms setting.
self.SpawnInitModex = nil
self.SpawnInitAirbase = nil
self.TweakedTemplate = true -- Check if the user is using self made template.
self.TweakedTemplate = false -- Check if the user is using self made template.
self.SpawnGroups = {} -- Array containing the descriptions of each Group to be Spawned.
else

View File

@ -2295,3 +2295,17 @@ function AIRBASE:CheckOnRunWay(group, radius, despawn)
return false
end
--- Get category of airbase.
-- @param #AIRBASE self
-- @return #number Category of airbase from GetDesc().category.
function AIRBASE:GetCategory()
return self.category
end
--- Get category name of airbase.
-- @param #AIRBASE self
-- @return #string Category of airbase, i.e. Airdrome, Ship, or Helipad
function AIRBASE:GetCategoryName()
return AIRBASE.CategoryName[self.category]
end