mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Fixed problem with BASE:GetParent method
This commit is contained in:
@@ -551,8 +551,6 @@ do -- AI_A2A_DISPATCHER
|
||||
--- AI_A2A_DISPATCHER constructor.
|
||||
-- @param #AI_A2A_DISPATCHER self
|
||||
-- @param Functional.Detection#DETECTION_BASE Detection The DETECTION object that will detects targets using the the Early Warning Radar network.
|
||||
-- @param #number GroupingRadius The radius in meters wherein detected planes are being grouped as one target area.
|
||||
-- For airplanes, 6000 (6km) is recommended, and is also the default value of this parameter.
|
||||
-- @return #AI_A2A_DISPATCHER self
|
||||
-- @usage
|
||||
--
|
||||
|
||||
@@ -250,6 +250,7 @@ function BASE:Inherit( Child, Parent )
|
||||
local Child = routines.utils.deepCopy( Child )
|
||||
|
||||
if Child ~= nil then
|
||||
Child.ClassParent = Parent
|
||||
|
||||
-- This is for "private" methods...
|
||||
-- When a __ is passed to a method as "self", the __index will search for the method on the public method list of the same object too!
|
||||
@@ -277,7 +278,7 @@ end
|
||||
-- @param #BASE Child is the Child class from which the Parent class needs to be retrieved.
|
||||
-- @return #BASE
|
||||
function BASE:GetParent( Child )
|
||||
local Parent = getmetatable( Child )
|
||||
local Parent = Child.ClassParent
|
||||
-- env.info('Inherited class of ' .. Child.ClassName .. ' is ' .. Parent.ClassName )
|
||||
return Parent
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user