diff options
| author | troido <troido@protonmail.com> | 2020-09-26 00:05:03 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-09-26 00:05:03 +0200 |
| commit | 345251f20401a71f7e7e00f4810b92af39ad4395 (patch) | |
| tree | 4f1f64a4f09e81fb98bb786865d5164048440321 /src/resources | |
| parent | 9e2aa0f98cb93ea79db023f1309e083e59192293 (diff) | |
use flags for the whole room instead of room permissions
the flags on a tile are the union of the flags from the entity on that tile and the room flags
Diffstat (limited to 'src/resources')
| -rw-r--r-- | src/resources/mod.rs | 5 | ||||
| -rw-r--r-- | src/resources/roompermissions.rs | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/src/resources/mod.rs b/src/resources/mod.rs index 025bc6e..b65ca86 100644 --- a/src/resources/mod.rs +++ b/src/resources/mod.rs @@ -1,13 +1,12 @@ mod ground; mod newentities; -mod roompermissions; pub use ground::Ground; pub use newentities::NewEntities; -pub use roompermissions::RoomPermissions; use std::collections::{HashMap, HashSet}; +use serde::{Serialize, Deserialize}; use specs::{Entity}; use crate::{ @@ -59,6 +58,6 @@ pub struct Time { pub time: Timestamp } -#[derive(Default, Debug, Clone)] +#[derive(Default, Debug, Clone, Serialize, Deserialize)] pub struct RoomFlags(pub HashSet<Flag>); diff --git a/src/resources/roompermissions.rs b/src/resources/roompermissions.rs deleted file mode 100644 index e3646f3..0000000 --- a/src/resources/roompermissions.rs +++ /dev/null @@ -1,8 +0,0 @@ - -use serde::{Deserialize, Serialize}; - -#[derive(Default, Debug, Clone, Deserialize, Serialize)] -pub struct RoomPermissions { - #[serde(default)] - pub build: bool -} |
