From 1c3e737d8e7e1b171bb7cd4aa4f7a8f12d406bfe Mon Sep 17 00:00:00 2001
From: FlightControl
Date: Wed, 8 Mar 2017 21:39:41 +0100
Subject: [PATCH 1/2] Bugfixes of BASE and SCORING
---
Moose Development/Moose/Core/Base.lua | 21 +++++++++++--
.../Moose/Functional/Scoring.lua | 2 +-
docs/Documentation/Base.html | 30 ++++++++++++++++---
docs/Documentation/Point.html | 1 -
docs/Documentation/Spawn.html | 20 +++++++++++++
5 files changed, 65 insertions(+), 9 deletions(-)
diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua
index 40ed46274..8c1c6fad8 100644
--- a/Moose Development/Moose/Core/Base.lua
+++ b/Moose Development/Moose/Core/Base.lua
@@ -20,7 +20,7 @@
--
-- ## 1.1) BASE constructor
--
--- Any class derived from BASE, must use the @{Base#BASE.New) constructor within the @{Base#BASE.Inherit) method.
+-- Any class derived from BASE, will use the @{Base#BASE.New} constructor embedded in the @{Base#BASE.Inherit} method.
-- See an example at the @{Base#BASE.New} method how this is done.
--
-- ## 1.2) Trace information for debugging
@@ -227,7 +227,17 @@ FORMATION = {
--- @todo need to investigate if the deepCopy is really needed... Don't think so.
+--- BASE constructor.
+--
+-- This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
+--
+-- function EVENT:New()
+-- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
+-- return self
+-- end
+--
+-- @param #BASE self
+-- @return #BASE
function BASE:New()
local self = routines.utils.deepCopy( self ) -- Create a new self instance
local MetaTable = {}
@@ -288,7 +298,12 @@ function BASE:Inherit( Child, Parent )
return Child
end
---- This is the worker method to retrieve the Parent class.
+--- This is the worker method to retrieve the Parent class.
+-- Note that the Parent class must be passed to call the parent class method.
+--
+-- self:GetParent(self):ParentMethod()
+--
+--
-- @param #BASE self
-- @param #BASE Child is the Child class from which the Parent class needs to be retrieved.
-- @return #BASE
diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua
index b817d759e..e58adeac2 100644
--- a/Moose Development/Moose/Functional/Scoring.lua
+++ b/Moose Development/Moose/Functional/Scoring.lua
@@ -1529,7 +1529,7 @@ function SCORING:OpenCSV( ScoringCSV )
error( "Error: Cannot open CSV file in " .. lfs.writedir() )
end
- self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
+ self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","TargetPlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
self.RunTime = os.date("%y-%m-%d_%H-%M-%S")
else
diff --git a/docs/Documentation/Base.html b/docs/Documentation/Base.html
index 526210e42..ccdb2b19e 100644
--- a/docs/Documentation/Base.html
+++ b/docs/Documentation/Base.html
@@ -99,7 +99,8 @@
1.1) BASE constructor
-Any class derived from BASE, must use the Base#BASE.New method how this is done.
+Any class derived from BASE, will use the Base#BASE.New constructor embedded in the Base#BASE.Inherit method.
+See an example at the Base#BASE.New method how this is done.
1.2) Trace information for debugging
@@ -447,7 +448,7 @@ YYYY-MM-DD: CLASS:NewFunction( Params ) added
| BASE:New() |
-
+ BASE constructor.
|
@@ -1114,6 +1115,14 @@ The Event processing Priority.
This is the worker method to retrieve the Parent class.
+
+Note that the Parent class must be passed to call the parent class method.
+
+self:GetParent(self):ParentMethod()
+
+
+
+
Parameter
-
@@ -1264,10 +1273,23 @@ Child
-
-
+
BASE constructor.
- @todo need to investigate if the deepCopy is really needed... Don't think so.
+
+This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
+
+function EVENT:New()
+ local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
+ return self
+end
+
+
+
+ Return value
+
+#BASE:
+
diff --git a/docs/Documentation/Point.html b/docs/Documentation/Point.html
index 6dfc437e5..3850a7d1d 100644
--- a/docs/Documentation/Point.html
+++ b/docs/Documentation/Point.html
@@ -1226,7 +1226,6 @@ The new calculated POINT_VEC2.
-
-
POINT_VEC2.z
diff --git a/docs/Documentation/Spawn.html b/docs/Documentation/Spawn.html
index 1fae53205..849e064df 100644
--- a/docs/Documentation/Spawn.html
+++ b/docs/Documentation/Spawn.html
@@ -834,6 +834,12 @@ A coding example is provided at the description of the SPAWN:_TranslateRotate(SpawnIndex, SpawnRootX, SpawnRootY, SpawnX, SpawnY, SpawnAngle)
|
+ |
+
+
+ | SPAWN.uncontrolled |
+
+
|
@@ -3192,6 +3198,20 @@ True = Continue Scheduler
+
+
+
+-
+
+
+
+SPAWN.uncontrolled
+
+
+-
+
+
+
From 95b091c5d01e0354da4bdbf5475ea842cae005b8 Mon Sep 17 00:00:00 2001
From: FlightControl
Date: Wed, 8 Mar 2017 21:40:02 +0100
Subject: [PATCH 2/2] static moose
---
.../l10n/DEFAULT/Moose.lua | 25 +++++++++++++++----
Moose Mission Setup/Moose.lua | 25 +++++++++++++++----
2 files changed, 40 insertions(+), 10 deletions(-)
diff --git a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
index baff5789d..3bfb34e3b 100644
--- a/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
+++ b/Moose Mission Setup/Moose Mission Update/l10n/DEFAULT/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170308_2048' )
+env.info( 'Moose Generation Timestamp: 20170308_2139' )
local base = _G
Include = {}
@@ -2812,7 +2812,7 @@ end
--
-- ## 1.1) BASE constructor
--
--- Any class derived from BASE, must use the @{Base#BASE.New) constructor within the @{Base#BASE.Inherit) method.
+-- Any class derived from BASE, will use the @{Base#BASE.New} constructor embedded in the @{Base#BASE.Inherit} method.
-- See an example at the @{Base#BASE.New} method how this is done.
--
-- ## 1.2) Trace information for debugging
@@ -3019,7 +3019,17 @@ FORMATION = {
--- @todo need to investigate if the deepCopy is really needed... Don't think so.
+--- BASE constructor.
+--
+-- This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
+--
+-- function EVENT:New()
+-- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
+-- return self
+-- end
+--
+-- @param #BASE self
+-- @return #BASE
function BASE:New()
local self = routines.utils.deepCopy( self ) -- Create a new self instance
local MetaTable = {}
@@ -3080,7 +3090,12 @@ function BASE:Inherit( Child, Parent )
return Child
end
---- This is the worker method to retrieve the Parent class.
+--- This is the worker method to retrieve the Parent class.
+-- Note that the Parent class must be passed to call the parent class method.
+--
+-- self:GetParent(self):ParentMethod()
+--
+--
-- @param #BASE self
-- @param #BASE Child is the Child class from which the Parent class needs to be retrieved.
-- @return #BASE
@@ -19810,7 +19825,7 @@ function SCORING:OpenCSV( ScoringCSV )
error( "Error: Cannot open CSV file in " .. lfs.writedir() )
end
- self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
+ self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","TargetPlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
self.RunTime = os.date("%y-%m-%d_%H-%M-%S")
else
diff --git a/Moose Mission Setup/Moose.lua b/Moose Mission Setup/Moose.lua
index baff5789d..3bfb34e3b 100644
--- a/Moose Mission Setup/Moose.lua
+++ b/Moose Mission Setup/Moose.lua
@@ -1,5 +1,5 @@
env.info( '*** MOOSE STATIC INCLUDE START *** ' )
-env.info( 'Moose Generation Timestamp: 20170308_2048' )
+env.info( 'Moose Generation Timestamp: 20170308_2139' )
local base = _G
Include = {}
@@ -2812,7 +2812,7 @@ end
--
-- ## 1.1) BASE constructor
--
--- Any class derived from BASE, must use the @{Base#BASE.New) constructor within the @{Base#BASE.Inherit) method.
+-- Any class derived from BASE, will use the @{Base#BASE.New} constructor embedded in the @{Base#BASE.Inherit} method.
-- See an example at the @{Base#BASE.New} method how this is done.
--
-- ## 1.2) Trace information for debugging
@@ -3019,7 +3019,17 @@ FORMATION = {
--- @todo need to investigate if the deepCopy is really needed... Don't think so.
+--- BASE constructor.
+--
+-- This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
+--
+-- function EVENT:New()
+-- local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
+-- return self
+-- end
+--
+-- @param #BASE self
+-- @return #BASE
function BASE:New()
local self = routines.utils.deepCopy( self ) -- Create a new self instance
local MetaTable = {}
@@ -3080,7 +3090,12 @@ function BASE:Inherit( Child, Parent )
return Child
end
---- This is the worker method to retrieve the Parent class.
+--- This is the worker method to retrieve the Parent class.
+-- Note that the Parent class must be passed to call the parent class method.
+--
+-- self:GetParent(self):ParentMethod()
+--
+--
-- @param #BASE self
-- @param #BASE Child is the Child class from which the Parent class needs to be retrieved.
-- @return #BASE
@@ -19810,7 +19825,7 @@ function SCORING:OpenCSV( ScoringCSV )
error( "Error: Cannot open CSV file in " .. lfs.writedir() )
end
- self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
+ self.CSVFile:write( '"GameName","RunTime","Time","PlayerName","TargetPlayerName","ScoreType","PlayerUnitCoaltion","PlayerUnitCategory","PlayerUnitType","PlayerUnitName","TargetUnitCoalition","TargetUnitCategory","TargetUnitType","TargetUnitName","Times","Score"\n' )
self.RunTime = os.date("%y-%m-%d_%H-%M-%S")
else