Start local server by adding `Started` component

copygirl 1 month ago
parent e27d98b5e9
commit 85df49f5a3
  1. 8
      common/src/network/server.rs

@ -32,9 +32,11 @@ pub struct StartLocalServerCommand;
impl Command for StartLocalServerCommand { impl Command for StartLocalServerCommand {
fn apply(self, world: &mut World) { fn apply(self, world: &mut World) {
world world.spawn((
.spawn((Server::default(), Name::from("Server"), RawServer)) Server::default(),
.trigger(|entity| Start { entity }); Name::from("LocalServer"),
Started, // yeah it's started, alright
));
} }
} }

Loading…
Cancel
Save