Skip to content

Commit

Permalink
Revert breaking change (#248)
Browse files Browse the repository at this point in the history
* Revert breaking change

* Update changelog
  • Loading branch information
aleokdev authored Feb 13, 2023
1 parent 310a798 commit 18500d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for tile offsets. Tilesets now have an `offset_x` and `offset_y` property.

### Deprecated
- `Tile::tile_type`: Use `Tile::user_type` instead.
- `Object::obj_type` Use `Object::user_type` instead.

### Changed
Expand Down
8 changes: 3 additions & 5 deletions src/tile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ pub struct TileData {
/// The animation frames of this tile.
pub animation: Option<Vec<Frame>>,
/// The type of this tile.
pub user_type: Option<String>,
/// This property has been renamed to `user_type`.
#[deprecated(since = "0.10.3", note = "Use [`TileData::user_type`] instead")]
// TODO(0.11.0): Rename to `user_type` (https://github.com/mapeditor/rs-tiled/pull/238, postponed because of
// breaking change)
pub tile_type: Option<String>,
/// The probability of this tile.
pub probability: f32,
Expand Down Expand Up @@ -108,8 +107,7 @@ impl TileData {
properties,
collision: objectgroup,
animation,
tile_type: user_type.clone(),
user_type,
tile_type: user_type,
probability: probability.unwrap_or(1.0),
},
))
Expand Down

0 comments on commit 18500d4

Please sign in to comment.