2019-01-11 23:18:34 +00:00
|
|
|
use crate::{
|
2019-05-23 09:30:46 +00:00
|
|
|
hud::{DebugInfo, Event as HudEvent, Hud},
|
2019-03-02 03:48:30 +00:00
|
|
|
key_state::KeyState,
|
2019-01-11 23:18:34 +00:00
|
|
|
render::Renderer,
|
|
|
|
scene::Scene,
|
2019-04-25 15:32:59 +00:00
|
|
|
settings::Settings,
|
2019-05-25 14:39:27 +00:00
|
|
|
window::{Event, GameInput, Window},
|
2019-04-29 20:37:19 +00:00
|
|
|
Direction, Error, GlobalState, PlayState, PlayStateResult,
|
2019-01-11 23:18:34 +00:00
|
|
|
};
|
2019-05-22 20:53:24 +00:00
|
|
|
use client::{self, Client};
|
2019-07-04 19:59:57 +00:00
|
|
|
use common::{clock::Clock, comp, comp::Pos, msg::ClientState, terrain::Block, vol::ReadVol};
|
2019-06-06 14:48:41 +00:00
|
|
|
use log::{error, warn};
|
|
|
|
use std::{cell::RefCell, rc::Rc, time::Duration};
|
2019-05-09 17:58:16 +00:00
|
|
|
use vek::*;
|
2019-01-11 23:18:34 +00:00
|
|
|
|
|
|
|
pub struct SessionState {
|
|
|
|
scene: Scene,
|
2019-04-04 14:45:57 +00:00
|
|
|
client: Rc<RefCell<Client>>,
|
2019-03-15 04:55:52 +00:00
|
|
|
hud: Hud,
|
2019-06-09 14:20:20 +00:00
|
|
|
key_state: KeyState,
|
|
|
|
controller: comp::Controller,
|
2019-07-04 19:59:57 +00:00
|
|
|
selected_block: Block,
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
/// Represents an active game session (i.e., the one being played).
|
2019-01-11 23:18:34 +00:00
|
|
|
impl SessionState {
|
2019-05-17 09:22:32 +00:00
|
|
|
/// Create a new `SessionState`.
|
2019-07-02 21:29:38 +00:00
|
|
|
pub fn new(window: &mut Window, client: Rc<RefCell<Client>>, _settings: Settings) -> Self {
|
2019-05-17 09:22:32 +00:00
|
|
|
// Create a scene for this session. The scene handles visible elements of the game world.
|
2019-07-04 12:02:26 +00:00
|
|
|
let scene = Scene::new(window.renderer_mut());
|
2019-04-04 14:45:57 +00:00
|
|
|
Self {
|
|
|
|
scene,
|
2019-01-15 15:13:11 +00:00
|
|
|
client,
|
2019-03-02 03:48:30 +00:00
|
|
|
key_state: KeyState::new(),
|
2019-06-09 14:20:20 +00:00
|
|
|
controller: comp::Controller::default(),
|
2019-05-21 01:21:31 +00:00
|
|
|
hud: Hud::new(window),
|
2019-07-04 19:59:57 +00:00
|
|
|
selected_block: Block::new(1, Rgb::broadcast(255)),
|
2019-04-04 14:45:57 +00:00
|
|
|
}
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-12 15:57:19 +00:00
|
|
|
impl SessionState {
|
2019-05-17 09:22:32 +00:00
|
|
|
/// Tick the session (and the client attached to it).
|
2019-06-09 14:20:20 +00:00
|
|
|
fn tick(&mut self, dt: Duration) -> Result<(), Error> {
|
|
|
|
for event in self.client.borrow_mut().tick(self.controller.clone(), dt)? {
|
2019-03-17 05:26:51 +00:00
|
|
|
match event {
|
|
|
|
client::Event::Chat(msg) => {
|
|
|
|
self.hud.new_message(msg);
|
|
|
|
}
|
2019-04-24 07:59:42 +00:00
|
|
|
client::Event::Disconnect => {} // TODO
|
2019-03-17 05:26:51 +00:00
|
|
|
}
|
|
|
|
}
|
2019-04-02 01:05:18 +00:00
|
|
|
|
2019-01-14 15:47:57 +00:00
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
/// Clean up the session (and the client attached to it) after a tick.
|
2019-01-23 20:01:58 +00:00
|
|
|
pub fn cleanup(&mut self) {
|
2019-04-04 14:45:57 +00:00
|
|
|
self.client.borrow_mut().cleanup();
|
2019-01-23 20:01:58 +00:00
|
|
|
}
|
|
|
|
|
2019-01-12 15:57:19 +00:00
|
|
|
/// Render the session to the screen.
|
|
|
|
///
|
|
|
|
/// This method should be called once per frame.
|
|
|
|
pub fn render(&mut self, renderer: &mut Renderer) {
|
|
|
|
// Clear the screen
|
2019-07-04 12:02:26 +00:00
|
|
|
renderer.clear();
|
2019-01-12 15:57:19 +00:00
|
|
|
|
|
|
|
// Render the screen using the global renderer
|
2019-04-23 11:55:48 +00:00
|
|
|
self.scene.render(renderer, &mut self.client.borrow_mut());
|
2019-02-16 03:01:42 +00:00
|
|
|
// Draw the UI to the screen
|
2019-05-14 06:43:07 +00:00
|
|
|
self.hud.render(renderer, self.scene.globals());
|
2019-01-12 15:57:19 +00:00
|
|
|
|
|
|
|
// Finish the frame
|
|
|
|
renderer.flush();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-11 23:18:34 +00:00
|
|
|
impl PlayState for SessionState {
|
2019-04-27 20:55:30 +00:00
|
|
|
fn play(&mut self, _: Direction, global_state: &mut GlobalState) -> PlayStateResult {
|
2019-05-17 09:22:32 +00:00
|
|
|
// Trap the cursor.
|
2019-01-23 22:21:47 +00:00
|
|
|
global_state.window.grab_cursor(true);
|
2019-01-12 01:14:58 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Set up an fps clock.
|
2019-07-01 20:42:43 +00:00
|
|
|
let mut clock = Clock::start();
|
2019-05-25 12:23:56 +00:00
|
|
|
self.client.borrow_mut().clear_terrain();
|
2019-01-12 15:57:19 +00:00
|
|
|
|
2019-07-18 22:50:46 +00:00
|
|
|
// Send startup commands to the server
|
|
|
|
if global_state.settings.send_logon_commands {
|
|
|
|
for cmd in &global_state.settings.logon_commands {
|
|
|
|
self.client.borrow_mut().send_chat(cmd.to_string());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-11 23:18:34 +00:00
|
|
|
// Game loop
|
2019-05-24 19:10:18 +00:00
|
|
|
let mut current_client_state = self.client.borrow().get_client_state();
|
2019-05-24 19:20:28 +00:00
|
|
|
while let ClientState::Pending | ClientState::Character | ClientState::Dead =
|
|
|
|
current_client_state
|
|
|
|
{
|
2019-05-17 09:22:32 +00:00
|
|
|
// Handle window events.
|
2019-01-11 23:18:34 +00:00
|
|
|
for event in global_state.window.fetch_events() {
|
2019-05-17 09:22:32 +00:00
|
|
|
// Pass all events to the ui first.
|
2019-04-20 18:08:39 +00:00
|
|
|
if self.hud.handle_event(event.clone(), global_state) {
|
2019-03-22 03:55:42 +00:00
|
|
|
continue;
|
|
|
|
}
|
2019-05-23 15:14:39 +00:00
|
|
|
|
|
|
|
match event {
|
2019-04-17 15:22:26 +00:00
|
|
|
Event::Close => {
|
|
|
|
return PlayStateResult::Shutdown;
|
2019-04-29 20:37:19 +00:00
|
|
|
}
|
2019-06-09 14:20:20 +00:00
|
|
|
Event::InputUpdate(GameInput::Attack, state) => {
|
2019-07-04 18:14:14 +00:00
|
|
|
self.controller.respawn = state; // TODO: Move this into separate GameInput
|
|
|
|
|
2019-07-03 17:55:56 +00:00
|
|
|
// Check the existence of CanBuild component. If it's here, use LMB to
|
|
|
|
// place blocks, if not, use it to attack
|
2019-07-04 18:14:14 +00:00
|
|
|
let mut client = self.client.borrow_mut();
|
|
|
|
if state
|
|
|
|
&& client
|
2019-07-03 20:28:13 +00:00
|
|
|
.state()
|
|
|
|
.read_storage::<comp::CanBuild>()
|
|
|
|
.get(client.entity())
|
|
|
|
.is_some()
|
2019-07-04 18:14:14 +00:00
|
|
|
{
|
|
|
|
let cam_pos = self.scene.camera().compute_dependents(&client).2;
|
|
|
|
let cam_dir =
|
|
|
|
(self.scene.camera().get_focus_pos() - cam_pos).normalized();
|
|
|
|
|
|
|
|
let (d, b) = {
|
|
|
|
let terrain = client.state().terrain();
|
|
|
|
let ray = terrain.ray(cam_pos, cam_pos + cam_dir * 100.0).cast();
|
|
|
|
(ray.0, if let Ok(Some(_)) = ray.1 { true } else { false })
|
|
|
|
};
|
|
|
|
|
|
|
|
if b {
|
|
|
|
let pos =
|
|
|
|
(cam_pos + cam_dir * (d - 0.01)).map(|e| e.floor() as i32);
|
2019-07-23 19:40:56 +00:00
|
|
|
client.place_block(pos, self.selected_block);
|
2019-07-03 17:55:56 +00:00
|
|
|
}
|
2019-07-03 20:28:13 +00:00
|
|
|
} else {
|
2019-07-04 18:14:14 +00:00
|
|
|
self.controller.attack = state
|
2019-07-03 17:55:56 +00:00
|
|
|
}
|
|
|
|
}
|
2019-07-04 18:14:14 +00:00
|
|
|
|
2019-07-03 17:55:56 +00:00
|
|
|
Event::InputUpdate(GameInput::SecondAttack, state) => {
|
2019-07-03 20:28:13 +00:00
|
|
|
if state {
|
|
|
|
let mut client = self.client.borrow_mut();
|
|
|
|
if client
|
|
|
|
.state()
|
|
|
|
.read_storage::<comp::CanBuild>()
|
|
|
|
.get(client.entity())
|
|
|
|
.is_some()
|
|
|
|
{
|
2019-07-04 12:02:26 +00:00
|
|
|
let cam_pos = self.scene.camera().compute_dependents(&client).2;
|
2019-07-03 19:56:54 +00:00
|
|
|
let cam_dir =
|
|
|
|
(self.scene.camera().get_focus_pos() - cam_pos).normalized();
|
|
|
|
|
|
|
|
let (d, b) = {
|
|
|
|
let terrain = client.state().terrain();
|
|
|
|
let ray =
|
|
|
|
terrain.ray(cam_pos, cam_pos + cam_dir * 100.0).cast();
|
|
|
|
(ray.0, if let Ok(Some(_)) = ray.1 { true } else { false })
|
|
|
|
};
|
|
|
|
|
2019-07-03 20:28:13 +00:00
|
|
|
if b {
|
|
|
|
let pos = (cam_pos + cam_dir * d).map(|e| e.floor() as i32);
|
|
|
|
client.remove_block(pos);
|
2019-07-03 19:56:54 +00:00
|
|
|
}
|
2019-07-03 20:28:13 +00:00
|
|
|
} else {
|
|
|
|
// TODO: Handle secondary attack
|
2019-06-30 20:25:37 +00:00
|
|
|
}
|
|
|
|
}
|
2019-05-25 21:13:38 +00:00
|
|
|
}
|
2019-06-11 04:08:55 +00:00
|
|
|
Event::InputUpdate(GameInput::Roll, state) => {
|
2019-07-04 19:59:57 +00:00
|
|
|
let client = self.client.borrow();
|
|
|
|
if client
|
|
|
|
.state()
|
|
|
|
.read_storage::<comp::CanBuild>()
|
|
|
|
.get(client.entity())
|
|
|
|
.is_some()
|
|
|
|
{
|
|
|
|
if state {
|
|
|
|
let cam_pos = self.scene.camera().compute_dependents(&client).2;
|
|
|
|
let cam_dir =
|
|
|
|
(self.scene.camera().get_focus_pos() - cam_pos).normalized();
|
|
|
|
|
2019-07-07 04:37:22 +00:00
|
|
|
if let Ok(Some(block)) = client
|
|
|
|
.state()
|
|
|
|
.terrain()
|
|
|
|
.ray(cam_pos, cam_pos + cam_dir * 100.0)
|
|
|
|
.cast()
|
|
|
|
.1
|
|
|
|
{
|
|
|
|
self.selected_block = *block;
|
2019-07-04 19:59:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
self.controller.roll = state;
|
|
|
|
}
|
2019-06-11 04:08:55 +00:00
|
|
|
}
|
2019-06-09 14:20:20 +00:00
|
|
|
Event::InputUpdate(GameInput::Jump, state) => {
|
|
|
|
self.controller.jump = state;
|
2019-05-25 22:04:40 +00:00
|
|
|
}
|
2019-05-25 14:39:27 +00:00
|
|
|
Event::InputUpdate(GameInput::MoveForward, state) => self.key_state.up = state,
|
|
|
|
Event::InputUpdate(GameInput::MoveBack, state) => self.key_state.down = state,
|
|
|
|
Event::InputUpdate(GameInput::MoveLeft, state) => self.key_state.left = state,
|
|
|
|
Event::InputUpdate(GameInput::MoveRight, state) => self.key_state.right = state,
|
2019-05-25 21:13:38 +00:00
|
|
|
Event::InputUpdate(GameInput::Glide, state) => {
|
2019-06-09 14:20:20 +00:00
|
|
|
self.controller.glide = state;
|
2019-05-25 14:39:27 +00:00
|
|
|
}
|
|
|
|
|
2019-01-12 13:56:34 +00:00
|
|
|
// Pass all other events to the scene
|
2019-04-02 01:05:18 +00:00
|
|
|
event => {
|
|
|
|
self.scene.handle_input_event(event);
|
2019-05-23 15:14:39 +00:00
|
|
|
} // TODO: Do something if the event wasn't handled?
|
|
|
|
}
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|
|
|
|
|
2019-06-09 14:20:20 +00:00
|
|
|
// Calculate the movement input vector of the player from the current key presses
|
|
|
|
// and the camera direction.
|
|
|
|
let ori = self.scene.camera().get_orientation();
|
|
|
|
let unit_vecs = (
|
|
|
|
Vec2::new(ori[0].cos(), -ori[0].sin()),
|
|
|
|
Vec2::new(ori[0].sin(), ori[0].cos()),
|
|
|
|
);
|
|
|
|
let dir_vec = self.key_state.dir_vec();
|
|
|
|
self.controller.move_dir = unit_vecs.0 * dir_vec[0] + unit_vecs.1 * dir_vec[1];
|
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Perform an in-game tick.
|
2019-06-25 21:00:26 +00:00
|
|
|
if let Err(err) = self.tick(clock.get_avg_delta()) {
|
2019-06-06 14:48:41 +00:00
|
|
|
error!("Failed to tick the scene: {:?}", err);
|
2019-05-26 09:21:51 +00:00
|
|
|
return PlayStateResult::Pop;
|
|
|
|
}
|
2019-01-11 23:18:34 +00:00
|
|
|
|
2019-06-05 15:57:48 +00:00
|
|
|
// Maintain global state.
|
2019-05-18 20:10:02 +00:00
|
|
|
global_state.maintain();
|
|
|
|
|
2019-06-05 15:57:48 +00:00
|
|
|
// Extract HUD events ensuring the client borrow gets dropped.
|
2019-05-23 09:30:46 +00:00
|
|
|
let hud_events = self.hud.maintain(
|
2019-05-14 06:43:07 +00:00
|
|
|
&self.client.borrow(),
|
2019-05-23 08:18:25 +00:00
|
|
|
global_state,
|
2019-05-23 09:30:46 +00:00
|
|
|
DebugInfo {
|
|
|
|
tps: clock.get_tps(),
|
|
|
|
ping_ms: self.client.borrow().get_ping_ms(),
|
2019-05-28 18:23:24 +00:00
|
|
|
coordinates: self
|
|
|
|
.client
|
|
|
|
.borrow()
|
|
|
|
.state()
|
|
|
|
.ecs()
|
|
|
|
.read_storage::<Pos>()
|
|
|
|
.get(self.client.borrow().entity())
|
2019-05-28 19:40:50 +00:00
|
|
|
.cloned(),
|
2019-05-23 09:30:46 +00:00
|
|
|
},
|
2019-05-20 06:09:20 +00:00
|
|
|
&self.scene.camera(),
|
2019-05-23 09:30:46 +00:00
|
|
|
);
|
2019-06-05 15:57:48 +00:00
|
|
|
|
2019-05-23 09:30:46 +00:00
|
|
|
// Maintain the UI.
|
|
|
|
for event in hud_events {
|
2019-03-16 02:03:21 +00:00
|
|
|
match event {
|
2019-03-17 05:26:51 +00:00
|
|
|
HudEvent::SendMessage(msg) => {
|
|
|
|
// TODO: Handle result
|
2019-04-04 14:45:57 +00:00
|
|
|
self.client.borrow_mut().send_chat(msg);
|
2019-04-29 20:37:19 +00:00
|
|
|
}
|
2019-06-02 02:17:36 +00:00
|
|
|
HudEvent::CharacterSelection => {
|
|
|
|
self.client.borrow_mut().request_remove_character()
|
|
|
|
}
|
|
|
|
HudEvent::Logout => self.client.borrow_mut().request_logout(),
|
2019-04-17 15:22:26 +00:00
|
|
|
HudEvent::Quit => {
|
|
|
|
return PlayStateResult::Shutdown;
|
2019-04-29 20:37:19 +00:00
|
|
|
}
|
2019-06-05 15:57:48 +00:00
|
|
|
HudEvent::AdjustMousePan(sensitivity) => {
|
2019-06-06 17:42:13 +00:00
|
|
|
global_state.window.pan_sensitivity = sensitivity;
|
|
|
|
global_state.settings.gameplay.pan_sensitivity = sensitivity;
|
2019-06-06 19:11:39 +00:00
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
2019-06-05 15:57:48 +00:00
|
|
|
}
|
|
|
|
HudEvent::AdjustMouseZoom(sensitivity) => {
|
2019-06-06 17:42:13 +00:00
|
|
|
global_state.window.zoom_sensitivity = sensitivity;
|
|
|
|
global_state.settings.gameplay.zoom_sensitivity = sensitivity;
|
2019-06-06 19:11:39 +00:00
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
2019-06-05 15:57:48 +00:00
|
|
|
}
|
2019-05-19 00:45:02 +00:00
|
|
|
HudEvent::AdjustViewDistance(view_distance) => {
|
2019-05-20 20:18:01 +00:00
|
|
|
self.client.borrow_mut().set_view_distance(view_distance);
|
|
|
|
|
|
|
|
global_state.settings.graphics.view_distance = view_distance;
|
2019-06-06 14:48:41 +00:00
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
2019-05-18 23:55:06 +00:00
|
|
|
}
|
2019-07-07 00:15:22 +00:00
|
|
|
HudEvent::CrosshairTransp(crosshair_transp) => {
|
|
|
|
global_state.settings.gameplay.crosshair_transp = crosshair_transp;
|
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
|
|
|
}
|
2019-07-23 01:02:57 +00:00
|
|
|
HudEvent::CrosshairType(crosshair_type) => {
|
|
|
|
global_state.settings.gameplay.crosshair_type = crosshair_type;
|
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-19 19:31:32 +00:00
|
|
|
HudEvent::AdjustVolume(volume) => {
|
2019-07-02 04:10:55 +00:00
|
|
|
global_state.audio.model.player.set_volume(volume);
|
2019-05-20 20:18:01 +00:00
|
|
|
|
|
|
|
global_state.settings.audio.music_volume = volume;
|
2019-06-06 14:48:41 +00:00
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings: {:?}", err);
|
|
|
|
}
|
2019-05-19 19:31:32 +00:00
|
|
|
}
|
2019-05-20 17:40:35 +00:00
|
|
|
HudEvent::ChangeAudioDevice(name) => {
|
2019-07-02 04:10:55 +00:00
|
|
|
global_state.audio.model.player.set_device(&name.clone());
|
2019-05-20 20:18:01 +00:00
|
|
|
|
2019-05-22 11:29:38 +00:00
|
|
|
global_state.settings.audio.audio_device = Some(name);
|
2019-06-06 14:48:41 +00:00
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings!\n{:?}", err);
|
|
|
|
}
|
2019-05-20 17:40:35 +00:00
|
|
|
}
|
2019-06-06 19:11:39 +00:00
|
|
|
HudEvent::ChangeMaxFPS(fps) => {
|
|
|
|
global_state.settings.graphics.max_fps = fps;
|
|
|
|
if let Err(err) = global_state.settings.save_to_file() {
|
|
|
|
warn!("Failed to save settings!\n{:?}", err);
|
|
|
|
}
|
|
|
|
}
|
2019-03-16 02:03:21 +00:00
|
|
|
}
|
|
|
|
}
|
2019-05-26 14:04:44 +00:00
|
|
|
|
|
|
|
// Maintain the scene.
|
|
|
|
self.scene
|
|
|
|
.maintain(global_state.window.renderer_mut(), &self.client.borrow());
|
2019-01-23 20:01:58 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Render the session.
|
2019-01-12 15:57:19 +00:00
|
|
|
self.render(global_state.window.renderer_mut());
|
2019-01-11 23:18:34 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Display the frame on the window.
|
2019-04-02 01:05:18 +00:00
|
|
|
global_state
|
|
|
|
.window
|
2019-01-12 01:14:58 +00:00
|
|
|
.swap_buffers()
|
2019-05-17 09:22:32 +00:00
|
|
|
.expect("Failed to swap window buffers!");
|
2019-01-12 15:57:19 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Wait for the next tick.
|
2019-06-06 19:11:39 +00:00
|
|
|
clock.tick(Duration::from_millis(
|
|
|
|
1000 / global_state.settings.graphics.max_fps as u64,
|
|
|
|
));
|
2019-01-23 20:01:58 +00:00
|
|
|
|
2019-05-17 09:22:32 +00:00
|
|
|
// Clean things up after the tick.
|
2019-01-23 20:01:58 +00:00
|
|
|
self.cleanup();
|
2019-05-24 19:10:18 +00:00
|
|
|
|
|
|
|
current_client_state = self.client.borrow().get_client_state();
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|
2019-05-19 17:22:35 +00:00
|
|
|
|
|
|
|
PlayStateResult::Pop
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|
|
|
|
|
2019-04-02 01:05:18 +00:00
|
|
|
fn name(&self) -> &'static str {
|
|
|
|
"Session"
|
|
|
|
}
|
2019-01-11 23:18:34 +00:00
|
|
|
}
|