mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 11:05:08 -05:00
Compare commits
7 commits
28e0993d1e
...
3ddfdd0d69
Author | SHA1 | Date | |
---|---|---|---|
|
3ddfdd0d69 | ||
|
01807fedc9 | ||
|
22a11b96e2 | ||
|
6679a690a2 | ||
|
ebd4c920f5 | ||
|
4a40835f71 | ||
|
74d0924bcb |
5 changed files with 37 additions and 13 deletions
|
@ -10,8 +10,7 @@
|
||||||
* Rewritten matjson library
|
* Rewritten matjson library
|
||||||
* Settings V2 completely removed, use V3 now
|
* Settings V2 completely removed, use V3 now
|
||||||
* `JsonChecker` removed
|
* `JsonChecker` removed
|
||||||
* Add new system for ordered hook priority (673317d, 6db3084)
|
* Add new system for ordered hook priority, [see docs](https://docs.geode-sdk.org/tutorials/hookpriority) (673317d, 6db3084)
|
||||||
* See docs: LINK HERE!!
|
|
||||||
* C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9)
|
* C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9)
|
||||||
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) (3248831)
|
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) (3248831)
|
||||||
* Single page local mods list (efb1fbf)
|
* Single page local mods list (efb1fbf)
|
||||||
|
|
|
@ -164,7 +164,27 @@ function(setup_geode_mod proname)
|
||||||
set(HAS_HEADERS Off)
|
set(HAS_HEADERS Off)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (HAS_HEADERS AND WIN32)
|
if (GEODE_BUNDLE_PDB AND WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo"))
|
||||||
|
if (HAS_HEADERS)
|
||||||
|
add_custom_target(${proname}_PACKAGE ALL
|
||||||
|
DEPENDS ${proname} ${CMAKE_CURRENT_SOURCE_DIR}/mod.json
|
||||||
|
COMMAND ${GEODE_CLI} package new ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
--binary $<TARGET_FILE:${proname}> $<TARGET_LINKER_FILE:${proname}> $<TARGET_PDB_FILE:${proname}>
|
||||||
|
--output ${CMAKE_CURRENT_BINARY_DIR}/${MOD_ID}.geode
|
||||||
|
${INSTALL_ARG} ${PDB_ARG}
|
||||||
|
VERBATIM USES_TERMINAL
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
add_custom_target(${proname}_PACKAGE ALL
|
||||||
|
DEPENDS ${proname} ${CMAKE_CURRENT_SOURCE_DIR}/mod.json
|
||||||
|
COMMAND ${GEODE_CLI} package new ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
--binary $<TARGET_FILE:${proname}> $<TARGET_PDB_FILE:${proname}>
|
||||||
|
--output ${CMAKE_CURRENT_BINARY_DIR}/${MOD_ID}.geode
|
||||||
|
${INSTALL_ARG} ${PDB_ARG}
|
||||||
|
VERBATIM USES_TERMINAL
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
elseif (HAS_HEADERS AND WIN32)
|
||||||
# this adds the .lib file on windows, which is needed for linking with the headers
|
# this adds the .lib file on windows, which is needed for linking with the headers
|
||||||
add_custom_target(${proname}_PACKAGE ALL
|
add_custom_target(${proname}_PACKAGE ALL
|
||||||
DEPENDS ${proname} ${CMAKE_CURRENT_SOURCE_DIR}/mod.json
|
DEPENDS ${proname} ${CMAKE_CURRENT_SOURCE_DIR}/mod.json
|
||||||
|
|
|
@ -817,7 +817,7 @@ namespace geode {
|
||||||
// make the second event listener that waits for the mapper's task
|
// make the second event listener that waits for the mapper's task
|
||||||
// and just forwards everything through
|
// and just forwards everything through
|
||||||
static_cast<void*>(new EventListener<NewTask>(
|
static_cast<void*>(new EventListener<NewTask>(
|
||||||
[handle](Event* event) mutable {
|
[handle](typename NewTask::Event* event) mutable {
|
||||||
if (auto v = event->getValue()) {
|
if (auto v = event->getValue()) {
|
||||||
NewTask::finish(handle.lock(), std::move(*v));
|
NewTask::finish(handle.lock(), std::move(*v));
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,9 +330,10 @@ void ModItem::updateState() {
|
||||||
auto wantsRestart = m_source.wantsRestart();
|
auto wantsRestart = m_source.wantsRestart();
|
||||||
|
|
||||||
auto download = server::ModDownloadManager::get()->getDownload(m_source.getID());
|
auto download = server::ModDownloadManager::get()->getDownload(m_source.getID());
|
||||||
|
bool isDownloading = download && download->isActive();
|
||||||
|
|
||||||
// If there is an active download ongoing, show that in place of developer name
|
// If there is an active download ongoing, show that in place of developer name
|
||||||
if (download && download->isActive()) {
|
if (isDownloading) {
|
||||||
m_updateBtn->setVisible(false);
|
m_updateBtn->setVisible(false);
|
||||||
m_restartRequiredLabel->setVisible(false);
|
m_restartRequiredLabel->setVisible(false);
|
||||||
m_developers->setVisible(false);
|
m_developers->setVisible(false);
|
||||||
|
@ -431,7 +432,7 @@ void ModItem::updateState() {
|
||||||
m_bg->setColor("mod-list-errors-found"_cc3b);
|
m_bg->setColor("mod-list-errors-found"_cc3b);
|
||||||
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
||||||
}
|
}
|
||||||
if (!wantsRestart && targetsOutdated) {
|
if (!wantsRestart && targetsOutdated && !isDownloading) {
|
||||||
LoadProblem problem = targetsOutdated.value();
|
LoadProblem problem = targetsOutdated.value();
|
||||||
m_bg->setColor("mod-list-outdated-label"_cc3b);
|
m_bg->setColor("mod-list-outdated-label"_cc3b);
|
||||||
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
m_bg->setOpacity(isGeodeTheme() ? 25 : 90);
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <Geode/ui/GeodeUI.hpp>
|
#include <Geode/ui/GeodeUI.hpp>
|
||||||
#include <server/DownloadManager.hpp>
|
#include <server/DownloadManager.hpp>
|
||||||
#include <Geode/binding/GameObject.hpp>
|
#include <Geode/binding/GameObject.hpp>
|
||||||
|
#include <unordered_set>
|
||||||
|
|
||||||
LoadModSuggestionTask loadModSuggestion(LoadProblem const& problem) {
|
LoadModSuggestionTask loadModSuggestion(LoadProblem const& problem) {
|
||||||
// Recommended / suggested are essentially the same thing for the purposes of this
|
// Recommended / suggested are essentially the same thing for the purposes of this
|
||||||
|
@ -183,19 +184,22 @@ server::ServerRequest<std::unordered_set<std::string>> ModSource::fetchValidTags
|
||||||
return std::visit(makeVisitor {
|
return std::visit(makeVisitor {
|
||||||
[](Mod* mod) {
|
[](Mod* mod) {
|
||||||
return server::getTags().map(
|
return server::getTags().map(
|
||||||
[mod](auto* result) -> Result<std::unordered_set<std::string>, server::ServerError> {
|
[mod](Result<std::unordered_set<std::string>, server::ServerError>* result)
|
||||||
|
-> Result<std::unordered_set<std::string>, server::ServerError> {
|
||||||
|
std::unordered_set<std::string> finalTags;
|
||||||
|
auto modTags = mod->getMetadata().getTags();
|
||||||
|
|
||||||
if (result->isOk()) {
|
if (result->isOk()) {
|
||||||
|
std::unordered_set<std::string> fetched = result->unwrap();
|
||||||
// Filter out invalid tags
|
// Filter out invalid tags
|
||||||
auto modTags = mod->getMetadata().getTags();
|
for (std::string const& tag : modTags) {
|
||||||
auto finalTags = std::unordered_set<std::string>();
|
if (fetched.contains(tag)) {
|
||||||
for (auto& tag : modTags) {
|
|
||||||
if (result->unwrap().contains(tag)) {
|
|
||||||
finalTags.insert(tag);
|
finalTags.insert(tag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(finalTags);
|
|
||||||
}
|
}
|
||||||
return Ok(result->unwrap());
|
|
||||||
|
return Ok(finalTags);
|
||||||
},
|
},
|
||||||
[](server::ServerProgress* progress) {
|
[](server::ServerProgress* progress) {
|
||||||
return *progress;
|
return *progress;
|
||||||
|
|
Loading…
Reference in a new issue