Skip to content

Commit

Permalink
Maintenance release 1.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiamo2 committed Mar 26, 2024
1 parent bffdb27 commit 0128e7c
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 17 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.7] - 2024-03-26

### Fixed

- Merged milana-94888u's pull request which fixes an (GDScript only) issue if a tileset name is a number.
Thank you Milana!
- Fixed a rare issue if tile collision rects had zero height or zero width

## [1.6.6] - 2024-01-31

### Added
Expand Down
6 changes: 3 additions & 3 deletions CSharp/addons/YATI/TilesetCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public Dictionary GetRegisteredObjectGroups()
private void CreateOrAppend(Dictionary tileSet)
{
// Catch the AutoMap Rules tileset (is Tiled internal)
if (tileSet.ContainsKey("name") && ((string)tileSet["name"] == "AutoMap Rules"))
if (tileSet.ContainsKey("name") && (string)tileSet["name"] == "AutoMap Rules")
return; // This is no error just skip it

if (!_append)
Expand Down Expand Up @@ -559,8 +559,8 @@ private void HandleObjectgroup(Dictionary objectGroup, TileData currentTile, int
polygon = new Vector2[4];
polygon[0] = Vector2.Zero;
polygon[1].X = polygon[0].X;
polygon[1].Y = polygon[0].Y + (float)obj["height"];
polygon[2].X = polygon[0].X + (float)obj["width"];
polygon[1].Y = polygon[0].Y + (float)obj.GetValueOrDefault("height", 0.0f);
polygon[2].X = polygon[0].X + (float)obj.GetValueOrDefault("width", 0.0f);
polygon[2].Y = polygon[1].Y;
polygon[3].X = polygon[2].X;
polygon[3].Y = polygon[0].Y;
Expand Down
2 changes: 1 addition & 1 deletion CSharp/addons/YATI/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="YATI"
description=""
author="Roland Helmerichs"
version="1.6.6"
version="1.6.7"
script="TiledImport.cs"
6 changes: 3 additions & 3 deletions CSharp/runtime/TilesetCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public Dictionary GetRegisteredObjectGroups()
private void CreateOrAppend(Dictionary tileSet)
{
// Catch the AutoMap Rules tileset (is Tiled internal)
if (tileSet.ContainsKey("name") && ((string)tileSet["name"] == "AutoMap Rules"))
if (tileSet.ContainsKey("name") && (string)tileSet["name"] == "AutoMap Rules")
return; // This is no error just skip it

if (!_append)
Expand Down Expand Up @@ -557,8 +557,8 @@ private void HandleObjectgroup(Dictionary objectGroup, TileData currentTile, int
polygon = new Vector2[4];
polygon[0] = Vector2.Zero;
polygon[1].X = polygon[0].X;
polygon[1].Y = polygon[0].Y + (float)obj["height"];
polygon[2].X = polygon[0].X + (float)obj["width"];
polygon[1].Y = polygon[0].Y + (float)obj.GetValueOrDefault("height", 0.0f);
polygon[2].X = polygon[0].X + (float)obj.GetValueOrDefault("width", 0.0f);
polygon[2].Y = polygon[1].Y;
polygon[3].X = polygon[2].X;
polygon[3].Y = polygon[0].Y;
Expand Down
6 changes: 3 additions & 3 deletions GDScript/addons/YATI/TilesetCreator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func get_registered_object_groups():

func create_or_append(tile_set: Dictionary):
# Catch the AutoMap Rules tileset (is Tiled internal)
if tile_set.has("name") and is_instance_of(tile_set["name"], TYPE_STRING) and tile_set["name"] == "AutoMap Rules":
if tile_set.has("name") and str(tile_set["name"]) == "AutoMap Rules":
return # This is no error just skip it

if not _append:
Expand Down Expand Up @@ -450,10 +450,10 @@ func handle_objectgroup(object_group: Dictionary, current_tile: TileData, tile_i
# Should be a simple rectangle
polygon = [Vector2(), Vector2(), Vector2(), Vector2()]
polygon[0] = Vector2.ZERO
polygon[1].y = polygon[0].y + obj["height"]
polygon[1].y = polygon[0].y + obj.get("height", 0.0)
polygon[1].x = polygon[0].x
polygon[2].y = polygon[1].y
polygon[2].x = polygon[0].x + obj["width"]
polygon[2].x = polygon[0].x + obj.get("width", 0.0)
polygon[3].y = polygon[0].y
polygon[3].x = polygon[2].x
var i = 0
Expand Down
2 changes: 1 addition & 1 deletion GDScript/addons/YATI/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="YATI"
description=""
author="Roland Helmerichs"
version="1.6.6"
version="1.6.7"
script="TiledImport.gd"
6 changes: 3 additions & 3 deletions GDScript/runtime/TilesetCreator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func get_registered_object_groups():

func create_or_append(tile_set: Dictionary):
# Catch the AutoMap Rules tileset (is Tiled internal)
if tile_set.has("name") and is_instance_of(tile_set["name"], TYPE_STRING) and tile_set["name"] == "AutoMap Rules":
if tile_set.has("name") and str(tile_set["name"]) == "AutoMap Rules":
return # This is no error just skip it

if not _append:
Expand Down Expand Up @@ -449,10 +449,10 @@ func handle_objectgroup(object_group: Dictionary, current_tile: TileData, tile_i
# Should be a simple rectangle
polygon = [Vector2(), Vector2(), Vector2(), Vector2()]
polygon[0] = Vector2.ZERO
polygon[1].y = polygon[0].y + obj["height"]
polygon[1].y = polygon[0].y + obj.get("height", 0.0)
polygon[1].x = polygon[0].x
polygon[2].y = polygon[1].y
polygon[2].x = polygon[0].x + obj["width"]
polygon[2].x = polygon[0].x + obj.get("width", 0.0)
polygon[3].y = polygon[0].y
polygon[3].x = polygon[2].x
var i = 0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ created by the [Tiled Map Editor](http://www.mapeditor.org).

Tested on Windows 10 with Godot 4.2.1 and Tiled 1.10.2 (Tiled maps from older Tiled versions may work too)

Latest version: 1.6.6
Latest version: 1.6.7

**New since v1.5.2:** Runtime packages are now additionally available.
For installation and usage please refer to the [runtime document](Runtime.md)
Expand All @@ -16,7 +16,7 @@ For installation and usage please refer to the [runtime document](Runtime.md)

The addon is available in GDScript as well as in C# for the Mono version of Godot 4.

- Download either the [GDScript version](../../releases/download/v1.6.6/v1.6.6-gdscript.zip) or the [CSharp version](../../releases/download/v1.6.6/v1.6.6-csharp.zip)
- Download either the [GDScript version](../../releases/download/v1.6.7/v1.6.7-gdscript.zip) or the [CSharp version](../../releases/download/v1.6.7/v1.6.7-csharp.zip)
- Move the unzipped addon folder with its entire content to your Godot project folder
- After starting your project in Godot the plugin should appear at Project>>Project Settings...>>Plugins

Expand Down
2 changes: 1 addition & 1 deletion Runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The YATI runtime package allows for importing Tiled maps during (game) runtime.
To offer such a package was proposed by Jeff Brooks (see issue #16) as being of value for several users.

Like for the editor plugin there's a [GDScript version](../../releases/download/v1.6.6/runtime-v1.6.6-gdscript.zip) and a [CSharp version](../../releases/download/v1.6.6/runtime-v1.6.6-csharp.zip) available.
Like for the editor plugin there's a [GDScript version](../../releases/download/v1.6.7/runtime-v1.6.7-gdscript.zip) and a [CSharp version](../../releases/download/v1.6.7/runtime-v1.6.7-csharp.zip) available.

## Installation

Expand Down

0 comments on commit 0128e7c

Please sign in to comment.