-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
455a75e
commit 1dda2e0
Showing
11 changed files
with
118 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
|
||
#include <Geode/loader/Dispatch.hpp> | ||
|
||
#include <filesystem> | ||
#include <vector> | ||
#include <string> | ||
|
||
namespace geode::texture_loader { | ||
|
||
inline bool isLoaded() { | ||
return geode::Loader::get()->isModLoaded("geode.texture-loader"); | ||
} | ||
|
||
struct Pack { | ||
std::string id; | ||
std::string name; | ||
VersionInfo version; | ||
std::vector<std::string> authors; | ||
|
||
/// Path from where the pack originates from. May be a file (apk, zip) or a folder | ||
std::filesystem::path path; | ||
/// Path where the resources are located. This is what is added to the search path | ||
std::filesystem::path resourcesPath; | ||
}; | ||
|
||
namespace impl { | ||
using EventGetAvailablePacks = geode::DispatchEvent<std::vector<Pack>*>; | ||
using EventGetAppliedPacks = geode::DispatchEvent<std::vector<Pack>*>; | ||
} | ||
|
||
inline std::vector<Pack> getAvailablePacks() { | ||
std::vector<Pack> result; | ||
impl::EventGetAvailablePacks("geode.texture-loader/v1/get-available-packs", &result).post(); | ||
return result; | ||
} | ||
|
||
inline std::vector<Pack> getAppliedPacks() { | ||
std::vector<Pack> result; | ||
impl::EventGetAppliedPacks("geode.texture-loader/v1/get-applied-packs", &result).post(); | ||
return result; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters