Proof-of-concept for fuel change event handling

Added a `FuelChanged` event which is to be used to trigger Observers
watching for a machine's fuel level change.

I've written a slapdash observer to emit these events when the cutting
machine's big red button is pressed. That observer *must* be replaced
because of how it feeds the machine ID into the UI (it only works when
there is exactly 1 CuttingMachine, which won't be the case).

The dummy machines are missing their machine components. I've added the
`CuttingMachine` component to the cutting machine just to test the event
passing.
This commit is contained in:
2025-08-28 12:01:30 -05:00
parent e169750923
commit 8f6dfc3e49
5 changed files with 62 additions and 22 deletions

View File

@@ -34,4 +34,7 @@ pub mod consumables {
#[derive(Component)]
pub struct Fuel(u32);
#[derive(Event)]
pub struct FuelChanged;
}