mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Make garage slot limit configurable
This commit is contained in:
@@ -12,6 +12,7 @@ pub struct GameplaySettings {
|
||||
pub critical_ratio: f32,
|
||||
pub cross_promo_image: String, // url
|
||||
pub cross_promo_link: String, // url
|
||||
pub garages_limit: i32,
|
||||
}
|
||||
|
||||
impl std::convert::From<GameplaySettings> for crate::data::client_config::GameplaySettings {
|
||||
|
||||
@@ -565,4 +565,8 @@ impl <C: Clone + Send> super::ConfigProvider<C> for CubeConfig {
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
fn garage_slot_limit(&self) -> i32 {
|
||||
self.settings.gameplay.garages_limit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ pub trait ConfigProvider<C: Clone> {
|
||||
fn shop_entries(&self) -> ShopEntriesResolver;
|
||||
fn promo_codes(&self) -> std::collections::HashMap<String, PromoCode>;
|
||||
fn vehicle_validation(&self) -> VehicleValidators;
|
||||
fn garage_slot_limit(&self) -> i32;
|
||||
}
|
||||
|
||||
pub struct DevMessageProvider<C: Clone> {
|
||||
|
||||
@@ -22,7 +22,7 @@ impl super::config::SelfValidator for Settings {
|
||||
|
||||
fn default_gameplay_settings() -> super::GameplaySettings {
|
||||
super::GameplaySettings {
|
||||
show_tutorial_after_date: "2030-01-01".to_owned(),
|
||||
show_tutorial_after_date: "2077-01-01".to_owned(),
|
||||
health_threshold: 0.20,
|
||||
microbot_sphere: 0.5,
|
||||
misfire_angle: 10.0,
|
||||
@@ -30,8 +30,9 @@ fn default_gameplay_settings() -> super::GameplaySettings {
|
||||
shield_hps: 10_000_000,
|
||||
request_review_level: 10_000,
|
||||
critical_ratio: 5.0,
|
||||
cross_promo_image: "https://git.ngram.ca/OpenJam/servers/raw/branch/main/assets/robocraft/default.png".to_owned(),
|
||||
cross_promo_link: "https://git.ngram.ca/OpenJam/servers".to_owned(),
|
||||
cross_promo_image: "https://git.ngram.ca/OpenJam/rc-servers/raw/branch/main/assets/robocraft/default.png".to_owned(),
|
||||
cross_promo_link: "https://git.ngram.ca/OpenJam/rc-servers".to_owned(),
|
||||
garages_limit: 100,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user