mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Allow loading RSON files by path ID
This commit is contained in:
parent
4f806ee2ba
commit
a90302f09f
@ -9,9 +9,9 @@ RSON::Node_t* RSON::LoadFromBuffer(const char* pszBufferName, char* pBuffer, RSO
|
||||
return RSON_LoadFromBuffer(pszBufferName, pBuffer, rootType, 0, NULL);
|
||||
}
|
||||
|
||||
RSON::Node_t* RSON::LoadFromFile(const char* pszFilePath)
|
||||
RSON::Node_t* RSON::LoadFromFile(const char* pszFilePath, const char* pPathID)
|
||||
{
|
||||
if (FileSystem()->FileExists(pszFilePath, "GAME"))
|
||||
if (FileSystem()->FileExists(pszFilePath, pPathID))
|
||||
{
|
||||
FileHandle_t file = FileSystem()->Open(pszFilePath, "rt");
|
||||
|
||||
|
@ -81,7 +81,7 @@ public:
|
||||
|
||||
public:
|
||||
static Node_t* LoadFromBuffer(const char* pszBufferName, char* pBuffer, eFieldType rootType);
|
||||
static Node_t* LoadFromFile(const char* pszFilePath);
|
||||
static Node_t* LoadFromFile(const char* pszFilePath, const char* pPathID = nullptr);
|
||||
};
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
inline CMemory p_RSON_LoadFromBuffer;
|
||||
|
Loading…
x
Reference in New Issue
Block a user