mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Fixed handling issue where it would misparse lines that would contain new/singleton/datablock keywords
fixed incorrect getSubStr function invoke
This commit is contained in:
parent
630285def6
commit
5e1eb80bc1
2 changed files with 4 additions and 4 deletions
|
|
@ -37,7 +37,7 @@ function Pre40ImporterPage0::openPage(%this)
|
||||||
%sanitizedFilename = sanitizeString(%fileBase);
|
%sanitizedFilename = sanitizeString(%fileBase);
|
||||||
if(startsWith(%sanitizedFilename, "_"))
|
if(startsWith(%sanitizedFilename, "_"))
|
||||||
{
|
{
|
||||||
%sanitizedFilename = substr(%sanitizedFilename, 1, -1);
|
%sanitizedFilename = getSubstr(%sanitizedFilename, 1, -1);
|
||||||
}
|
}
|
||||||
if(%sanitizedFilename !$= %fileBase)
|
if(%sanitizedFilename !$= %fileBase)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -476,7 +476,7 @@ function preprocessImportingFiles()
|
||||||
{
|
{
|
||||||
%line = $ProjectImporter::fileObject.readLine();
|
%line = $ProjectImporter::fileObject.readLine();
|
||||||
|
|
||||||
if(strIsMatchExpr("*new*(*)*", %line) && !strIsMatchExpr("*\"*new*(*)*\"*", %line))
|
if(strIsMatchExpr("* new*(*)*", %line))
|
||||||
{
|
{
|
||||||
%start = strpos(%line, "new ");
|
%start = strpos(%line, "new ");
|
||||||
%end = strpos(%line, "(", %start);
|
%end = strpos(%line, "(", %start);
|
||||||
|
|
@ -530,7 +530,7 @@ function preprocessImportingFiles()
|
||||||
%insideObjectBlock = true;
|
%insideObjectBlock = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strIsMatchExpr("*datablock*(*)*", %line))
|
else if(strIsMatchExpr("* datablock*(*)*", %line))
|
||||||
{
|
{
|
||||||
%start = strpos(%line, "datablock ");
|
%start = strpos(%line, "datablock ");
|
||||||
%end = strpos(%line, "(", %start);
|
%end = strpos(%line, "(", %start);
|
||||||
|
|
@ -584,7 +584,7 @@ function preprocessImportingFiles()
|
||||||
%insideObjectBlock = true;
|
%insideObjectBlock = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strIsMatchExpr("*singleton*(*)*", %line))
|
else if(strIsMatchExpr("* singleton*(*)*", %line))
|
||||||
{
|
{
|
||||||
%start = strpos(%line, "singleton ");
|
%start = strpos(%line, "singleton ");
|
||||||
%end = strpos(%line, "(", %start);
|
%end = strpos(%line, "(", %start);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue