mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-01 07:40:18 -04:00
fix merge + make sure test mods aren't installed again
This commit is contained in:
parent
afd9258995
commit
f42fdfcf55
5 changed files with 11 additions and 13 deletions
loader
include/Geode/loader
src/loader
test
|
@ -62,20 +62,16 @@ namespace geode {
|
|||
std::monostate listenForSettingChanges(
|
||||
std::string const& settingKey, void (*callback)(T)
|
||||
) {
|
||||
Loader::get()->scheduleOnModLoad(getMod(), [=]() {
|
||||
new EventListener(
|
||||
callback, GeodeSettingChangedFilter<T>(getMod()->getID(), settingKey)
|
||||
);
|
||||
});
|
||||
(void)new EventListener(
|
||||
callback, GeodeSettingChangedFilter<T>(getMod()->getID(), settingKey)
|
||||
);
|
||||
return std::monostate();
|
||||
}
|
||||
|
||||
static std::monostate listenForAllSettingChanges(void (*callback)(SettingValue*)) {
|
||||
Loader::get()->scheduleOnModLoad(getMod(), [=]() {
|
||||
new EventListener(
|
||||
callback, SettingChangedFilter(getMod()->getID(), std::nullopt)
|
||||
);
|
||||
});
|
||||
(void)new EventListener(
|
||||
callback, SettingChangedFilter(getMod()->getID(), std::nullopt)
|
||||
);
|
||||
return std::monostate();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -582,6 +582,7 @@ void Loader::Impl::provideNextMod(Mod* mod) {
|
|||
m_nextModLock.lock();
|
||||
m_nextMod = mod;
|
||||
}
|
||||
|
||||
Mod* Loader::Impl::takeNextMod() {
|
||||
if (!m_nextMod) {
|
||||
// this means we're hopefully loading the internal mod
|
||||
|
@ -597,6 +598,7 @@ Mod* Loader::Impl::takeNextMod() {
|
|||
m_nextModCV.notify_all();
|
||||
return ret;
|
||||
}
|
||||
|
||||
void Loader::Impl::releaseNextMod() {
|
||||
auto lock = std::unique_lock<std::mutex>(m_nextModAccessMutex);
|
||||
m_nextModCV.wait(lock);
|
||||
|
|
|
@ -124,7 +124,7 @@ Result<> Mod::loadData() {
|
|||
if (auto setting = this->getSetting(key)) {
|
||||
// load its value
|
||||
if (!setting->load(value.json())) {
|
||||
log::log(
|
||||
log::internalLog(
|
||||
Severity::Error,
|
||||
this,
|
||||
"{}: Unable to load value for setting \"{}\"",
|
||||
|
|
|
@ -17,4 +17,4 @@ target_link_libraries(
|
|||
geode-sdk
|
||||
)
|
||||
|
||||
create_geode_file(${PROJECT_NAME})
|
||||
create_geode_file(${PROJECT_NAME} DONT_INSTALL)
|
||||
|
|
|
@ -15,4 +15,4 @@ target_link_libraries(
|
|||
geode-sdk
|
||||
)
|
||||
|
||||
create_geode_file(${PROJECT_NAME})
|
||||
create_geode_file(${PROJECT_NAME} DONT_INSTALL)
|
||||
|
|
Loading…
Add table
Reference in a new issue