get edh
This commit is contained in:
parent
f307fea63c
commit
63c700f12d
@ -3,6 +3,7 @@ use ron::de::from_str;
|
|||||||
use crate::device::Status;
|
use crate::device::Status;
|
||||||
use crate::errors::{LJError, LJResult};
|
use crate::errors::{LJError, LJResult};
|
||||||
use crate::worldstate::{WorldState,EDH};
|
use crate::worldstate::{WorldState,EDH};
|
||||||
|
use log::info;
|
||||||
|
|
||||||
#[repr(u8)]
|
#[repr(u8)]
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
@ -99,7 +100,13 @@ impl RedisCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn init_world_state( &mut self) -> LJResult<WorldState>{
|
pub fn init_world_state( &mut self) -> LJResult<WorldState>{
|
||||||
Ok(WorldState::default())
|
let edh = self.get_edh()?;
|
||||||
|
info!("EDH: {:?}", edh);
|
||||||
|
|
||||||
|
Ok(WorldState {
|
||||||
|
edh,
|
||||||
|
..WorldState::default()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_edh( &mut self ) -> LJResult<EDH> {
|
pub fn get_edh( &mut self ) -> LJResult<EDH> {
|
||||||
|
Loading…
Reference in New Issue
Block a user