equal
deleted
inserted
replaced
1 use integral_geometry::{Point, Rect, Size}; |
1 use integral_geometry::{Size}; |
2 use land2d::Land2D; |
2 |
3 use landgen::{wavefront_collapse::generator::*, LandGenerationParameters}; |
3 use landgen::{wavefront_collapse::generator::*}; |
4 use serde_derive::Deserialize; |
4 use serde_derive::Deserialize; |
5 use serde_yaml; |
5 |
6 use std::{borrow::Borrow, collections::hash_map::HashMap, mem::replace}; |
6 use std::{collections::hash_map::HashMap}; |
7 |
7 |
8 #[derive(Deserialize)] |
8 #[derive(Deserialize)] |
9 #[serde(remote = "EdgeDescription")] |
9 #[serde(remote = "EdgeDescription")] |
10 pub struct EdgeDesc { |
10 pub struct EdgeDesc { |
11 pub name: String, |
11 pub name: String, |
30 #[serde(remote = "TileDescription")] |
30 #[serde(remote = "TileDescription")] |
31 pub struct TileDesc { |
31 pub struct TileDesc { |
32 pub name: String, |
32 pub name: String, |
33 #[serde(with = "EdgesDesc")] |
33 #[serde(with = "EdgesDesc")] |
34 pub edges: EdgesDescription, |
34 pub edges: EdgesDescription, |
|
35 pub is_negative: bool, |
35 pub can_flip: bool, |
36 pub can_flip: bool, |
36 pub can_mirror: bool, |
37 pub can_mirror: bool, |
37 pub can_rotate90: bool, |
38 pub can_rotate90: bool, |
38 pub can_rotate180: bool, |
39 pub can_rotate180: bool, |
39 pub can_rotate270: bool, |
40 pub can_rotate270: bool, |
44 |
45 |
45 #[derive(Deserialize)] |
46 #[derive(Deserialize)] |
46 pub struct TemplateDesc { |
47 pub struct TemplateDesc { |
47 pub width: usize, |
48 pub width: usize, |
48 pub height: usize, |
49 pub height: usize, |
49 pub can_flip: bool, |
50 pub can_invert: bool, |
50 pub is_negative: bool, |
51 pub is_negative: bool, |
51 pub put_girders: bool, |
52 pub put_girders: bool, |
52 pub max_hedgehogs: u8, |
53 pub max_hedgehogs: u8, |
53 pub tiles: Vec<TileDescriptionHelper>, |
54 pub tiles: Vec<TileDescriptionHelper>, |
54 } |
55 } |