diff --git a/src/Core/Resource/Script/IProperty.cpp b/src/Core/Resource/Script/IProperty.cpp index c73fd152..0fca29de 100644 --- a/src/Core/Resource/Script/IProperty.cpp +++ b/src/Core/Resource/Script/IProperty.cpp @@ -94,6 +94,12 @@ bool IProperty::MatchesDefault() else return pkValue->Matches(pkDefault); } +// ************ TAssetProperty ************ +TAssetProperty::TAssetProperty(IPropertyTemplate *pTemp, CScriptObject *pInstance, CPropertyStruct *pParent) + : TTypedProperty(pTemp, pInstance, pParent, CAssetID::InvalidID( pTemp->Game() )) +{ +} + // ************ CPropertyStruct ************ void CPropertyStruct::Copy(const IProperty *pkProp) { diff --git a/src/Core/Resource/Script/IProperty.h b/src/Core/Resource/Script/IProperty.h index 2a5831d4..1756d726 100644 --- a/src/Core/Resource/Script/IProperty.h +++ b/src/Core/Resource/Script/IProperty.h @@ -150,7 +150,10 @@ public: class TAssetProperty : public TTypedProperty { public: - IMPLEMENT_PROPERTY_CTORS(TAssetProperty, CAssetID) + TAssetProperty(IPropertyTemplate *pTemp, CScriptObject *pInstance, CPropertyStruct *pParent); // Can't be in the header because needs to check the template to set the correct ID length + TAssetProperty(IPropertyTemplate *pTemp, CScriptObject *pInstance, CPropertyStruct *pParent, CAssetID v) + : TTypedProperty(pTemp, pInstance, pParent, v) {} + IMPLEMENT_PROPERTY_CLONE(TAssetProperty) virtual bool MatchesDefault() { return !Get().IsValid(); } virtual bool ShouldCook() { return true; }