feat(seed): curated FIFA17 dev content pack + opt-in game-scoped ownership seed
This commit is contained in:
@@ -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(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user