lazy fix for startup crash
This commit is contained in:
parent
7ffef5522b
commit
bf23dbaf80
2 changed files with 7 additions and 0 deletions
|
|
@ -45,6 +45,7 @@
|
|||
];
|
||||
env.LD_LIBRARY_PATH = lib.makeLibraryPath packages;
|
||||
env.RUST_LOG = "jong=trace";
|
||||
env.RUST_BACKTRACE = "full";
|
||||
|
||||
# https://devenv.sh/languages/
|
||||
languages.rust = {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use bevy::prelude::*;
|
||||
use bevy_spacetimedb::{ReadInsertMessage, ReadInsertUpdateMessage, ReadUpdateMessage, StdbPlugin};
|
||||
|
||||
|
|
@ -74,6 +76,10 @@ impl Plugin for Riichi {
|
|||
/// spawn all hands and ponds
|
||||
|
||||
fn subscriptions(stdb: SpacetimeDB, mut commands: Commands) {
|
||||
while stdb.try_identity().is_none() {
|
||||
bevy::platform::thread::sleep(Duration::from_secs(1));
|
||||
}
|
||||
|
||||
let (tx, rx) = std::sync::mpsc::channel();
|
||||
stdb.subscription_builder()
|
||||
.on_applied(move |_| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue