2
0
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:
Jan
2026-06-20 20:35:47 +02:00
committed by GitHub
parent b4477ac1a9
commit 087ce0c208
15 changed files with 336 additions and 292 deletions
@@ -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;
};