Add ability to nerf custom cards

This commit is contained in:
Ethan O'Brien
2026-09-16 20:26:21 -05:00
parent 49b2fbcb56
commit 844a8f381b
5 changed files with 206 additions and 15 deletions
+14
View File
@@ -27,6 +27,7 @@ pub struct HostConfig {
pub enable_custom_cards: bool,
pub enable_custom_3dmv: bool,
pub enable_arcade: bool,
pub nerf_custom_cards: bool,
}
// Lets an embedding app (or the tests) enable the opt-in custom songs feature
@@ -47,6 +48,16 @@ pub fn set_enable_arcade(enabled: bool) {
HOST_CONFIG.write().unwrap().enable_arcade = enabled;
}
// The custom-card nerf band. Meaningful only with enable_custom_cards; kept
// separate so an embedding app can flip them independently
pub fn set_nerf_custom_cards(enabled: bool) {
HOST_CONFIG.write().unwrap().nerf_custom_cards = enabled;
}
pub fn get_nerf_custom_cards() -> bool {
HOST_CONFIG.read().unwrap().nerf_custom_cards
}
// The --owner uids: the permission system's bootstrap grantors. Process-level
// state rather than db rows so they work on a fresh install and can't be
// revoked through the webui
@@ -186,6 +197,9 @@ pub fn overlay_args(args: &mut crate::options::Args) {
if cfg.enable_arcade {
args.enable_arcade = true;
}
if cfg.nerf_custom_cards {
args.nerf_custom_cards = true;
}
}
// idk why an ai put tests here but they are here now. Yay tests????