mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-14 23:56:23 +00:00
Lots of work to get MP2 repacking functional
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define CSCRIPTLAYER_H
|
||||
|
||||
#include "CScriptObject.h"
|
||||
#include "Core/Resource/CDependencyGroup.h"
|
||||
#include <Common/types.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -107,9 +108,6 @@ public:
|
||||
return iLyr;
|
||||
}
|
||||
|
||||
if (mpArea->GeneratedObjectsLayer() == this)
|
||||
return mpArea->NumScriptLayers();
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,11 +70,13 @@ bool CScriptObject::IsEditorProperty(IProperty *pProp)
|
||||
|
||||
void CScriptObject::SetLayer(CScriptLayer *pLayer, u32 NewLayerIndex)
|
||||
{
|
||||
ASSERT(pLayer != nullptr);
|
||||
|
||||
if (pLayer != mpLayer)
|
||||
{
|
||||
if (mpLayer) mpLayer->RemoveInstance(this);
|
||||
mpLayer = pLayer;
|
||||
if (mpLayer) mpLayer->AddInstance(this, NewLayerIndex);
|
||||
mpLayer->AddInstance(this, NewLayerIndex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,20 +20,25 @@ bool IPropertyTemplate::IsInVersion(u32 Version) const
|
||||
return false;
|
||||
}
|
||||
|
||||
TString IPropertyTemplate::FullName() const
|
||||
{
|
||||
return mpParent ? mpParent->FullName() + "::" + Name() : Name();
|
||||
}
|
||||
|
||||
TIDString IPropertyTemplate::IDString(bool FullPath) const
|
||||
{
|
||||
if (mID != 0xFFFFFFFF)
|
||||
{
|
||||
TIDString out;
|
||||
TIDString Out;
|
||||
|
||||
if (mpParent && FullPath)
|
||||
{
|
||||
out = mpParent->IDString(true);
|
||||
if (!out.IsEmpty()) out += ":";
|
||||
Out = mpParent->IDString(true);
|
||||
if (!Out.IsEmpty()) Out += ":";
|
||||
}
|
||||
|
||||
out += TIDString::HexString(mID);
|
||||
return out;
|
||||
Out += TIDString::HexString(mID);
|
||||
return Out;
|
||||
}
|
||||
else return "";
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
|
||||
EGame Game() const;
|
||||
bool IsInVersion(u32 Version) const;
|
||||
TString FullName() const;
|
||||
TIDString IDString(bool FullPath) const;
|
||||
bool IsDescendantOf(const CStructTemplate *pStruct) const;
|
||||
bool IsFromStructTemplate() const;
|
||||
|
||||
Reference in New Issue
Block a user