Skip to content
Snippets Groups Projects
Verified Commit 294f5b10 authored by Louis's avatar Louis :fire:
Browse files

Include flags for ldtk 1.4.0 and 1.4.1

parent ac83ea28
No related branches found
No related tags found
No related merge requests found
......@@ -1701,7 +1701,7 @@ dependencies = [
[[package]]
name = "micro_ldtk"
version = "0.7.0"
version = "0.8.0"
dependencies = [
"anyhow",
"bevy",
......
[package]
name = "micro_ldtk"
version = "0.7.0"
version = "0.8.0"
edition = "2021"
authors = [
......@@ -11,7 +11,9 @@ description = "Load data from LDTK, index it and make it accessible through Bevy
license = "Apache-2.0"
[features]
default = ["ldtk_1_3_0", "autotile"]
default = ["ldtk_1_4_1", "autotile"]
ldtk_1_4_1 = []
ldtk_1_4_0 = []
ldtk_1_3_0 = []
ldtk_1_2_5 = []
ldtk_1_2_4 = []
......
......@@ -17,7 +17,7 @@ select the schema version you need:
```toml
[dependencies]
micro_ldtk = { version = "0.8.0", default-features = false, features = ["ldtk_1_3_0", "autotile"] }
micro_ldtk = { version = "0.8.0", default-features = false, features = ["ldtk_1_4_1", "autotile"] }
```
### Features
......@@ -38,6 +38,7 @@ corresponding version of LDTK and save it again.
| Feature Flag | Uses Schema Version |
|----------------------------|-------------------------------------------------------------------------------|
| `ldtk_1_4_0`, `ldtk_1_4_1` | [v1.4.0](https://github.com/deepnight/ldtk/blob/v1.4.0/docs/JSON_SCHEMA.json) |
| `ldtk_1_3_0` | [v1.3.0](https://github.com/deepnight/ldtk/blob/v1.3.0/docs/JSON_SCHEMA.json) |
| `ldtk_1_2_5` | [v1.2.5](https://github.com/deepnight/ldtk/blob/v1.2.5/docs/JSON_SCHEMA.json) |
| `ldtk_1_2_4` | [v1.2.4](https://github.com/deepnight/ldtk/blob/v1.2.4/docs/JSON_SCHEMA.json) |
......
......@@ -14,7 +14,7 @@ mod data_1_2_4;
mod data_1_2_5;
#[cfg(feature = "ldtk_1_3_0")]
mod data_1_3_0;
#[cfg(feature = "ldtk_1_4_0")]
#[cfg(any(feature = "ldtk_1_4_1", feature = "ldtk_1_4_0"))]
mod data_1_4_0;
use bevy::asset::io::Reader;
......@@ -42,7 +42,7 @@ pub use data_1_2_4::*;
pub use data_1_2_5::*;
#[cfg(feature = "ldtk_1_3_0")]
pub use data_1_3_0::*;
#[cfg(feature = "ldtk_1_4_0")]
#[cfg(any(feature = "ldtk_1_4_1", feature = "ldtk_1_4_0"))]
pub use data_1_4_0::*;
use serde::Deserialize;
......@@ -156,7 +156,7 @@ impl Project {
vec![]
}
#[cfg(any(feature = "ldtk_1_3_0", feature = "ldtk_1_4_0"))]
#[cfg(any(feature = "ldtk_1_3_0", feature = "ldtk_1_4_0", feature = "ldtk_1_4_1"))]
pub fn get_world_levels(&self, identifier: impl ToString) -> Vec<&Level> {
let id = identifier.to_string();
self.worlds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment