From 6721bef2919a4e516ecd818f9cfc5e35d37f5dd3 Mon Sep 17 00:00:00 2001 From: Benjamin Kirkbride Date: Tue, 9 Jun 2020 21:16:43 -0400 Subject: [PATCH] fix(layer): `common_attributes` required attributes --- pytiled_parser/layer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pytiled_parser/layer.py b/pytiled_parser/layer.py index 3e7cb9c..15f2b5c 100644 --- a/pytiled_parser/layer.py +++ b/pytiled_parser/layer.py @@ -214,7 +214,11 @@ def _get_common_attributes(raw_layer: RawLayer) -> Layer: Returns: Layer: The attributes in common of all layers """ - common_attributes = Layer(name=raw_layer["name"]) + common_attributes = Layer( + name=raw_layer["name"], + opacity=raw_layer["opacity"], + visible=raw_layer["visible"], + ) if raw_layer.get("startx") is not None: common_attributes.coordinates = OrderedPair(