Make Seed a component

Conceptually it works better as a resource, but that's an extra layer of complexity for the upcoming automatic distribution work.
This commit is contained in:
Michael Bradley 2025-07-06 17:47:19 -04:00
parent 9ab8db41de
commit d89d539f3b
Signed by: MichaelBradley
SSH key fingerprint: SHA256:o/aaeYtRubILK7OYYjYP12DmU7BsPUhKji1AgaQ+ge4
5 changed files with 15 additions and 29 deletions

View file

@ -96,10 +96,10 @@ impl Plugin for GamePlugin {
info!("Will retrieve seed from peer => {peer}");
}
DataSource::Seed(seed) => {
app.insert_resource(seed);
app.world_mut().spawn(seed);
}
DataSource::None => {
app.insert_resource(Seed::random());
app.world_mut().spawn(Seed::random());
}
};
}