From 2674ab4035e01d3ee7b3c90d8822f6d8776e34d0 Mon Sep 17 00:00:00 2001 From: "NG (Graham)" Date: Sun, 17 Aug 2025 12:57:14 -0400 Subject: [PATCH] Set refill rate to multiple of power bar, not absolute; fix #25 --- rc_core/src/persist/weapon.rs | 1 + rc_services_room/src/operations/power_bar_stats.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/rc_core/src/persist/weapon.rs b/rc_core/src/persist/weapon.rs index 55a48cb..21b778f 100644 --- a/rc_core/src/persist/weapon.rs +++ b/rc_core/src/persist/weapon.rs @@ -29,6 +29,7 @@ pub struct WeaponData { pub repeat_fire_inaccuracy_decay: Option, #[serde(alias="repeat_fire_inaccuracy_recovery_time")] pub repeat_fire_innaccuracy_recovery: Option, + #[serde(alias="fire_instant_accuracy_decay_degrees")] pub fire_instant_accuracy_decay: Option, // degrees pub accuracy_non_recover_time: Option, #[serde(alias="accuracy_decay_time")] diff --git a/rc_services_room/src/operations/power_bar_stats.rs b/rc_services_room/src/operations/power_bar_stats.rs index 824153a..21519a0 100644 --- a/rc_services_room/src/operations/power_bar_stats.rs +++ b/rc_services_room/src/operations/power_bar_stats.rs @@ -7,7 +7,7 @@ pub(super) fn power_bar_provider() -> SimpleFunc<51, crate::UserTy, impl (Fn(Par SimpleFunc::new(|params, _| { let mut params = params.to_dict(); params.insert(PARAM_KEY, Typed::HashMap(vec![ - (Typed::Str("refillRatePerSecond".into()), Typed::Float(1255.0)), + (Typed::Str("refillRatePerSecond".into()), Typed::Float(0.10)), // should take 10s to refill (Typed::Str("powerForAllRobots".into()), Typed::Int(12_550 /* converted to u32 */)), ].into() ));