Lots of changes done...

Change trace prototypes.
Change DCS class prototypes
This commit is contained in:
FlightControl
2016-03-28 22:54:31 +02:00
parent 8eab8622c6
commit 260f109e40
40 changed files with 1251 additions and 1073 deletions

View File

@@ -18,7 +18,7 @@ DEPLOYTASK = {
-- @return #DEPLOYTASK The created DeployTask
function DEPLOYTASK:New( CargoType )
local self = BASE:Inherit( self, TASK:New() )
self:T()
self:F()
local Valid = true
@@ -35,7 +35,7 @@ function DEPLOYTASK:New( CargoType )
end
function DEPLOYTASK:ToZone( LandingZone )
self:T()
self:F()
self.LandingZones.LandingZoneNames[LandingZone.CargoZoneName] = LandingZone.CargoZoneName
self.LandingZones.LandingZones[LandingZone.CargoZoneName] = LandingZone
@@ -45,7 +45,7 @@ end
function DEPLOYTASK:InitCargo( InitCargos )
self:T( { InitCargos } )
self:F( { InitCargos } )
if type( InitCargos ) == "table" then
self.Cargos.InitCargos = InitCargos
@@ -58,7 +58,7 @@ end
function DEPLOYTASK:LoadCargo( LoadCargos )
self:T( { LoadCargos } )
self:F( { LoadCargos } )
if type( LoadCargos ) == "table" then
self.Cargos.LoadCargos = LoadCargos
@@ -73,7 +73,7 @@ end
--- When the cargo is unloaded, it will move to the target zone name.
-- @param string TargetZoneName Name of the Zone to where the Cargo should move after unloading.
function DEPLOYTASK:SetCargoTargetZoneName( TargetZoneName )
self:T()
self:F()
local Valid = true
@@ -88,15 +88,15 @@ self:T()
end
function DEPLOYTASK:AddCargoMenus( Client, Cargos, TransportRadius )
self:T()
self:F()
local ClientGroupID = Client:GetClientGroupID()
trace.i( self.ClassName, ClientGroupID )
self:T( ClientGroupID )
for CargoID, Cargo in pairs( Cargos ) do
trace.i( self.ClassName, { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo.CargoWeight } )
self:T( { Cargo.ClassName, Cargo.CargoName, Cargo.CargoType, Cargo.CargoWeight } )
if Cargo:IsStatusLoaded() and Client == Cargo:IsLoadedInClient() then
@@ -110,7 +110,7 @@ self:T()
self.TEXT[1] .. " " .. Cargo.CargoType,
nil
)
trace.i( self.ClassName, 'Added DeployMenu ' .. self.TEXT[1] )
self:T( 'Added DeployMenu ' .. self.TEXT[1] )
end
if Client._Menus[Cargo.CargoType].DeploySubMenus == nil then
@@ -118,7 +118,7 @@ self:T()
end
if Client._Menus[Cargo.CargoType].DeployMenu == nil then
trace.i( self.ClassName, 'deploymenu is nil' )
self:T( 'deploymenu is nil' )
end
Client._Menus[Cargo.CargoType].DeploySubMenus[ #Client._Menus[Cargo.CargoType].DeploySubMenus + 1 ] = missionCommands.addCommandForGroup(
@@ -128,29 +128,29 @@ self:T()
self.MenuAction,
{ ReferenceTask = self, CargoTask = Cargo }
)
trace.i( self.ClassName, 'Added DeploySubMenu ' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" )
self:T( 'Added DeploySubMenu ' .. Cargo.CargoType .. ":" .. Cargo.CargoName .. " ( " .. Cargo.CargoWeight .. "kg )" )
end
end
end
function DEPLOYTASK:RemoveCargoMenus( Client )
self:T()
self:F()
local ClientGroupID = Client:GetClientGroupID()
trace.i( self.ClassName, ClientGroupID )
self:T( ClientGroupID )
for MenuID, MenuData in pairs( Client._Menus ) do
if MenuData.DeploySubMenus ~= nil then
for SubMenuID, SubMenuData in pairs( MenuData.DeploySubMenus ) do
missionCommands.removeItemForGroup( ClientGroupID, SubMenuData )
trace.i( self.ClassName, "Removed DeploySubMenu " )
self:T( "Removed DeploySubMenu " )
SubMenuData = nil
end
end
if MenuData.DeployMenu then
missionCommands.removeItemForGroup( ClientGroupID, MenuData.DeployMenu )
trace.i( self.ClassName, "Removed DeployMenu " )
self:T( "Removed DeployMenu " )
MenuData.DeployMenu = nil
end
end