Refactored DLC unlocking logic

This commit is contained in:
acidicoala
2023-01-06 05:18:13 +03:00
parent b04c96a36d
commit 011f3fac5d
19 changed files with 310 additions and 317 deletions

View File

@@ -24,34 +24,6 @@
namespace smoke_api {
using namespace koalabox;
struct Config {
uint32_t $version = 2;
bool logging = false;
bool unlock_family_sharing = true;
bool unlock_all = true;
Set<uint32_t> override;
Vector<uint32_t> dlc_ids;
bool auto_inject_inventory = true;
Vector<uint32_t> inventory_items;
// Have to use general json type here since library doesn't support std::optional
nlohmann::json koalageddon_config;
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(
Config, $version, // NOLINT(misc-const-correctness)
logging,
unlock_family_sharing,
unlock_all,
override,
dlc_ids,
auto_inject_inventory,
inventory_items,
koalageddon_config
)
};
extern Config config;
extern HMODULE self_module;
extern HMODULE original_library;
@@ -62,6 +34,4 @@ namespace smoke_api {
void shutdown();
bool should_unlock(uint32_t app_id);
}