Merge branch 'xacrimon/revised-specs-storage' into 'master'

Rework specs storage types

See merge request veloren/veloren!382
This commit is contained in:
Joshua Barretto 2019-07-31 09:57:07 +00:00
commit a591ac7dd5
14 changed files with 118 additions and 47 deletions

90
Cargo.lock generated
View File

@ -305,7 +305,7 @@ name = "cgl"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1098,11 +1098,21 @@ dependencies = [
]
[[package]]
name = "gleam"
version = "0.6.18"
name = "gl_generator"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gleam"
version = "0.6.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gl_generator 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1164,7 +1174,7 @@ dependencies = [
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1458,6 +1468,14 @@ dependencies = [
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "lock_api"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.3.9"
@ -1889,6 +1907,16 @@ dependencies = [
"parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parking_lot"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parking_lot_core"
version = "0.3.1"
@ -1913,6 +1941,21 @@ dependencies = [
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "parking_lot_core"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
"cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "peeking_take_while"
version = "0.1.2"
@ -1920,7 +1963,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "percent-encoding"
version = "1.0.1"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -2581,10 +2624,19 @@ dependencies = [
"tuple_utils 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "specs-idvs"
version = "0.1.0"
source = "git+http://gitlab.nebulanet.cc/xacrimon/specs-idvs.git#0a61720de65311840804cce31b4344747dff1df0"
dependencies = [
"hibitset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"specs 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "sphynx"
version = "0.1.0"
source = "git+https://gitlab.com/veloren/sphynx.git#11cdc7422568aaabd376c87242a60f636e68b40d"
source = "git+https://gitlab.com/veloren/sphynx.git?rev=11cdc7422568aaabd376c87242a60f636e68b40d#11cdc7422568aaabd376c87242a60f636e68b40d"
dependencies = [
"serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2867,7 +2919,8 @@ dependencies = [
"serde_derive 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)",
"specs 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)",
"sphynx 0.1.0 (git+https://gitlab.com/veloren/sphynx.git)",
"specs-idvs 0.1.0 (git+http://gitlab.nebulanet.cc/xacrimon/specs-idvs.git)",
"sphynx 0.1.0 (git+https://gitlab.com/veloren/sphynx.git?rev=11cdc7422568aaabd376c87242a60f636e68b40d)",
"vek 0.9.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -2941,7 +2994,7 @@ dependencies = [
"veloren-client 0.2.0",
"veloren-common 0.2.0",
"veloren-server 0.2.0",
"winit 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -3088,7 +3141,7 @@ dependencies = [
[[package]]
name = "winit"
version = "0.19.1"
version = "0.19.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3101,8 +3154,8 @@ dependencies = [
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"objc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.98 (registry+https://github.com/rust-lang/crates.io-index)",
"smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3262,7 +3315,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum gio 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2db9fad8f1b0d4c7338a210a6cbdf081dcc1a3c223718c698c4f313f6c288acb"
"checksum gio-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2a57872499171d279f8577ce83837da4cae62b08dd32892236ed67ab7ea61030"
"checksum gl_generator 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "39a23d5e872a275135d66895d954269cf5e8661d234eb1c2480f4ce0d586acbd"
"checksum gleam 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "c8a455b5a3ccd35daeb89fdb8a89ebb0a1fe23c05c7a7f9017840bc3ae176f71"
"checksum gl_generator 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1c08ca9be9c177722189cd6a956c9e604563a9c689587b548a8cd7d1d865b022"
"checksum gleam 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cae10d7c99d0e77b4766e850a60898a17c1abaf01075531f1066f03dc7dc5fc5"
"checksum glib 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5e0be1b1432e227bcd1a9b28db9dc1474a7e7fd4227e08e16f35304f32d09b61"
"checksum glib-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615bef979b5838526aee99241afc80cfb2e34a8735d4bcb8ec6072598c18a408"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
@ -3301,6 +3355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum line_drawing 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5cc7ad3d82c845bdb5dde34ffdcc7a5fb4d2996e1e1ee0f19c33bc80e15196b9"
"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
"checksum lz4-compress 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f966533a922a9bba9e95e594c1fdb3b9bf5fdcdb11e37e51ad84cd76e468b91"
@ -3349,10 +3404,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum pango-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94039b3921a4af4058a3e4335e5d15099101f298a92f5afc40bab3a3027594a1"
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337"
"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7"
"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c"
"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9"
"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c"
"checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
"checksum percent-encoding 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba4f28a6faf4ffea762ba8f4baef48c61a6db348647c73095034041fc79dd954"
"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
"checksum piston-float 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b058c3a640efd4bcf63266512e4bb03187192c1b29edd38b16d5a014613e3199"
"checksum piston-viewport 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d96dd995f7dabe6d57cda668ec0fda39d6fe6e1e0b23f772582f383f2013611"
@ -3426,7 +3483,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
"checksum smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2ccb8c57049b2a34d2cc2b203fa785020ba0129d31920ef0d317430adaf748fa"
"checksum specs 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "de65613ada4338aa7ba71eca60eca24c60483433eec0077bc4f33cfc31f4bdf0"
"checksum sphynx 0.1.0 (git+https://gitlab.com/veloren/sphynx.git)" = "<none>"
"checksum specs-idvs 0.1.0 (git+http://gitlab.nebulanet.cc/xacrimon/specs-idvs.git)" = "<none>"
"checksum sphynx 0.1.0 (git+https://gitlab.com/veloren/sphynx.git?rev=11cdc7422568aaabd376c87242a60f636e68b40d)" = "<none>"
"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
"checksum static_assertions 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c19be23126415861cb3a23e501d34a708f7f9b2183c5252d690941c2e69199d5"
"checksum stb_truetype 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "69b7df505db8e81d54ff8be4693421e5b543e08214bd8d99eb761fcb4d5668ba"
@ -3473,7 +3531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba"
"checksum winit 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d233301129ddd33260b47f76900b50e154b7254546e2edba0e5468a1a5fe4de3"
"checksum winit 0.19.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd67dc9e0f9e13da393d9b6fa13042f3aed9b2bb2db6717d72d4cc271970c415"
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
"checksum x11-dl 2.18.3 (registry+https://github.com/rust-lang/crates.io-index)" = "940586acb859ea05c53971ac231685799a7ec1dee66ac0bccc0e6ad96e06b4e3"
"checksum xdg 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d089681aa106a86fade1b0128fb5daf07d5867a509ab036d99988dec80429a57"

View File

@ -5,7 +5,8 @@ authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>", "Maciej Ćwięka <mc
edition = "2018"
[dependencies]
sphynx = { git = "https://gitlab.com/veloren/sphynx.git", features = ["serde1"] }
sphynx = { git = "https://gitlab.com/veloren/sphynx.git", features = ["serde1"], rev = "11cdc7422568aaabd376c87242a60f636e68b40d" }
specs-idvs = { git = "http://gitlab.nebulanet.cc/xacrimon/specs-idvs.git" }
specs = { version = "0.14.2", features = ["serde", "nightly"] }
vek = { version = "0.9.8", features = ["serde"] }

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage, HashMapStorage};
use specs_idvs::IDVStorage;
#[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActionState {
@ -24,5 +25,5 @@ impl Default for ActionState {
}
impl Component for ActionState {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, HashMapStorage<Self>>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, Entity as EcsEntity, VecStorage};
use specs::{Component, Entity as EcsEntity};
use specs_idvs::IDVStorage;
use vek::*;
#[derive(Copy, Clone, Debug)]
@ -14,5 +15,5 @@ pub enum Agent {
}
impl Component for Agent {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Animation {
@ -29,5 +30,5 @@ impl Default for AnimationInfo {
}
impl Component for AnimationInfo {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}

View File

@ -3,7 +3,8 @@ pub mod object;
pub mod quadruped;
pub mod quadruped_medium;
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Body {
@ -14,5 +15,5 @@ pub enum Body {
}
impl Component for Body {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
use vek::*;
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
@ -12,5 +13,5 @@ pub struct Controller {
}
impl Component for Controller {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, NullStorage, VecStorage};
use specs::{Component, FlaggedStorage, NullStorage};
use specs_idvs::IDVStorage;
use vek::*;
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
@ -69,19 +70,19 @@ impl Rolling {
}
impl Component for MoveDir {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}
impl Component for Wielding {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}
impl Component for Attacking {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}
impl Component for Rolling {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}
impl Component for OnGround {

View File

@ -1,4 +1,5 @@
use specs::{Component, VecStorage};
use specs::Component;
use specs_idvs::IDVStorage;
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Weapon {
@ -60,5 +61,5 @@ pub enum Item {
}
impl Component for Item {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, VecStorage};
use specs::{Component, HashMapStorage};
use specs_idvs::IDVStorage;
//Re-Exports
pub mod item;
@ -42,5 +43,5 @@ impl Inventory {
}
impl Component for Inventory {
type Storage = VecStorage<Self>;
type Storage = HashMapStorage<Self>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, NullStorage, VecStorage};
use specs::{Component, NullStorage};
use specs_idvs::IDVStorage;
use vek::*;
// Position
@ -6,7 +7,7 @@ use vek::*;
pub struct Pos(pub Vec3<f32>);
impl Component for Pos {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}
// Velocity
@ -14,7 +15,7 @@ impl Component for Pos {
pub struct Vel(pub Vec3<f32>);
impl Component for Vel {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}
// Orientation
@ -22,7 +23,7 @@ impl Component for Vel {
pub struct Ori(pub Vec3<f32>);
impl Component for Ori {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}
// ForceUpdate

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, NullStorage, VecStorage};
use specs::{Component, FlaggedStorage, NullStorage};
use specs_idvs::IDVStorage;
const MAX_ALIAS_LEN: usize = 32;
@ -23,7 +24,7 @@ impl Player {
}
impl Component for Player {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}
#[derive(Clone, Debug, Default, Serialize, Deserialize)]

View File

@ -1,5 +1,6 @@
use crate::state::Uid;
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
#[derive(Clone, Copy, Debug, Serialize, Deserialize)]
pub enum HealthSource {
@ -129,7 +130,7 @@ impl Stats {
}
impl Component for Stats {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
@ -138,5 +139,5 @@ pub struct Dying {
}
impl Component for Dying {
type Storage = VecStorage<Self>;
type Storage = IDVStorage<Self>;
}

View File

@ -1,4 +1,5 @@
use specs::{Component, FlaggedStorage, VecStorage};
use specs::{Component, FlaggedStorage};
use specs_idvs::IDVStorage;
use vek::*;
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
@ -19,5 +20,5 @@ impl Default for LightEmitter {
}
impl Component for LightEmitter {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
}