mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-07-03 06:18:11 +00:00
feat: unlinker auto paths (#848)
* chore: extract shared search paths code from modman * feat: automatically detect search paths for game directories * chore: adjust log levels for loading and unload search paths * fix: move iwd to obj common
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "LoadedZoneInformation.h"
|
||||
|
||||
LoadedZoneInformation::LoadedZoneInformation(std::unique_ptr<Zone> zone, std::string filePath, std::vector<std::string> searchPaths)
|
||||
: m_zone(std::move(zone)),
|
||||
m_file_path(std::move(filePath)),
|
||||
m_search_paths(std::move(searchPaths))
|
||||
{
|
||||
}
|
||||
|
||||
Zone& LoadedZoneInformation::GetZone()
|
||||
{
|
||||
return *m_zone;
|
||||
}
|
||||
|
||||
const Zone& LoadedZoneInformation::GetZone() const
|
||||
{
|
||||
return *m_zone;
|
||||
}
|
||||
|
||||
const std::string& LoadedZoneInformation::GetFilePath() const
|
||||
{
|
||||
return m_file_path;
|
||||
}
|
||||
|
||||
const std::vector<std::string>& LoadedZoneInformation::GetSearchPaths() const
|
||||
{
|
||||
return m_search_paths;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Zone.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class LoadedZoneInformation
|
||||
{
|
||||
public:
|
||||
LoadedZoneInformation(std::unique_ptr<Zone> zone, std::string filePath, std::vector<std::string> searchPaths);
|
||||
|
||||
[[nodiscard]] Zone& GetZone();
|
||||
[[nodiscard]] const Zone& GetZone() const;
|
||||
|
||||
[[nodiscard]] const std::string& GetFilePath() const;
|
||||
[[nodiscard]] const std::vector<std::string>& GetSearchPaths() const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<Zone> m_zone;
|
||||
std::string m_file_path;
|
||||
std::vector<std::string> m_search_paths;
|
||||
};
|
||||
Reference in New Issue
Block a user