mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-10-11 09:04:27 +08:00
Add ability to nerf custom cards
This commit is contained in:
@@ -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????
|
||||
|
||||
Reference in New Issue
Block a user