move global buff toggle logic in commands, add compile flags for playerheartbeat data

This commit is contained in:
yuvlian
2026-05-04 20:10:01 +07:00
committed by amizing25
parent 6aa7670ca8
commit 701a78e9dc
4 changed files with 57 additions and 21 deletions
+16 -16
View File
@@ -110,24 +110,24 @@ impl FreesrData {
Ok(())
}
pub async fn refresh_persistent(&mut self) -> anyhow::Result<()> {
let persistent: Persistent = serde_json::from_str(
&tokio::fs::read_to_string("persistent")
.await
.unwrap_or_default(),
)
.unwrap_or_default();
// pub async fn refresh_persistent(&mut self) -> anyhow::Result<()> {
// let persistent: Persistent = serde_json::from_str(
// &tokio::fs::read_to_string("persistent")
// .await
// .unwrap_or_default(),
// )
// .unwrap_or_default();
self.lineups = persistent.lineups;
self.position = persistent.position;
self.scene = persistent.scene;
self.main_character = persistent.main_character;
self.march_type = persistent.march_type;
self.enable_sw_global = persistent.enable_sw_global;
self.enable_castorice_global = persistent.enable_castorice_global;
// self.lineups = persistent.lineups;
// self.position = persistent.position;
// self.scene = persistent.scene;
// self.main_character = persistent.main_character;
// self.march_type = persistent.march_type;
// self.enable_sw_global = persistent.enable_sw_global;
// self.enable_castorice_global = persistent.enable_castorice_global;
Ok(())
}
// Ok(())
// }
async fn verify_lineup(&mut self) {
if self.lineups.is_empty() {