add db, log wins to db, other stuff
parent
5e7f5ca9d5
commit
ffef337187
@ -1,9 +1,9 @@
|
|||||||
# TODO
|
# TODO
|
||||||
- Implement waiting room system [✔️]
|
- Implement waiting room system [✔️]
|
||||||
- Chat [✔️]
|
- Chat [✔️]
|
||||||
|
- Wins leaderboard using a database [✔️]
|
||||||
- Make the game automatically start
|
- Make the game automatically start
|
||||||
- Make spectator mode work properly
|
- Make spectator mode work properly
|
||||||
- Maybe make the floors use a random block each round?
|
- Maybe make the floors use a random block each round?
|
||||||
- Leaderboards using a database, probably Surreal
|
|
||||||
- Maybe some kind of events that can randomly happen? Could be a cool mechanic that other spleef servers (probably) don't have
|
- Maybe some kind of events that can randomly happen? Could be a cool mechanic that other spleef servers (probably) don't have
|
||||||
- Eventually add world support for nicer looking arenas
|
- Eventually add world support for nicer looking arenas
|
@ -0,0 +1,12 @@
|
|||||||
|
use crate::config::CONFIG;
|
||||||
|
use valence::bevy_ecs::{self, prelude::*};
|
||||||
|
|
||||||
|
#[derive(Resource)]
|
||||||
|
pub struct Connection(pub redis::Connection);
|
||||||
|
|
||||||
|
pub fn setup(mut commands: Commands) {
|
||||||
|
let client = redis::Client::open(CONFIG.db.address.clone()).unwrap();
|
||||||
|
let connection = client.get_connection().unwrap();
|
||||||
|
|
||||||
|
commands.insert_resource(Connection(connection));
|
||||||
|
}
|
Loading…
Reference in new issue