Adds FIELD_SpecialtyArrayField field type and handling for it in PersistenceManager, as well as a use-case of it for the surface field in ConvexShape

This commit is contained in:
JeffR 2024-12-07 13:20:30 -06:00
parent e56df92002
commit 61d9e82ce5
9 changed files with 449 additions and 183 deletions

View file

@ -411,6 +411,9 @@ void SubScene::unload()
bool SubScene::save()
{
if (!isServerObject())
return false;
//if there's nothing TO save, don't bother
if (size() == 0 || !isLoaded())
return false;
@ -432,14 +435,20 @@ bool SubScene::save()
for (SimGroupIterator itr(this); *itr; ++itr)
{
if ((*itr)->isMethod("onSaving"))
{
ConsoleValue vars[3];
vars[2].setString(mLevelAssetId);
Con::execute((*itr), 3, vars);
}
SimObject* childObj = (*itr);
prMger.setDirty((*itr), levelPath);
if (!prMger.isDirty(childObj))
{
if ((*itr)->isMethod("onSaving"))
{
Con::executef((*itr), "onSaving", mLevelAssetId);
}
if (childObj->getGroup() == this)
{
prMger.setDirty((*itr), levelPath);
}
}
}
prMger.saveDirty();