Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Bevy Micro LDTK
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Microhacks
Bevy Micro LDTK
Commits
294f5b10
Verified
Commit
294f5b10
authored
1 year ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Include flags for ldtk 1.4.0 and 1.4.1
parent
ac83ea28
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Cargo.lock
+1
-1
1 addition, 1 deletion
Cargo.lock
Cargo.toml
+4
-2
4 additions, 2 deletions
Cargo.toml
README.md
+2
-1
2 additions, 1 deletion
README.md
src/ldtk/mod.rs
+3
-3
3 additions, 3 deletions
src/ldtk/mod.rs
with
10 additions
and
7 deletions
Cargo.lock
+
1
−
1
View file @
294f5b10
...
...
@@ -1701,7 +1701,7 @@ dependencies = [
[[package]]
name = "micro_ldtk"
version = "0.
7
.0"
version = "0.
8
.0"
dependencies = [
"anyhow",
"bevy",
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
4
−
2
View file @
294f5b10
[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
=
[]
...
...
This diff is collapsed.
Click to expand it.
README.md
+
2
−
1
View file @
294f5b10
...
...
@@ -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
)
|
...
...
This diff is collapsed.
Click to expand it.
src/ldtk/mod.rs
+
3
−
3
View file @
294f5b10
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment