diff --git a/BeefLibs/Beefy2D/src/utils/StructuredData.bf b/BeefLibs/Beefy2D/src/utils/StructuredData.bf index 86346a4f..08dfd840 100644 --- a/BeefLibs/Beefy2D/src/utils/StructuredData.bf +++ b/BeefLibs/Beefy2D/src/utils/StructuredData.bf @@ -266,6 +266,32 @@ namespace Beefy.utils get { return GetCurrent().GetType() == typeof(NamedValues); } } + public bool IsEmpty + { + get + { + if (mCurrent.mLastValue != -1) + { + if (mValues[mCurrent.mLastValue] != sEmptySentinel) + return false; + else + { + // We need a (potentially) full value pass if we have sEmptySentinel + int checkValue = mCurrent.mValues.mValueIdx; + while (checkValue != -1) + { + if (mValues[checkValue] != sEmptySentinel) + { + return false; + } + checkValue = mNextValues[checkValue]; + } + } + } + return true; + } + } + public int GetValueCount() { int count = 0;