From 2af0bb96321659d1a29ca1fda8364ed18db3b641 Mon Sep 17 00:00:00 2001 From: Alejandro Perea Date: Fri, 21 Jun 2024 15:38:34 +0200 Subject: [PATCH 1/2] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Thorbjørn Lindeijer --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b86f3..dbdbfef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased (0.13.0)] ### Added -- A way to obtain where tilesets, templates and maps have been loaded from +- Added a `source` member to `Tileset`, `Map` and `Template`, which stores the resource path they have been loaded from. ## [0.12.0] ### Added From f197b43bbcffcbe67fec7f7611c809542271f425 Mon Sep 17 00:00:00 2001 From: alexdevteam Date: Fri, 21 Jun 2024 15:53:17 +0200 Subject: [PATCH 2/2] Fix tests --- Cargo.toml | 4 ---- tests/lib.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 524d75b..4bdd67d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,9 +37,5 @@ xml-rs = "0.8.4" zstd = { version = "0.13.1", optional = true, default-features = false } flate2 = "1.0.28" -[dev-dependencies.sfml] -version = "0.21.0" -features = ["graphics"] - [dev-dependencies.ggez] version = "0.9.3" diff --git a/tests/lib.rs b/tests/lib.rs index 3773c45..8c489d7 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -101,7 +101,7 @@ fn test_external_sources() { .unwrap(); assert_eq!(e.source, PathBuf::from("assets/tiled_object_template.tmx")); assert_eq!( - e.tilesets()[0].source, + loader.cache().templates.values().next().unwrap().source, PathBuf::from("assets/tiled_object_template.tx") ); }