generated upgrades and bars

This commit is contained in:
Vinzenz Schroeter 2025-07-06 11:46:32 +02:00
commit 74d146242b

View file

@ -21,9 +21,11 @@ impl Bar {
progress: 0f64,
}
}
}
impl Bar {
pub(crate) fn name(&self) -> &'static str {
self.name
}
pub(crate) fn progress(&mut self, delta: Duration) -> Currency {
if !self.enabled {
return 0.0;
@ -36,9 +38,7 @@ impl Bar {
completions * self.productivity
}
}
impl Bar {
pub fn draw<C: GridMut<char>, P: GridMut<bool>>(&self, chars: &mut C, bitmap: &mut P) {
if !self.enabled {
return;