diff options
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 } } |