|
|
|
@ -32,9 +32,12 @@ 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"), |
|
|
|
|
|
|
|
// NOTE: Inserting both makes the local-only server act properly.
|
|
|
|
|
|
|
|
(Linked, Started), // yeah it's started, alright
|
|
|
|
|
|
|
|
)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|