mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #610 from Azaezel/alpha40/simplifyCallonmodules
simplify callOnModules
This commit is contained in:
commit
eeaf80ebce
1 changed files with 3 additions and 17 deletions
|
|
@ -5,7 +5,6 @@ if (!isObject(ExecFilesList))
|
||||||
|
|
||||||
function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3, %var4, %var5, %var6)
|
function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3, %var4, %var5, %var6)
|
||||||
{
|
{
|
||||||
%maxvars = 7; // match this to i/o signature
|
|
||||||
//clear per module group file execution chain
|
//clear per module group file execution chain
|
||||||
ExecFilesList.empty();
|
ExecFilesList.empty();
|
||||||
//Get our modules so we can exec any specific client-side loading/handling
|
//Get our modules so we can exec any specific client-side loading/handling
|
||||||
|
|
@ -19,22 +18,9 @@ function callOnModules(%functionName, %moduleGroup, %var0, %var1, %var2, %var3,
|
||||||
if(%module.group !$= %moduleGroup)
|
if(%module.group !$= %moduleGroup)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// match this to i/o signature
|
||||||
if(isObject(%module.scopeSet) && %module.scopeSet.isMethod(%functionName))
|
if(isObject(%module.scopeSet) && %module.scopeSet.isMethod(%functionName))
|
||||||
{
|
%module.scopeSet.call(%functionName, %var0, %var1, %var2, %var3, %var4, %var5, %var6);
|
||||||
%stryng = %module.scopeSet @ "." @ %functionName @ "(";
|
|
||||||
for (%a=0;%a<%maxvars;%a++)
|
|
||||||
{
|
|
||||||
if (%var[%a] !$= "")
|
|
||||||
{
|
|
||||||
%stryng = %stryng @ %var[%a];
|
|
||||||
if (%a<%maxvars-1 && %var[%a+1] !$= "")
|
|
||||||
%stryng = %stryng @ ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%stryng = %stryng @ ");";
|
|
||||||
eval(%stryng);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%execFilecount = ExecFilesList.count();
|
%execFilecount = ExecFilesList.count();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue