diff options
author | tom barrett <spalf0@gmail.com> | 2019-07-01 09:24:59 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-07-01 09:24:59 -0500 |
commit | 1b5f06e902b9e5c5b0d5897fc981eeaa6dc39b37 (patch) | |
tree | 78a7c7acbcd01e5279a076ca0770eaaf50f7dc84 /src | |
parent | 0947ce5a918207efeaf2a4f67a1cc410795f057a (diff) |
invisible property now works
Diffstat (limited to 'src')
-rw-r--r-- | src/tileset.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tileset.rs b/src/tileset.rs index dcd5e9a..df7045d 100644 --- a/src/tileset.rs +++ b/src/tileset.rs @@ -57,6 +57,16 @@ impl Tileset { properties.push(Property::new(tile_id, property_elements)); } + let invisible: Vec<usize> = properties + .iter() + .filter(|p| p.visible == Some(false)) + .map(|p| p.tile_id) + .collect(); + + for i in invisible { + *tiles.get_mut(&i).unwrap() = Rect::zero(); + } + Tileset { tiles, properties } } |