Parametrize script extension, default to 'tscript'

This commit is contained in:
Lukas Aldershaab 2020-12-12 16:54:16 +01:00
parent b8b62292bd
commit 099dd4f1f3
542 changed files with 774 additions and 783 deletions

View file

@ -2112,14 +2112,14 @@ template<> void *Resource<TSShape>::create(const Torque::Path &path)
{
// Execute the shape script if it exists
Torque::Path scriptPath(path);
scriptPath.setExtension("cs");
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
// Don't execute the script if we're already doing so!
StringTableEntry currentScript = Platform::stripBasePath(CodeBlock::getCurrentCodeBlockFullPath());
if (!scriptPath.getFullPath().equal(currentScript))
{
Torque::Path scriptPathDSO(scriptPath);
scriptPathDSO.setExtension("cs.dso");
scriptPathDSO.setExtension(TORQUE_SCRIPT_EXTENSION ".dso");
if (Torque::FS::IsFile(scriptPathDSO) || Torque::FS::IsFile(scriptPath))
{