Skip to content

Commit

Permalink
Use the correct type for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
InnocentusLime authored and not-fl3 committed Sep 10, 2024
1 parent e9e0e20 commit dc88b13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tiled/src/tiled/layer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use nanoserde::DeJson;

use std::collections::HashMap;

/// https://doc.mapeditor.org/en/stable/reference/json-map-format/#json-chunk
#[derive(Clone, Debug, Default, DeJson)]
#[nserde(default)]
Expand All @@ -18,14 +16,15 @@ pub struct Chunk {
pub y: i32,
}

/// https://doc.mapeditor.org/en/stable/reference/json-map-format/#json-layer
#[derive(Clone, Debug, Default, DeJson)]
#[nserde(default)]
pub struct Layer {
/// Array of chunks (optional). tilelayer only.
pub chunks: Option<Vec<Chunk>>,
pub name: String,
pub opacity: f32,
pub properties: Option<HashMap<String, String>>,
pub properties: Vec<Property>,
pub visible: bool,
pub width: u32,
pub height: u32,
Expand Down

0 comments on commit dc88b13

Please sign in to comment.