feat(seed): curated FIFA17 dev content pack + opt-in game-scoped ownership seed

This commit is contained in:
funman300
2026-08-11 22:55:02 +00:00
parent 6acae54f80
commit 36abd4b6fb
8 changed files with 971 additions and 2 deletions
+14
View File
@@ -6,6 +6,10 @@ pub struct Config {
pub database_url: String,
pub data_dir: String,
pub max_connections: u32,
/// Games whose opt-in development content pack (`data/games/<game>/dev/`) is
/// loaded IN ADDITION to the default `data/cards` catalog. Empty by default —
/// default/test content is never affected unless a game is named here.
pub dev_content_games: Vec<String>,
}
impl Config {
@@ -19,6 +23,16 @@ impl Config {
.ok()
.and_then(|v| v.parse().ok())
.unwrap_or(5),
dev_content_games: std::env::var("OPENFUT_DEV_CONTENT_GAMES")
.ok()
.map(|v| {
v.split(',')
.map(str::trim)
.filter(|s| !s.is_empty())
.map(String::from)
.collect()
})
.unwrap_or_default(),
})
}
}