Move world cache report to presentation adapter

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-11-04 15:54:53 +03:00
parent 375fdf2d80
commit cb73cb7ccc
4 changed files with 39 additions and 23 deletions
-21
View File
@@ -238,27 +238,6 @@ impl WorldCache {
pub fn is_empty(&self) -> bool {
self.secs.is_empty()
}
/// One line for the report.
pub fn text(&self) -> String {
let s = &self.stats;
format!(
"мир: {} секций ({} КБ), запросов {}, неизвестно {}, лучей {} (ударов {}, неизв. {}), клеток {}; взрывы в блоках: {} (подтверждено {}, без перемен {}, нет чанка {}), чужих ответов {}",
self.len(),
self.bytes() / 1024,
s.sections_asked,
s.sections_unknown,
s.sweeps,
s.hits,
s.unknown_sweeps,
s.cells,
s.blasts_asked,
s.blasts_confirmed,
s.blasts_unchanged,
s.blasts_unloaded,
s.late_dropped
)
}
/// The game's note of changes: another world voids everything; changed
/// sections (or too many to say) are read again when next used.
pub fn changed(&mut self, epoch: u32, overflow: bool, sections: &[Sec]) {