fix merge + make sure test mods aren't installed again

This commit is contained in:
HJfod 2022-12-13 22:51:09 +02:00
parent afd9258995
commit f42fdfcf55
5 changed files with 11 additions and 13 deletions
loader
include/Geode/loader
src/loader
test

View file

@ -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();
}
}

View file

@ -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);

View file

@ -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 \"{}\"",

View file

@ -17,4 +17,4 @@ target_link_libraries(
geode-sdk
)
create_geode_file(${PROJECT_NAME})
create_geode_file(${PROJECT_NAME} DONT_INSTALL)

View file

@ -15,4 +15,4 @@ target_link_libraries(
geode-sdk
)
create_geode_file(${PROJECT_NAME})
create_geode_file(${PROJECT_NAME} DONT_INSTALL)