mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Move states/ to common/src/
This commit is contained in:
parent
563e50b67d
commit
1816d4b805
@ -1,5 +1,5 @@
|
||||
use self::ActionState::*;
|
||||
use super::states::*;
|
||||
use crate::states::*;
|
||||
use crate::{
|
||||
comp::{Body, ControllerInputs, Ori, PhysicsState, Pos, Stats, Vel},
|
||||
event::{EventBus, LocalEvent, ServerEvent},
|
||||
|
@ -11,7 +11,6 @@ mod location;
|
||||
mod phys;
|
||||
mod player;
|
||||
pub mod projectile;
|
||||
pub mod states;
|
||||
mod stats;
|
||||
mod visual;
|
||||
|
||||
@ -40,6 +39,5 @@ pub use location::Waypoint;
|
||||
pub use phys::{ForceUpdate, Gravity, Mass, Ori, PhysicsState, Pos, Scale, Sticky, Vel};
|
||||
pub use player::Player;
|
||||
pub use projectile::Projectile;
|
||||
pub use states::*;
|
||||
pub use stats::{Equipment, Exp, HealthChange, HealthSource, Level, Stats};
|
||||
pub use visual::LightEmitter;
|
||||
|
@ -20,6 +20,7 @@ pub mod pathfinding;
|
||||
pub mod ray;
|
||||
pub mod region;
|
||||
pub mod state;
|
||||
pub mod states;
|
||||
pub mod sys;
|
||||
pub mod terrain;
|
||||
pub mod util;
|
||||
|
@ -1,8 +1,10 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{
|
||||
ActionState::Attack, AttackKind::BasicAttack, EcsStateData, ItemKind::Tool, StateHandler,
|
||||
StateUpdate, ToolData,
|
||||
ActionState::Attack, AttackKind::BasicAttack, EcsStateData, ItemKind::Tool, StateUpdate,
|
||||
ToolData,
|
||||
};
|
||||
use crate::states::StateHandler;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize, Eq, Hash)]
|
@ -1,5 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{EcsStateData, StateHandler, StateUpdate};
|
||||
use crate::comp::{EcsStateData, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
use std::time::Duration;
|
||||
use vek::Vec2;
|
||||
|
@ -1,9 +1,10 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{
|
||||
ActionState::Attack, AttackKind::Charge, EcsStateData, HealthChange, HealthSource,
|
||||
ItemKind::Tool, MoveState::Run, StateHandler, StateUpdate, ToolData,
|
||||
ItemKind::Tool, MoveState::Run, StateUpdate, ToolData,
|
||||
};
|
||||
use crate::event::ServerEvent;
|
||||
use crate::states::StateHandler;
|
||||
use std::time::Duration;
|
||||
use vek::Vec3;
|
||||
|
@ -1,6 +1,7 @@
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateUpdate};
|
||||
|
||||
use super::utils::*;
|
||||
use crate::states::StateHandler;
|
||||
use vek::{Vec2, Vec3};
|
||||
|
||||
const HUMANOID_AIR_ACCEL: f32 = 10.0;
|
@ -1,4 +1,5 @@
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
use vek::{Vec2, Vec3};
|
||||
|
||||
// Gravity is 9.81 * 4, so this makes gravity equal to .15
|
@ -1,5 +1,6 @@
|
||||
use crate::comp::{ActionState, EcsStateData, ItemKind::Tool, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, ItemKind::Tool, StateUpdate};
|
||||
|
||||
use crate::states::StateHandler;
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize, Eq, Hash)]
|
||||
pub struct State;
|
||||
|
@ -15,7 +15,7 @@ pub mod swim;
|
||||
pub mod utils;
|
||||
pub mod wield;
|
||||
|
||||
use super::{
|
||||
use crate::comp::{
|
||||
ActionState, ActionState::*, AttackKind::*, BlockKind::*, DodgeKind::*, EcsStateData,
|
||||
MoveState, MoveState::*, StateUpdate,
|
||||
};
|
@ -1,8 +1,8 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{
|
||||
ActionState::Dodge, DodgeKind::Roll, EcsStateData, ItemKind::Tool, StateHandler, StateUpdate,
|
||||
ToolData,
|
||||
ActionState::Dodge, DodgeKind::Roll, EcsStateData, ItemKind::Tool, StateUpdate, ToolData,
|
||||
};
|
||||
use crate::states::StateHandler;
|
||||
use std::time::Duration;
|
||||
use vek::Vec3;
|
||||
|
@ -1,5 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
use vek::vec::{Vec2, Vec3};
|
||||
|
||||
const HUMANOID_ACCEL: f32 = 50.0;
|
@ -1,5 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize, Eq, Hash)]
|
||||
pub struct State;
|
@ -1,5 +1,6 @@
|
||||
use super::utils::*;
|
||||
use crate::comp::{EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{EcsStateData, MoveState, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize, Eq, Hash)]
|
||||
pub struct State;
|
@ -1,4 +1,5 @@
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateHandler, StateUpdate};
|
||||
use crate::comp::{ActionState, EcsStateData, MoveState, StateUpdate};
|
||||
use crate::states::StateHandler;
|
||||
use crate::sys::phys::GRAVITY;
|
||||
use std::time::Duration;
|
||||
use vek::{Vec2, Vec3};
|
@ -1,4 +1,5 @@
|
||||
use crate::comp::{ActionState, EcsStateData, ItemKind::Tool, StateHandler, StateUpdate, ToolData};
|
||||
use crate::comp::{ActionState, EcsStateData, ItemKind::Tool, StateUpdate, ToolData};
|
||||
use crate::states::StateHandler;
|
||||
use std::time::Duration;
|
||||
|
||||
#[derive(Clone, Copy, Default, Debug, PartialEq, Serialize, Deserialize, Eq, Hash)]
|
@ -2,8 +2,8 @@
|
||||
#![allow(dead_code)]
|
||||
use crate::comp::{
|
||||
AbilityAction, AbilityActionKind, AbilityPool, ActionState::*, AttackKind, CharacterState,
|
||||
StateHandler,
|
||||
};
|
||||
use crate::states::StateHandler;
|
||||
|
||||
use specs::{Entities, Join, LazyUpdate, Read, ReadStorage, System, WriteStorage};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user