Improvements based on experience from implementing Python runtime

This commit is contained in:
Lukas Aldershaab 2023-06-02 16:36:04 +02:00
parent e28e24a802
commit 83ea6cd0df
6 changed files with 67 additions and 188 deletions

View file

@ -112,10 +112,10 @@ static void dumpVariable( Stream& stream,
const char* inClass = NULL )
{
// Skip variables defined in script.
if( entry->type <= Dictionary::Entry::TypeInternalString )
if( entry->value.getType() <= ConsoleValueType::cvString )
return;
// Skip internals... don't export them.
if ( entry->mUsage &&
( dStrstr( entry->mUsage, "@hide" ) || dStrstr( entry->mUsage, "@internal" ) ) )
@ -145,10 +145,10 @@ static void dumpVariable( Stream& stream,
if( nameComponents.size() > 1 && Con::lookupNamespace( nameComponents.first().c_str() + 1 )->mClassRep )
return;
}
// Skip variables for which we can't decipher their type.
ConsoleBaseType* type = ConsoleBaseType::getType( entry->type );
ConsoleBaseType* type = ConsoleBaseType::getType( entry->value.getConsoleType()->consoleType );
if( !type )
{
Con::errorf( "Can't find type for variable '%s'", entry->name );