From 4cf40defe66ea192d038a54301d3488ae82a7c44 Mon Sep 17 00:00:00 2001 From: Areloch Date: Sat, 11 Sep 2021 02:28:14 -0500 Subject: [PATCH] Adds handling to project importer so if incoming gui files have the %guiContent declaration at the start, it's converted to a global to comply with the script interpreter --- .../scripts/pre40/T3Dpre4ProjectImporter.tscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript index ceb9dfbcc..d996182dd 100644 --- a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript +++ b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript @@ -470,6 +470,12 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this) %objectName = findObjectName(%line, "new"); + if(strIsMatchExpr("*%guiContent*=*new*", %line)) + { + %line = strReplace(%line, "%guiContent", "$guiContent"); + %fileWasChanged = true; + } + if(%objectName !$= "") { %sanitizedName = sanitizeString(%objectName);