commit daa66d5b54d0549ad9487f018b807d165dde3812 Author: omigamedev Date: Sun May 17 11:28:40 2026 +0200 init diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6c81639 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Godot 4+ specific ignores +.godot/ +/android/ +.nomedia + +# Godot-specific ignores +.import/ +export.cfg +export_credentials.cfg +*.tmp + +# Imported translations (automatically generated from CSV files) +*.translation + +# Mono-specific ignores +.mono/ +data_*/ +mono_crash.*.json \ No newline at end of file diff --git a/addons/ez_tiles/ColorPick.svg b/addons/ez_tiles/ColorPick.svg new file mode 100644 index 0000000..741bd7a --- /dev/null +++ b/addons/ez_tiles/ColorPick.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ColorPick.svg.import b/addons/ez_tiles/ColorPick.svg.import new file mode 100644 index 0000000..67032d1 --- /dev/null +++ b/addons/ez_tiles/ColorPick.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://caun3agmbmgps" +path="res://.godot/imported/ColorPick.svg-3d1404ee7ad6e6f63eea544098a69601.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ColorPick.svg" +dest_files=["res://.godot/imported/ColorPick.svg-3d1404ee7ad6e6f63eea544098a69601.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/Edit.svg b/addons/ez_tiles/Edit.svg new file mode 100644 index 0000000..7963e54 --- /dev/null +++ b/addons/ez_tiles/Edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/Edit.svg.import b/addons/ez_tiles/Edit.svg.import new file mode 100644 index 0000000..1820d54 --- /dev/null +++ b/addons/ez_tiles/Edit.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwo07c1odx7ob" +path="res://.godot/imported/Edit.svg-82304c6fcb6a1b25af7fee4a258df268.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/Edit.svg" +dest_files=["res://.godot/imported/Edit.svg-82304c6fcb6a1b25af7fee4a258df268.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/LICENSE b/addons/ez_tiles/LICENSE new file mode 100644 index 0000000..ea9dd06 --- /dev/null +++ b/addons/ez_tiles/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 René and Chris van der Ark + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/addons/ez_tiles/README.md b/addons/ez_tiles/README.md new file mode 100644 index 0000000..d29a68c --- /dev/null +++ b/addons/ez_tiles/README.md @@ -0,0 +1,29 @@ +# EZ Tiles plugin for Godot 4.3 + +This plugin attempts to make it easy to start drawing terrains with tilesheets via a basic Tileset importer and TileMapLayer nodes. + +For a complete showcase, please take a look at these youtube explainers. + +## Basic introduction to EZ Tiles + +[![link to explainer](https://raw.githubusercontent.com/Teaching-myself-Godot/ez-tiles/refs/tags/1.0.3/yt-thumnail-2.jpg)](https://youtu.be/cvx-chwh1Ds) + +## Top down RPG tiles with EZ Tiles + +[![link to RPG tiles example](https://raw.githubusercontent.com/Teaching-myself-Godot/ez-tiles/refs/tags/1.0.3/yt-thumnail-1.jpg)](https://youtu.be/gBNtqvF5T_Y) + +## Importer Features + +- importing tilesheets in a preset format to automatically generate connected terrains (4 sides) + +![example of template](https://raw.githubusercontent.com/Teaching-myself-Godot/ez-tiles/refs/tags/1.0.0/template_32x32.png) + +- a couple of preset collision polygons to use with these templates +- generation of a navigation layer + +## Drawing Features + +- Square and circle brush +- Draggable area draw +- Stamps (fast copy/paste) +- Several modes of terrain-connecting diff --git a/addons/ez_tiles/Remove.svg b/addons/ez_tiles/Remove.svg new file mode 100644 index 0000000..d2eb0f9 --- /dev/null +++ b/addons/ez_tiles/Remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/Remove.svg.import b/addons/ez_tiles/Remove.svg.import new file mode 100644 index 0000000..ad6e54e --- /dev/null +++ b/addons/ez_tiles/Remove.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://smg4iofcineo" +path="res://.godot/imported/Remove.svg-a5d55465b9350d5f0321a6a209a66676.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/Remove.svg" +dest_files=["res://.godot/imported/Remove.svg-a5d55465b9350d5f0321a6a209a66676.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/Save.svg b/addons/ez_tiles/Save.svg new file mode 100644 index 0000000..ab8ffff --- /dev/null +++ b/addons/ez_tiles/Save.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/Save.svg.import b/addons/ez_tiles/Save.svg.import new file mode 100644 index 0000000..cd32e58 --- /dev/null +++ b/addons/ez_tiles/Save.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxl4w251e8xgf" +path="res://.godot/imported/Save.svg-cccadde19daf996f4fd509bf2315f230.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/Save.svg" +dest_files=["res://.godot/imported/Save.svg-cccadde19daf996f4fd509bf2315f230.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ZoomLess.svg b/addons/ez_tiles/ZoomLess.svg new file mode 100644 index 0000000..83d964f --- /dev/null +++ b/addons/ez_tiles/ZoomLess.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ZoomLess.svg.import b/addons/ez_tiles/ZoomLess.svg.import new file mode 100644 index 0000000..c11188e --- /dev/null +++ b/addons/ez_tiles/ZoomLess.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://njliaygubc5c" +path="res://.godot/imported/ZoomLess.svg-1ac10bf8c27b37875d4fb511a1a711f8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ZoomLess.svg" +dest_files=["res://.godot/imported/ZoomLess.svg-1ac10bf8c27b37875d4fb511a1a711f8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ZoomMore.svg b/addons/ez_tiles/ZoomMore.svg new file mode 100644 index 0000000..63250ed --- /dev/null +++ b/addons/ez_tiles/ZoomMore.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ZoomMore.svg.import b/addons/ez_tiles/ZoomMore.svg.import new file mode 100644 index 0000000..464dc11 --- /dev/null +++ b/addons/ez_tiles/ZoomMore.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvwx6xu0hp7mv" +path="res://.godot/imported/ZoomMore.svg-1d933b2c818365668806650c495f37a9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ZoomMore.svg" +dest_files=["res://.godot/imported/ZoomMore.svg-1d933b2c818365668806650c495f37a9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/collision_polygon_templates/cactus.tscn b/addons/ez_tiles/collision_polygon_templates/cactus.tscn new file mode 100644 index 0000000..163a0f0 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/cactus.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://ywxhlehtt18d"] + +[node name="Cactus" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0.210938, 0.09375, 0.0390625, 0.289063, 0, 0.71875, 0, 0.882813, 0.078125, 1, 0.289063, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0.226563, 0.132813, 0.0703125, 0.359375, 0, 0.640625, 0, 0.820313, 0.0859375, 0.992188, 0.304688, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 0.25, 0, 0, 1, 0, 1, 0.242188) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0.53125, 0.460938, 0.476563, 0.171875, 0.625, 0, 0.765625, 0.0390625, 0.835938, 0.328125, 1, 0.414063, 1, 0.734375, 0.703125, 0.625) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 0.71875, 0, 0.398438, 1, 0.390625, 1, 0.71875) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 0.703125, 0, 0.390625, 0.195313, 0.34375, 0.226563, 0.03125, 0.382813, 0.015625, 0.515625, 0.164063, 0.523438, 0.445313, 0.296875, 0.640625) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/inverse_rounded_corners.tscn b/addons/ez_tiles/collision_polygon_templates/inverse_rounded_corners.tscn new file mode 100644 index 0000000..7842f0c --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/inverse_rounded_corners.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://cxnhqxx237lix"] + +[node name="Rounded Corners (Inverse)" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0.03125, 0.734375, 0.15625, 0.476563, 0.3125, 0.273438, 0.515625, 0.125, 0.773438, 0.03125, 1, 0, 0, 0) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(1, 0, 0, 0, 0.273438, 0.0390625, 0.5, 0.125, 0.71875, 0.289063, 0.859375, 0.484375, 0.953125, 0.695313, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 1, 1, 1, 0, 0.960938, 0.257813, 0.867188, 0.492188, 0.726563, 0.703125, 0.523438, 0.867188, 0.28125, 0.960938) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0.28125, 0.71875, 0.140625, 0.507813, 0.046875, 0.304688, 0, 0, 0, 1, 1, 1, 1, 1, 0.703125, 0.953125, 0.492188, 0.859375) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/rectangles.tscn b/addons/ez_tiles/collision_polygon_templates/rectangles.tscn new file mode 100644 index 0000000..3f12c62 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/rectangles.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://bdtlwd7f6ojk0"] + +[node name="Rectangles" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/rounded_corners.tscn b/addons/ez_tiles/collision_polygon_templates/rounded_corners.tscn new file mode 100644 index 0000000..deca0a9 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/rounded_corners.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://cm4063l3dfehn"] + +[node name="Rounded Corners" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0.140209, 0.880727, 0.0546875, 0.75, 0, 0.515625, 0.0326076, 0.30961, 0.125, 0.15625, 0.3125, 0.03125, 0.5, 0, 0.671875, 0.03125, 0.835938, 0.125, 0.960938, 0.28125, 1, 0.507813, 0.945313, 0.710938, 0.84375, 0.859375, 0.695313, 0.96875, 0.507813, 1, 0.30575, 0.971775) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0.140209, 0.880727, 0.0546875, 0.75, 0, 0.515625, 0, 0, 1, 0, 1, 0.507813, 0.945313, 0.710938, 0.84375, 0.859375, 0.695313, 0.96875, 0.507813, 1, 0.30575, 0.971775) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0.515625, 0.015625, 0.328125, 0.125, 0.15625, 0.3125, 0.03125, 0.5, 0, 0.671875, 0.03125, 0.835938, 0.125, 0.960938, 0.28125, 1, 0.507813, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0.117188, 0.8125, 0.0234375, 0.65625, 0, 0.492188, 0.0390625, 0.28125, 0.148438, 0.132813, 0.34375, 0.0234375, 0.515625, 0, 1, 0, 1, 1, 1, 1, 0.523438, 1, 0.304688, 0.953125) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 0.554688, 0, 0.820313, 0.09375, 0.960938, 0.296875, 1, 0.460938, 0.96875, 0.671875, 0.804688, 0.90625, 0.5625, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 0.03125, 0.734375, 0.15625, 0.476563, 0.3125, 0.273438, 0.515625, 0.125, 0.773438, 0.03125, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 0.273438, 0.0390625, 0.5, 0.125, 0.71875, 0.289063, 0.859375, 0.484375, 0.953125, 0.695313, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 0.960938, 0.257813, 0.867188, 0.492188, 0.726563, 0.703125, 0.523438, 0.867188, 0.28125, 0.960938) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0.28125, 0.71875, 0.140625, 0.507813, 0.046875, 0.304688, 0, 0, 1, 0, 1, 1, 1, 1, 0.703125, 0.953125, 0.492188, 0.859375) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/slopes.tscn b/addons/ez_tiles/collision_polygon_templates/slopes.tscn new file mode 100644 index 0000000..d6b5824 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/slopes.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://lfnyjmnayoqe"] + +[node name="Sloped (All Corners)" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/slopes_bottom.tscn b/addons/ez_tiles/collision_polygon_templates/slopes_bottom.tscn new file mode 100644 index 0000000..fa7c83d --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/slopes_bottom.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://ckfu3f4u350bg"] + +[node name="Sloped (Bottom Corners)" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/slopes_top.tscn b/addons/ez_tiles/collision_polygon_templates/slopes_top.tscn new file mode 100644 index 0000000..2d7f483 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/slopes_top.tscn @@ -0,0 +1,100 @@ +[gd_scene format=3 uid="uid://3gmoem8hi2hi"] + +[node name="Sloped (Top Corners)" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/collision_polygon_templates/tree.tscn b/addons/ez_tiles/collision_polygon_templates/tree.tscn new file mode 100644 index 0000000..edbbbc0 --- /dev/null +++ b/addons/ez_tiles/collision_polygon_templates/tree.tscn @@ -0,0 +1,101 @@ +[gd_scene format=3 uid="uid://bp35luh5na8o7"] + +[node name="Tree" type="Node2D"] +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 2.0, 3.0, 4.0] + +[node name="MC" type="Polygon2D" parent="."] +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VT" type="Polygon2D" parent="."] +position = Vector2(1, 0) +polygon = PackedVector2Array(0, 1, 0.492188, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VM" type="Polygon2D" parent="."] +position = Vector2(1, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="VB" type="Polygon2D" parent="."] +position = Vector2(1, 2) +polygon = PackedVector2Array(0.1875, 0.820313, 0, 0, 1, 0, 0.8125, 0.570313) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HL" type="Polygon2D" parent="."] +position = Vector2(0, 3) +polygon = PackedVector2Array(0.478268, 0.299531, 0, 0, 1, 0, 1, 0, 0.992188, 0.398438) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HM" type="Polygon2D" parent="."] +position = Vector2(1, 3) +polygon = PackedVector2Array(0.0078125, 0.421875, 0, 0, 1, 0, 1, 0.421875) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="HR" type="Polygon2D" parent="."] +position = Vector2(2, 3) +scale = Vector2(1, 1.1) +polygon = PackedVector2Array(0, 0.411932, 0, 0, 1, 0, 0.78125, 0.191761) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BR" type="Polygon2D" parent="."] +position = Vector2(5, 2) +polygon = PackedVector2Array(0, 1, 1, 1, 1, 0, 0, 0) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BL" type="Polygon2D" parent="."] +position = Vector2(3, 2) +polygon = PackedVector2Array(1, 0, 0, 0, 0, 1, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TM" type="Polygon2D" parent="."] +position = Vector2(4, 0) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="LM" type="Polygon2D" parent="."] +position = Vector2(3, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="CM" type="Polygon2D" parent="."] +position = Vector2(4, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="RM" type="Polygon2D" parent="."] +position = Vector2(5, 1) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TL" type="Polygon2D" parent="."] +position = Vector2(3, 0) +polygon = PackedVector2Array(0, 1, 1, 1, 1, 0, 0.960938, 0.257813, 0.867188, 0.492188, 0.726563, 0.703125, 0.523438, 0.867188, 0.28125, 0.960938) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="BC" type="Polygon2D" parent="."] +position = Vector2(4, 2) +polygon = PackedVector2Array(0, 1, 0, 0, 1, 0, 1, 1, 1, 1) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] + +[node name="TR" type="Polygon2D" parent="."] +position = Vector2(5, 0) +polygon = PackedVector2Array(0.28125, 0.71875, 0.140625, 0.507813, 0.046875, 0.304688, 0, 0, 0, 1, 1, 1, 1, 1, 0.703125, 0.953125, 0.492188, 0.859375) +metadata/_edit_vertical_guides_ = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0] +metadata/_edit_horizontal_guides_ = [1.0, 1.0, 2.0, 3.0, 4.0] diff --git a/addons/ez_tiles/examples/15x15/big_brick.png b/addons/ez_tiles/examples/15x15/big_brick.png new file mode 100644 index 0000000..86c0e0a Binary files /dev/null and b/addons/ez_tiles/examples/15x15/big_brick.png differ diff --git a/addons/ez_tiles/examples/15x15/big_brick.png.import b/addons/ez_tiles/examples/15x15/big_brick.png.import new file mode 100644 index 0000000..2099030 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/big_brick.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dyf2x07bqc1kw" +path="res://.godot/imported/big_brick.png-7cbdd1461a54cb96eda7d75f06bf46e5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/big_brick.png" +dest_files=["res://.godot/imported/big_brick.png-7cbdd1461a54cb96eda7d75f06bf46e5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/brick_face.png b/addons/ez_tiles/examples/15x15/brick_face.png new file mode 100644 index 0000000..84669d0 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/brick_face.png differ diff --git a/addons/ez_tiles/examples/15x15/brick_face.png.import b/addons/ez_tiles/examples/15x15/brick_face.png.import new file mode 100644 index 0000000..6f3fbbc --- /dev/null +++ b/addons/ez_tiles/examples/15x15/brick_face.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bm3oo83wmpa7t" +path="res://.godot/imported/brick_face.png-be3d3f48b608d1194504c80b008847cb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/brick_face.png" +dest_files=["res://.godot/imported/brick_face.png-be3d3f48b608d1194504c80b008847cb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/cactus.png b/addons/ez_tiles/examples/15x15/cactus.png new file mode 100644 index 0000000..f55bc26 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/cactus.png differ diff --git a/addons/ez_tiles/examples/15x15/cactus.png.import b/addons/ez_tiles/examples/15x15/cactus.png.import new file mode 100644 index 0000000..d8929cf --- /dev/null +++ b/addons/ez_tiles/examples/15x15/cactus.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://qylofri7a3j" +path="res://.godot/imported/cactus.png-fb8308c83545f74973ca4d97df5fc871.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/cactus.png" +dest_files=["res://.godot/imported/cactus.png-fb8308c83545f74973ca4d97df5fc871.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/gold_tiles.png b/addons/ez_tiles/examples/15x15/gold_tiles.png new file mode 100644 index 0000000..c8146fe Binary files /dev/null and b/addons/ez_tiles/examples/15x15/gold_tiles.png differ diff --git a/addons/ez_tiles/examples/15x15/gold_tiles.png.import b/addons/ez_tiles/examples/15x15/gold_tiles.png.import new file mode 100644 index 0000000..8e7818e --- /dev/null +++ b/addons/ez_tiles/examples/15x15/gold_tiles.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7ab600twsy17" +path="res://.godot/imported/gold_tiles.png-22f1bb38d765445d923d8f50d6c55c69.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/gold_tiles.png" +dest_files=["res://.godot/imported/gold_tiles.png-22f1bb38d765445d923d8f50d6c55c69.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/grass_and_dirt.png b/addons/ez_tiles/examples/15x15/grass_and_dirt.png new file mode 100644 index 0000000..42e347f Binary files /dev/null and b/addons/ez_tiles/examples/15x15/grass_and_dirt.png differ diff --git a/addons/ez_tiles/examples/15x15/grass_and_dirt.png.import b/addons/ez_tiles/examples/15x15/grass_and_dirt.png.import new file mode 100644 index 0000000..b36c3a7 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/grass_and_dirt.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://qkgb300aqju0" +path="res://.godot/imported/grass_and_dirt.png-eda66079d258f21e83b1bbc5af195e0a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/grass_and_dirt.png" +dest_files=["res://.godot/imported/grass_and_dirt.png-eda66079d258f21e83b1bbc5af195e0a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/mossy_bricks.png b/addons/ez_tiles/examples/15x15/mossy_bricks.png new file mode 100644 index 0000000..46dd260 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/mossy_bricks.png differ diff --git a/addons/ez_tiles/examples/15x15/mossy_bricks.png.import b/addons/ez_tiles/examples/15x15/mossy_bricks.png.import new file mode 100644 index 0000000..39c5208 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/mossy_bricks.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cx74c55pt4kvk" +path="res://.godot/imported/mossy_bricks.png-7a9818dfc7df3a554d452059d576c7f4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/mossy_bricks.png" +dest_files=["res://.godot/imported/mossy_bricks.png-7a9818dfc7df3a554d452059d576c7f4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/sand.png b/addons/ez_tiles/examples/15x15/sand.png new file mode 100644 index 0000000..44c5109 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/sand.png differ diff --git a/addons/ez_tiles/examples/15x15/sand.png.import b/addons/ez_tiles/examples/15x15/sand.png.import new file mode 100644 index 0000000..9355e28 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/sand.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dudbsnchdio2u" +path="res://.godot/imported/sand.png-25261f855efcdb39571b9c5a648b68d0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/sand.png" +dest_files=["res://.godot/imported/sand.png-25261f855efcdb39571b9c5a648b68d0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/spikes.png b/addons/ez_tiles/examples/15x15/spikes.png new file mode 100644 index 0000000..ae38a5b Binary files /dev/null and b/addons/ez_tiles/examples/15x15/spikes.png differ diff --git a/addons/ez_tiles/examples/15x15/spikes.png.import b/addons/ez_tiles/examples/15x15/spikes.png.import new file mode 100644 index 0000000..bf1a1e0 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/spikes.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b66j5q5i4ltpn" +path="res://.godot/imported/spikes.png-a03d129e27aef364b1e1648c5710269d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/spikes.png" +dest_files=["res://.godot/imported/spikes.png-a03d129e27aef364b1e1648c5710269d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/stonewall.png b/addons/ez_tiles/examples/15x15/stonewall.png new file mode 100644 index 0000000..f986902 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/stonewall.png differ diff --git a/addons/ez_tiles/examples/15x15/stonewall.png.import b/addons/ez_tiles/examples/15x15/stonewall.png.import new file mode 100644 index 0000000..3564121 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/stonewall.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4ibyc7vv0cqd" +path="res://.godot/imported/stonewall.png-165313e5941503a3dd613b03b79bddd7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/stonewall.png" +dest_files=["res://.godot/imported/stonewall.png-165313e5941503a3dd613b03b79bddd7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/15x15/tree_trunk.png b/addons/ez_tiles/examples/15x15/tree_trunk.png new file mode 100644 index 0000000..b66ac29 Binary files /dev/null and b/addons/ez_tiles/examples/15x15/tree_trunk.png differ diff --git a/addons/ez_tiles/examples/15x15/tree_trunk.png.import b/addons/ez_tiles/examples/15x15/tree_trunk.png.import new file mode 100644 index 0000000..57daeb9 --- /dev/null +++ b/addons/ez_tiles/examples/15x15/tree_trunk.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://f0usrkn63hv0" +path="res://.godot/imported/tree_trunk.png-9704d95a015e91b197256a3aedfee62d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/15x15/tree_trunk.png" +dest_files=["res://.godot/imported/tree_trunk.png-9704d95a015e91b197256a3aedfee62d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png new file mode 100644 index 0000000..3fb79a4 Binary files /dev/null and b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png differ diff --git a/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png.import b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png.import new file mode 100644 index 0000000..abe46d3 --- /dev/null +++ b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c0t85l7oiep61" +path="res://.godot/imported/tinyworlds-tileset-floating-dirt-isles.png-dd7c959e0deee039b2957f496e6c51b4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.png" +dest_files=["res://.godot/imported/tinyworlds-tileset-floating-dirt-isles.png-dd7c959e0deee039b2957f496e6c51b4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.xcf b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.xcf new file mode 100644 index 0000000..9e13a35 Binary files /dev/null and b/addons/ez_tiles/examples/16x16/tinyworlds-tileset-floating-dirt-isles.xcf differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png b/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png new file mode 100644 index 0000000..3d8d795 Binary files /dev/null and b/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png.import b/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png.import new file mode 100644 index 0000000..f71b743 --- /dev/null +++ b/addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://jhqreh71nv5o" +path="res://.godot/imported/zelda_like_dark_grass.png-e14eb21d78bf0a5e0209525e40e749cd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/zelda_like_dark_grass.png" +dest_files=["res://.godot/imported/zelda_like_dark_grass.png-e14eb21d78bf0a5e0209525e40e749cd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/zelda_like_grass.png b/addons/ez_tiles/examples/16x16/zelda_like_grass.png new file mode 100644 index 0000000..4320250 Binary files /dev/null and b/addons/ez_tiles/examples/16x16/zelda_like_grass.png differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_grass.png.import b/addons/ez_tiles/examples/16x16/zelda_like_grass.png.import new file mode 100644 index 0000000..a772f1e --- /dev/null +++ b/addons/ez_tiles/examples/16x16/zelda_like_grass.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://csqilhkvhxmne" +path="res://.godot/imported/zelda_like_grass.png-b6f4304517edfc28d7e02e2179aabf56.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/zelda_like_grass.png" +dest_files=["res://.godot/imported/zelda_like_grass.png-b6f4304517edfc28d7e02e2179aabf56.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png b/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png new file mode 100644 index 0000000..629914c Binary files /dev/null and b/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png.import b/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png.import new file mode 100644 index 0000000..3e064ad --- /dev/null +++ b/addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://h6xbr61ix6j7" +path="res://.godot/imported/zelda_like_grass_over_water.png-b6a3af1682cd313c336783e0d4d2199d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/zelda_like_grass_over_water.png" +dest_files=["res://.godot/imported/zelda_like_grass_over_water.png-b6a3af1682cd313c336783e0d4d2199d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/zelda_like_hedge.png b/addons/ez_tiles/examples/16x16/zelda_like_hedge.png new file mode 100644 index 0000000..80b35ed Binary files /dev/null and b/addons/ez_tiles/examples/16x16/zelda_like_hedge.png differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_hedge.png.import b/addons/ez_tiles/examples/16x16/zelda_like_hedge.png.import new file mode 100644 index 0000000..504c421 --- /dev/null +++ b/addons/ez_tiles/examples/16x16/zelda_like_hedge.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://4aivnuxpkvr" +path="res://.godot/imported/zelda_like_hedge.png-d907887aa9483a2398bba354eaa4abcb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/zelda_like_hedge.png" +dest_files=["res://.godot/imported/zelda_like_hedge.png-d907887aa9483a2398bba354eaa4abcb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/16x16/zelda_like_water.png b/addons/ez_tiles/examples/16x16/zelda_like_water.png new file mode 100644 index 0000000..6e58043 Binary files /dev/null and b/addons/ez_tiles/examples/16x16/zelda_like_water.png differ diff --git a/addons/ez_tiles/examples/16x16/zelda_like_water.png.import b/addons/ez_tiles/examples/16x16/zelda_like_water.png.import new file mode 100644 index 0000000..0ef4224 --- /dev/null +++ b/addons/ez_tiles/examples/16x16/zelda_like_water.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://chx0bemo6hrf" +path="res://.godot/imported/zelda_like_water.png-3df6072f89452b6e6aa2ff950499ee5e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/zelda_like_water.png" +dest_files=["res://.godot/imported/zelda_like_water.png-3df6072f89452b6e6aa2ff950499ee5e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/64x64/plains_1.png.import b/addons/ez_tiles/examples/64x64/plains_1.png.import new file mode 100644 index 0000000..7542f85 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/plains_1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d152uhcg8kesn" +path="res://.godot/imported/plains_1.png-2fe6d3bbe2dc7c593788d82833fc8c5a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/16x16/plains_1.png" +dest_files=["res://.godot/imported/plains_1.png-2fe6d3bbe2dc7c593788d82833fc8c5a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/examples/64x64/plains_1.svg b/addons/ez_tiles/examples/64x64/plains_1.svg new file mode 100644 index 0000000..6b0eb28 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/plains_1.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + diff --git a/addons/ez_tiles/examples/64x64/plains_1.svg.import b/addons/ez_tiles/examples/64x64/plains_1.svg.import new file mode 100644 index 0000000..2be37c3 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/plains_1.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://82nd1ajjv633" +path="res://.godot/imported/plains_1.svg-5e57b110d812f8b73a3f571ca1f55b4c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/64x64/plains_1.svg" +dest_files=["res://.godot/imported/plains_1.svg-5e57b110d812f8b73a3f571ca1f55b4c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/examples/64x64/plains_2.svg b/addons/ez_tiles/examples/64x64/plains_2.svg new file mode 100644 index 0000000..3819e20 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/plains_2.svg @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/ez_tiles/examples/64x64/plains_2.svg.import b/addons/ez_tiles/examples/64x64/plains_2.svg.import new file mode 100644 index 0000000..ee885c6 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/plains_2.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbr3esj1mxpl0" +path="res://.godot/imported/plains_2.svg-b406f7a8bb22df8238488c2c4608aec9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/64x64/plains_2.svg" +dest_files=["res://.godot/imported/plains_2.svg-b406f7a8bb22df8238488c2c4608aec9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/examples/64x64/spikes.svg b/addons/ez_tiles/examples/64x64/spikes.svg new file mode 100644 index 0000000..2d3444c --- /dev/null +++ b/addons/ez_tiles/examples/64x64/spikes.svg @@ -0,0 +1,523 @@ + + diff --git a/addons/ez_tiles/examples/64x64/spikes.svg.import b/addons/ez_tiles/examples/64x64/spikes.svg.import new file mode 100644 index 0000000..5ed9f27 --- /dev/null +++ b/addons/ez_tiles/examples/64x64/spikes.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dxc264vu06a4x" +path="res://.godot/imported/spikes.svg-b0aa9d0afa9f87737835a3d0db5b9908.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/examples/64x64/spikes.svg" +dest_files=["res://.godot/imported/spikes.svg-b0aa9d0afa9f87737835a3d0db5b9908.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/exclamation-warning-triangle-icon.svg b/addons/ez_tiles/exclamation-warning-triangle-icon.svg new file mode 100644 index 0000000..7556063 --- /dev/null +++ b/addons/ez_tiles/exclamation-warning-triangle-icon.svg @@ -0,0 +1,51 @@ + + + + + + + diff --git a/addons/ez_tiles/exclamation-warning-triangle-icon.svg.import b/addons/ez_tiles/exclamation-warning-triangle-icon.svg.import new file mode 100644 index 0000000..c5a5721 --- /dev/null +++ b/addons/ez_tiles/exclamation-warning-triangle-icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfrwoh80yb3se" +path="res://.godot/imported/exclamation-warning-triangle-icon.svg-5a6d8876361b1164bbf2243119cc81cb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/exclamation-warning-triangle-icon.svg" +dest_files=["res://.godot/imported/exclamation-warning-triangle-icon.svg-5a6d8876361b1164bbf2243119cc81cb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles.gd b/addons/ez_tiles/ez_tiles.gd new file mode 100644 index 0000000..5d6dece --- /dev/null +++ b/addons/ez_tiles/ez_tiles.gd @@ -0,0 +1,212 @@ +@tool +extends EditorPlugin +class_name EZTiles + +# importer +var dock : EZTilesDock +var alert_dialog : AcceptDialog + +# draw +var selection : EditorSelection +var draw_dock : EZTilesDrawDock +var select_2D_viewport_button : Button +var select_mode_button : Button +var prev_tile_pos := Vector2i.ZERO +var lmb_is_down_outside_2d_viewport := false +var hint_polygon : Polygon2D +var prev_pos := Vector2i.ZERO + +func _enter_tree() -> void: + # importer + dock = preload("res://addons/ez_tiles/ez_tiles_dock.tscn").instantiate() + add_control_to_bottom_panel(dock as Control, "EZ Tiles") + dock.request_tile_map_layer.connect(create_tile_map_layer_for_tile_set) + alert_dialog = AcceptDialog.new() + EditorInterface.get_base_control().add_child(alert_dialog) + # draw + draw_dock = preload("res://addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.tscn").instantiate() + selection = EditorInterface.get_selection() + selection.selection_changed.connect(handle_selected_node) + add_control_to_bottom_panel(draw_dock as Control, "EZ Tiles Draw") + handle_selected_node() + select_2D_viewport_button = EditorInterface.get_base_control().find_child("2D", true, false) + draw_dock.undo_redo = get_undo_redo() + +# IMPORTER +func create_tile_map_layer_for_tile_set(tile_set : TileSet) -> void: + var root := EditorInterface.get_edited_scene_root() + if is_instance_valid(root) and root is Node2D: + var tile_map_layer := TileMapLayer.new() + tile_map_layer.tile_set = tile_set + tile_map_layer.name = "EZTilesTileMapLayer" + root.add_child(tile_map_layer, true) + tile_map_layer.set_owner(root) + tile_map_layer.set_meta("_is_ez_tiles_generated", true) + EditorInterface.edit_node(tile_map_layer) + else: + alert_dialog.title = "Warning!" + alert_dialog.dialog_text = """Cannot create TileMapLayer for this scene. + Please try again when editing a Node2D scene.""" + alert_dialog.popup_centered() + +# DRAW +func _handles(object: Object) -> bool: + return is_instance_valid(object) and object is TileMapLayer + + +func _dump_interface(n : Node, max_d : int = 2, d : int = 0) -> void: + if n.name.contains("Dialog") or n.name.contains("Popup"): + return + print(n.name.lpad(d + n.name.length(), "-") + " (%d)" % [n.get_child_count()]) + for c in n.get_children(): + if d < max_d: + _dump_interface(c, max_d, d + 1) + + +func _get_select_mode_button() -> Button: + if is_instance_valid(select_mode_button): + return select_mode_button + else: + select_mode_button = ( + EditorInterface.get_editor_viewport_2d().find_parent("*CanvasItemEditor*") + .find_child("*Button*", true, false) + ) + return select_mode_button + + +func _tile_pos_from_mouse_pos() -> Vector2i: + if not is_instance_valid(draw_dock.under_edit): + return Vector2i.ZERO + var mouse_pos := EditorInterface.get_editor_viewport_2d().get_mouse_position() + var cursor_pos_on_tilemaplayer := (mouse_pos - draw_dock.under_edit.global_position).rotated(-draw_dock.under_edit.global_rotation) + + var tile_pos := Vector2i(cursor_pos_on_tilemaplayer / (Vector2(draw_dock.under_edit.tile_set.tile_size) * draw_dock.under_edit.global_scale)) + if cursor_pos_on_tilemaplayer.x < 0: + tile_pos.x -= 1 + if cursor_pos_on_tilemaplayer.y < 0: + tile_pos.y -= 1 + return tile_pos + + +func _tile_pos_to_overlay_pos(tile_pos : Vector2i) -> Vector2: + if not(draw_dock.visible and is_instance_valid(draw_dock.under_edit) and _get_select_mode_button().button_pressed): + return Vector2i.ZERO + return ( + ( + ( + (Vector2(tile_pos) * (Vector2(draw_dock.under_edit.tile_set.tile_size) * draw_dock.under_edit.global_scale)).rotated(draw_dock.under_edit.global_rotation) + draw_dock.under_edit.global_position + ) * EditorInterface.get_editor_viewport_2d().get_final_transform().get_scale() + ) + EditorInterface.get_editor_viewport_2d().get_final_transform().get_origin() + ) + + +func _forward_canvas_draw_over_viewport(overlay): + if lmb_is_down_outside_2d_viewport: + return + + var viewport_2d := EditorInterface.get_editor_viewport_2d() + var g_mouse_pos = ( + EditorInterface.get_base_control().get_global_mouse_position() + - viewport_2d.get_parent().global_position + ) + if not viewport_2d.get_visible_rect().has_point(g_mouse_pos): + return + + var fill := Color(1.0, 0.0, 0.0, 0.2) if draw_dock.rmb_is_down or draw_dock.using_eraser else Color(Color.WHITE, 0.2) + var stroke := Color.RED if draw_dock.rmb_is_down or draw_dock.using_eraser else Color.WHITE + var draw_rect := draw_dock.get_draw_rect(_tile_pos_from_mouse_pos()) + var tl_corner := _tile_pos_to_overlay_pos(draw_rect.position) + var tr_corner := _tile_pos_to_overlay_pos(draw_rect.position + draw_rect.size * Vector2i.RIGHT) + var br_corner := _tile_pos_to_overlay_pos(draw_rect.position + draw_rect.size) + var bl_corner := _tile_pos_to_overlay_pos(draw_rect.position + draw_rect.size * Vector2i.DOWN) + overlay.draw_polyline(PackedVector2Array([tl_corner, tr_corner, br_corner, bl_corner, tl_corner]), stroke, 0.5, true) + + if draw_dock.rmb_is_down or draw_dock.using_eraser: + overlay.draw_polygon(PackedVector2Array([tl_corner, tr_corner, br_corner, bl_corner, tl_corner]), [fill]) + if draw_dock.drag_mode == EZTilesDrawDock.DragMode.BRUSH: + var draw_area := draw_dock.get_draw_area(_tile_pos_from_mouse_pos()) + for tile in draw_area: + var tl := _tile_pos_to_overlay_pos(tile) + var tr := _tile_pos_to_overlay_pos(tile + Vector2i.RIGHT) + var br := _tile_pos_to_overlay_pos(tile + Vector2i.ONE) + var bl := _tile_pos_to_overlay_pos(tile + Vector2i.DOWN) + overlay.draw_polygon(PackedVector2Array([tl, tr, br, bl]), [fill]) + else: + var draw_area := draw_dock.get_draw_area(_tile_pos_from_mouse_pos()) + for tile in draw_area: + var tl := _tile_pos_to_overlay_pos(tile) + var tr := _tile_pos_to_overlay_pos(tile + Vector2i.RIGHT) + var br := _tile_pos_to_overlay_pos(tile + Vector2i.ONE) + var bl := _tile_pos_to_overlay_pos(tile + Vector2i.DOWN) + overlay.draw_polygon(PackedVector2Array([tl, tr, br, bl]), [fill]) + + + +func _input(_event) -> void: + update_overlays() + + if is_instance_valid(draw_dock.under_edit) and select_2D_viewport_button.button_pressed and _get_select_mode_button().button_pressed and draw_dock.visible: + var viewport_2d := EditorInterface.get_editor_viewport_2d() + var g_mouse_pos = ( + EditorInterface.get_base_control().get_global_mouse_position() + - viewport_2d.get_parent().global_position + ) + + if ((viewport_2d.get_visible_rect().has_point(g_mouse_pos) + and not lmb_is_down_outside_2d_viewport + and not (g_mouse_pos.x <= 164 and g_mouse_pos.y <= 40)) + or draw_dock.lmb_is_down or draw_dock.rmb_is_down): + + var tile_pos := _tile_pos_from_mouse_pos() + if (Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) + and not draw_dock.lmb_is_down + and not lmb_is_down_outside_2d_viewport): + draw_dock.handle_mouse_down(MOUSE_BUTTON_LEFT, tile_pos) + + if Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT) and not draw_dock.rmb_is_down: + draw_dock.handle_mouse_down(MOUSE_BUTTON_RIGHT, tile_pos) + + if draw_dock.lmb_is_down and not Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT): + draw_dock.handle_mouse_up(MOUSE_BUTTON_LEFT, tile_pos) + + if draw_dock.rmb_is_down and not Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT): + draw_dock.handle_mouse_up(MOUSE_BUTTON_RIGHT, tile_pos) + + if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) and draw_dock.lmb_is_down: + viewport_2d.set_input_as_handled() + elif Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT): + viewport_2d.set_input_as_handled() + + if Input.is_key_pressed(KEY_CTRL): + draw_dock._place_back_remembered_cells() + draw_dock.suppress_preview = true + else: + draw_dock.suppress_preview = false + + if not draw_dock.viewport_has_mouse: + draw_dock.handle_mouse_entered() + if prev_pos != tile_pos: + draw_dock.handle_mouse_move(tile_pos) + prev_pos = tile_pos + else: + lmb_is_down_outside_2d_viewport = Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) + if draw_dock.viewport_has_mouse: + draw_dock.handle_mouse_out() + + +func handle_selected_node(): + var selected_node : Node = selection.get_selected_nodes().pop_back() + if is_instance_valid(selected_node) and selected_node is TileMapLayer and is_instance_valid(selected_node.tile_set): + draw_dock.activate(selected_node) + if selected_node.has_meta("_is_ez_tiles_generated"): + await get_tree().create_timer(0.5).timeout + make_bottom_panel_item_visible(draw_dock) + else: + draw_dock.deactivate() + + +func _exit_tree() -> void: + remove_control_from_bottom_panel(dock) + dock.free() + remove_control_from_bottom_panel(draw_dock) + draw_dock.free() diff --git a/addons/ez_tiles/ez_tiles.gd.uid b/addons/ez_tiles/ez_tiles.gd.uid new file mode 100644 index 0000000..6eb13e3 --- /dev/null +++ b/addons/ez_tiles/ez_tiles.gd.uid @@ -0,0 +1 @@ +uid://brinsj5s31qgh diff --git a/addons/ez_tiles/ez_tiles_dock.gd b/addons/ez_tiles/ez_tiles_dock.gd new file mode 100644 index 0000000..7644ba2 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_dock.gd @@ -0,0 +1,408 @@ +@tool +class_name EZTilesDock + +extends HBoxContainer + +signal request_tile_map_layer(tile_set : TileSet) + +enum CollisionType { + RECT, + TOP_SLOPES, + NONE, + ALL_SLOPES, + BOTTOM_SLOPES, + ROUNDED, + INVERSE_ROUNDED, + TREE, + CACTUS, + NAVIGABLE +} + +var collision_previews := {} +var num_regex := RegEx.new() +var images_container : ImagesContainer +var x_size_input : EditorSpinSlider +var y_size_input : EditorSpinSlider +var generate_template_button : Button +var generate_tileset_button : Button +var generate_tilemaplayer_button : Button +var overlay_texture_rect : TextureRect +var preview_texture_rect : TextureRect +var guide_texture_rect : TextureRect +var reset_zoom_button : Button +var resource_map : Dictionary = {} +var collision_type_map : Dictionary = {} +var zoom := 1.0 +var save_template_file_dialog : EditorFileDialog +var save_tile_set_file_dialog : EditorFileDialog +var hint_color := Color(0, 0, 0, 0.702) +var collision_layer_color := Color(1.0, 0.0, 0.0, 0.4) + +func _enter_tree() -> void: + num_regex.compile("^\\d+\\.?\\d*$") + images_container = find_child("ImagesContainer") + x_size_input = EditorSpinSlider.new() + y_size_input = EditorSpinSlider.new() + x_size_input.value = 16 + y_size_input.value = 16 + x_size_input.min_value = 2 + x_size_input.max_value = 2048 + y_size_input.min_value = 2 + y_size_input.max_value = 2048 + find_child("XSizeInputContainer").add_child(x_size_input) + find_child("YSizeInputContainer").add_child(y_size_input) + generate_template_button = find_child("GenerateTemplateButton") + generate_tileset_button = find_child("GenerateTileSetButton") + generate_tilemaplayer_button = find_child("GenerateTileMapLayerButton") + overlay_texture_rect = find_child("OverlayTextureRect") + preview_texture_rect = find_child("PreviewTextureRect") + guide_texture_rect = find_child("GuideTextureRect") + reset_zoom_button = find_child("ResetZoomButton") + preview_texture_rect.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST + overlay_texture_rect.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST + save_template_file_dialog = EditorFileDialog.new() + save_template_file_dialog.add_filter("*.png", "PNG image") + save_template_file_dialog.file_mode = EditorFileDialog.FILE_MODE_SAVE_FILE + save_template_file_dialog.file_selected.connect(_on_save_template_file_selected) + EditorInterface.get_base_control().add_child(save_template_file_dialog) + save_tile_set_file_dialog = EditorFileDialog.new() + save_tile_set_file_dialog.add_filter("*.tres,*.res", "Resource file") + save_tile_set_file_dialog.file_mode = EditorFileDialog.FILE_MODE_SAVE_FILE + save_tile_set_file_dialog.file_selected.connect(_on_save_tile_set_file_selected) + EditorInterface.get_base_control().add_child(save_tile_set_file_dialog) + collision_previews[CollisionType.RECT] = preview_texture_rect.find_child("Rectangles") + collision_previews[CollisionType.ALL_SLOPES] = preview_texture_rect.find_child("Sloped (All Corners)") + collision_previews[CollisionType.BOTTOM_SLOPES] = preview_texture_rect.find_child("Sloped (Bottom Corners)") + collision_previews[CollisionType.TOP_SLOPES] = preview_texture_rect.find_child("Sloped (Top Corners)") + collision_previews[CollisionType.ROUNDED] = preview_texture_rect.find_child("Rounded Corners") + collision_previews[CollisionType.INVERSE_ROUNDED] = preview_texture_rect.find_child("Rounded Corners (Inverse)") + collision_previews[CollisionType.TREE] = preview_texture_rect.find_child("Tree") + collision_previews[CollisionType.CACTUS] = preview_texture_rect.find_child("Cactus") + x_size_input.value_changed.connect(func(n): handle_tilesize_update()) + y_size_input.value_changed.connect(func(n): handle_tilesize_update()) + handle_tilesize_update() + + +func _on_file_menu_load_files(files : PackedStringArray) -> void: + load_files(files) + + +func _on_images_container_drop_files(files: PackedStringArray) -> void: + load_files(files) + + +func _on_preview_panel_container_drop_files(files: PackedStringArray) -> void: + load_files(files) + + +func validate_size(actual : Vector2) -> String: + var tile_size = Vector2i( + x_size_input.value, + y_size_input.value + ) + if not tile_size: + return "" + + var expected = Vector2i( + x_size_input.value * 6, + y_size_input.value * 4 + ) + if expected.x != actual.x or expected.y != actual.y: + return """ + Invalid size detected for %dx%d tiles! + Expected size = %dx%d pixels + Actual size = %dx%d pixels + """ % [tile_size.x, tile_size.y, expected.x, expected.y, actual.x, actual.y] + return "" + + +func load_files(files : PackedStringArray): + for file in files: + var im := ResourceLoader.load(file, "Image") + if im is CompressedTexture2D and not resource_map.has(im.get_rid()): + var detected_size = im.get_size() + var validation := "" + if not resource_map.is_empty(): + validation = validate_size(detected_size) + images_container.add_file(im, validation) + if resource_map.is_empty(): + var tile_size := Vector2(float(detected_size.x) / 6.0, float(detected_size.y) / 4.0) + x_size_input.value = tile_size.x + y_size_input.value = tile_size.y + x_size_input.read_only = true + y_size_input.read_only = true + generate_tileset_button.disabled = false + generate_tilemaplayer_button.disabled = false + handle_tilesize_update() + + resource_map[im.get_rid()] = im + collision_type_map[im.get_rid()] = CollisionType.NONE + preview_texture_rect.texture = im + _show_collision_preview(im.get_rid()) + + +func _show_collision_preview(resource_id : RID) -> void: + for c : Node in collision_previews.values(): + c.hide() + if collision_type_map.has(resource_id) and collision_previews.has(collision_type_map[resource_id]): + collision_previews[collision_type_map[resource_id]].show() + + +func _on_images_container_terrain_list_collision_type_selected( + resource_id: RID, type_id: EZTilesDock.CollisionType) -> void: + collision_type_map[resource_id] = type_id + _on_images_container_terrain_list_entry_selected(resource_id) + + +func _on_images_container_terrain_list_entry_removed(removed_resource_id : RID) -> void: + resource_map.erase(removed_resource_id) + collision_type_map.erase(removed_resource_id) + if preview_texture_rect.texture and preview_texture_rect.texture.get_rid() == removed_resource_id: + preview_texture_rect.texture = null + + if resource_map.size() == 0: + x_size_input.value = 16 + y_size_input.value = 16 + x_size_input.read_only = false + y_size_input.read_only = false + generate_tileset_button.disabled = true + generate_tilemaplayer_button.disabled = true + handle_tilesize_update() + for c : Node2D in collision_previews.values(): + c.hide() + + +func _redraw_overlay_texture() -> void: + var tile_size := Vector2i(x_size_input.value, y_size_input.value) + var new_template_overlay := Image.create_empty(tile_size.x * 6, tile_size.y * 4, false, Image.FORMAT_RGBA8) + for y in range(new_template_overlay.get_height()): + for x in range(new_template_overlay.get_width()): + if ( + (x >= tile_size.x * 2 and y < tile_size.y * 3 and x < tile_size.x * 3) or + (x < tile_size.x and y >= tile_size.y and y < tile_size.y * 3) or + (x >= tile_size.x * 3 and y >= tile_size.y * 3) + ): + new_template_overlay.set_pixel(x, y, hint_color) + overlay_texture_rect.texture = ImageTexture.create_from_image(new_template_overlay) + guide_texture_rect.modulate = hint_color + for c : Node2D in collision_previews.values(): + c.modulate = collision_layer_color + +func handle_tilesize_update() -> void: + generate_template_button.disabled = false + _redraw_overlay_texture() + resize_texture_rects(1) + + +func resize_texture_rects(new_zoom : float): + zoom = new_zoom + var new_size := Vector2( + float(x_size_input.value) * 6 * zoom, + float(y_size_input.value) * 4 * zoom + ) + preview_texture_rect.custom_minimum_size = new_size + overlay_texture_rect.custom_minimum_size = new_size + guide_texture_rect.custom_minimum_size = new_size + reset_zoom_button.text = str(zoom * 100) + "%" + for c : Node2D in collision_previews.values(): + c.scale = Vector2(float(x_size_input.value), float(y_size_input.value)) * zoom + + +func _on_images_container_terrain_list_entry_selected(resource_id: RID) -> void: + preview_texture_rect.texture = resource_map[resource_id] + _show_collision_preview(resource_id) + + +func _on_preview_panel_container_gui_input(event: InputEvent) -> void: + if event is InputEventMouseButton: + if event.button_index == MOUSE_BUTTON_WHEEL_UP and event.pressed: + resize_texture_rects(zoom + 0.25) + if event.button_index == MOUSE_BUTTON_WHEEL_DOWN and event.pressed: + resize_texture_rects(zoom - 0.25) + + +func _on_zoom_out_button_pressed() -> void: + resize_texture_rects(zoom - 0.25) + + +func _on_reset_zoom_button_pressed() -> void: + resize_texture_rects(1) + + +func _on_zoom_in_button_pressed() -> void: + resize_texture_rects(zoom + 0.25) + + +func _on_generate_template_button_pressed() -> void: + save_template_file_dialog.set_current_path( + "res://template_%dx%d.png" % [x_size_input.value, y_size_input.value]) + save_template_file_dialog.popup_file_dialog() + + +func _on_save_template_file_selected(path : String) -> void: + var export_image := Image.create_empty(overlay_texture_rect.texture.get_size().x, overlay_texture_rect.texture.get_size().y, false, Image.FORMAT_RGBA8) + var overlay_image := overlay_texture_rect.texture.get_image() + var guide_image := guide_texture_rect.texture.get_image() + var tile_size := Vector2(float(x_size_input.value), float(y_size_input.value)) + + for x in range(overlay_image.get_size().x): + for y in range(overlay_image.get_size().y): + if overlay_image.get_pixel(x, y).a > 0.0: + export_image.set_pixel(x, y, hint_color) + elif guide_image.get_pixel(int((x / tile_size.x) * 256), int((y / tile_size.y) * 256)).a > 0.0: + export_image.set_pixel(x, y, hint_color) + export_image.save_png(path) + EditorInterface.get_resource_filesystem().scan() + + +func _on_color_picker_button_color_changed(color: Color) -> void: + hint_color = color + _redraw_overlay_texture() + + +func _on_collision_layer_color_picker_button_color_changed(color: Color) -> void: + collision_layer_color = color + for c : Node2D in collision_previews.values(): + c.modulate = collision_layer_color + + +func _on_generate_tile_set_button_pressed() -> void: + save_tile_set_file_dialog.set_current_path("res://tile_set.tres") + save_tile_set_file_dialog.popup_file_dialog() + + +func _on_save_tile_set_file_selected(path : String) -> void: + var tile_set := generate_tileset() + ResourceSaver.save(tile_set, path) + EditorInterface.get_resource_filesystem().scan() + + +func _on_generate_tile_map_layer_button_pressed() -> void: + var tile_set := generate_tileset() + request_tile_map_layer.emit(tile_set) + + +func generate_tileset() -> TileSet: + var raw_intel := images_container.gather_data() + var tile_set := TileSet.new() + var physics_layer_added := false + var nav_layer_added := false + tile_set.add_terrain_set() + tile_set.set_terrain_set_mode(0, TileSet.TERRAIN_MODE_MATCH_SIDES) + tile_set.tile_size = Vector2i(x_size_input.value, y_size_input.value) + + for terrain_id in range(raw_intel.size()): + tile_set.add_terrain(0, terrain_id) + tile_set.set_terrain_name(0, terrain_id, raw_intel[terrain_id]["terrain_name"]) + if raw_intel[terrain_id]["layer_type"] != CollisionType.NONE and not physics_layer_added: + tile_set.add_physics_layer() + physics_layer_added = true + if raw_intel[terrain_id]["layer_type"] == CollisionType.NAVIGABLE and not nav_layer_added: + tile_set.add_navigation_layer() + nav_layer_added = true + + for terrain_id in range(raw_intel.size()): + var atlas_source := TileSetAtlasSource.new() + atlas_source.texture_region_size = tile_set.tile_size + atlas_source.texture = raw_intel[terrain_id]["texture_resource"] + tile_set.add_source(atlas_source) + var created_tiles : Array[TileData] = [] + # row + created_tiles.append(create_tile(atlas_source, terrain_id, Vector2i(0,0), _get_collision_polygon_for_tile("MC", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_single_neighbour_tile(atlas_source, terrain_id, Vector2i(1,0), raw_intel.size(), TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, _get_collision_polygon_for_tile("VT", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(3,0), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE], _get_collision_polygon_for_tile("TL", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_triple_neighbour_tile(atlas_source, terrain_id, Vector2i(4,0), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE, TileSet.CELL_NEIGHBOR_LEFT_SIDE], _get_collision_polygon_for_tile("TM", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(5,0), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_LEFT_SIDE], _get_collision_polygon_for_tile("TR", atlas_source.texture.get_rid(), tile_set.tile_size))) + + # row + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(1,1), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_TOP_SIDE], _get_collision_polygon_for_tile("VM", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_triple_neighbour_tile(atlas_source, terrain_id, Vector2i(3,1), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE, TileSet.CELL_NEIGHBOR_TOP_SIDE], _get_collision_polygon_for_tile("LM", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_all_sides_neighbour_tile(atlas_source, terrain_id, Vector2i(4,1), raw_intel.size(), _get_collision_polygon_for_tile("CM", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_triple_neighbour_tile(atlas_source, terrain_id, Vector2i(5,1), raw_intel.size(), [TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, TileSet.CELL_NEIGHBOR_LEFT_SIDE, TileSet.CELL_NEIGHBOR_TOP_SIDE], _get_collision_polygon_for_tile("RM", atlas_source.texture.get_rid(), tile_set.tile_size))) + + # row + created_tiles.append(create_single_neighbour_tile(atlas_source, terrain_id, Vector2i(1,2), raw_intel.size(), TileSet.CELL_NEIGHBOR_TOP_SIDE, _get_collision_polygon_for_tile("VB", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(3,2), raw_intel.size(), [TileSet.CELL_NEIGHBOR_TOP_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE], _get_collision_polygon_for_tile("BL", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_triple_neighbour_tile(atlas_source, terrain_id, Vector2i(4,2), raw_intel.size(), [TileSet.CELL_NEIGHBOR_TOP_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE, TileSet.CELL_NEIGHBOR_LEFT_SIDE], _get_collision_polygon_for_tile("BC", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(5,2), raw_intel.size(), [TileSet.CELL_NEIGHBOR_TOP_SIDE, TileSet.CELL_NEIGHBOR_LEFT_SIDE], _get_collision_polygon_for_tile("BR", atlas_source.texture.get_rid(), tile_set.tile_size))) + + # row + created_tiles.append(create_single_neighbour_tile(atlas_source, terrain_id, Vector2i(0,3), raw_intel.size(), TileSet.CELL_NEIGHBOR_RIGHT_SIDE, _get_collision_polygon_for_tile("HL", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_dual_neighbour_tile(atlas_source, terrain_id, Vector2i(1,3), raw_intel.size(), [TileSet.CELL_NEIGHBOR_LEFT_SIDE, TileSet.CELL_NEIGHBOR_RIGHT_SIDE], _get_collision_polygon_for_tile("HM", atlas_source.texture.get_rid(), tile_set.tile_size))) + created_tiles.append(create_single_neighbour_tile(atlas_source, terrain_id, Vector2i(2,3), raw_intel.size(), TileSet.CELL_NEIGHBOR_LEFT_SIDE, _get_collision_polygon_for_tile("HR", atlas_source.texture.get_rid(), tile_set.tile_size))) + if raw_intel[terrain_id]["layer_type"] == CollisionType.NAVIGABLE: + for tile_data : TileData in created_tiles: + tile_data.set_navigation_polygon(0, _get_new_navigation_rect(Vector2(tile_set.tile_size))) + return tile_set + + +func _get_new_navigation_rect(tile_size : Vector2) -> NavigationPolygon: + var new_navigation_mesh = NavigationPolygon.new() + var new_vertices = PackedVector2Array([ + Vector2(-0.5, -0.5) * tile_size, + Vector2(0.5, -0.5) * tile_size, + Vector2(0.5, 0.5) * tile_size, + Vector2(-0.5, 0.5) * tile_size + ]) + new_navigation_mesh.vertices = new_vertices + var new_polygon_indices = PackedInt32Array([0, 1, 2, 3]) + new_navigation_mesh.add_polygon(new_polygon_indices) + return new_navigation_mesh + + +func _get_collision_polygon_for_tile(node_name : String, resource_id : RID, tile_size : Vector2) -> PackedVector2Array: + #print(resource_id, collision_type_map.has(resource_id)) + if not collision_type_map.has(resource_id): + return PackedVector2Array([]) + + if not collision_previews.has(collision_type_map[resource_id]): + return PackedVector2Array([]) + var polygon_node : Polygon2D = collision_previews[collision_type_map[resource_id]].find_child(node_name) + if is_instance_valid(polygon_node): + var poly_points : Array[Vector2] = [] + for point : Vector2 in polygon_node.polygon: + poly_points.append((point - Vector2(0.5, 0.5)) * tile_size) + return PackedVector2Array(poly_points) + return PackedVector2Array([]) + + +func create_tile(atlas_source : TileSetAtlasSource, terrain_id : int, at_pos : Vector2i, collision_polygon_points : PackedVector2Array) -> TileData: + atlas_source.create_tile(at_pos) + var new_tile := atlas_source.get_tile_data(at_pos, 0) + new_tile.terrain_set = 0 + new_tile.terrain = terrain_id + if not collision_polygon_points.is_empty(): + new_tile.add_collision_polygon(0) + new_tile.set_collision_polygon_points(0, 0, PackedVector2Array(collision_polygon_points)) + return new_tile + + +func create_single_neighbour_tile(atlas_source : TileSetAtlasSource, terrain_id : int, at_pos : Vector2i, num_terrains : int, neighbour : int, collision_polygon_points : PackedVector2Array) -> TileData: + var new_tile := create_tile(atlas_source, terrain_id, at_pos, collision_polygon_points) + new_tile.set_terrain_peering_bit(neighbour, terrain_id) + return new_tile + + +func create_dual_neighbour_tile(atlas_source : TileSetAtlasSource, terrain_id : int, at_pos : Vector2i, num_terrains : int, neighbours : Array[int], collision_polygon_points : PackedVector2Array) -> TileData: + var new_tile := create_tile(atlas_source, terrain_id, at_pos, collision_polygon_points) + new_tile.set_terrain_peering_bit(neighbours[0], terrain_id) + new_tile.set_terrain_peering_bit(neighbours[1], terrain_id) + return new_tile + + +func create_triple_neighbour_tile(atlas_source : TileSetAtlasSource, terrain_id : int, at_pos : Vector2i, num_terrains : int, neighbours : Array[int], collision_polygon_points : PackedVector2Array) -> TileData: + var new_tile := create_tile(atlas_source, terrain_id, at_pos, collision_polygon_points) + new_tile.set_terrain_peering_bit(neighbours[0], terrain_id) + new_tile.set_terrain_peering_bit(neighbours[1], terrain_id) + new_tile.set_terrain_peering_bit(neighbours[2], terrain_id) + return new_tile + + +func create_all_sides_neighbour_tile(atlas_source : TileSetAtlasSource, terrain_id : int, at_pos : Vector2i, num_terrains : int, collision_polygon_points : PackedVector2Array) -> TileData: + var new_tile := create_tile(atlas_source, terrain_id, at_pos, collision_polygon_points) + new_tile.set_terrain_peering_bit(TileSet.CELL_NEIGHBOR_RIGHT_SIDE, terrain_id) + new_tile.set_terrain_peering_bit(TileSet.CELL_NEIGHBOR_BOTTOM_SIDE, terrain_id) + new_tile.set_terrain_peering_bit(TileSet.CELL_NEIGHBOR_LEFT_SIDE, terrain_id) + new_tile.set_terrain_peering_bit(TileSet.CELL_NEIGHBOR_TOP_SIDE, terrain_id) + return new_tile + diff --git a/addons/ez_tiles/ez_tiles_dock.gd.uid b/addons/ez_tiles/ez_tiles_dock.gd.uid new file mode 100644 index 0000000..75fa74a --- /dev/null +++ b/addons/ez_tiles/ez_tiles_dock.gd.uid @@ -0,0 +1 @@ +uid://dlwkkly71ed7v diff --git a/addons/ez_tiles/ez_tiles_dock.tscn b/addons/ez_tiles/ez_tiles_dock.tscn new file mode 100644 index 0000000..516db75 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_dock.tscn @@ -0,0 +1,211 @@ +[gd_scene load_steps=22 format=3 uid="uid://ci7u5r1qc0aob"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_dock.gd" id="1_xlstp"] +[ext_resource type="Script" path="res://addons/ez_tiles/load_files_button.gd" id="2_8dh4w"] +[ext_resource type="PackedScene" uid="uid://1u5mrsioaaon" path="res://addons/ez_tiles/images_container.tscn" id="3_vxumx"] +[ext_resource type="Texture2D" uid="uid://cxl4w251e8xgf" path="res://addons/ez_tiles/Save.svg" id="4_2smhm"] +[ext_resource type="Texture2D" uid="uid://njliaygubc5c" path="res://addons/ez_tiles/ZoomLess.svg" id="4_k6fm5"] +[ext_resource type="Texture2D" uid="uid://bvwx6xu0hp7mv" path="res://addons/ez_tiles/ZoomMore.svg" id="5_0phj1"] +[ext_resource type="Script" path="res://addons/ez_tiles/preview_panel_container.gd" id="6_3jtbs"] +[ext_resource type="Texture2D" uid="uid://d4a0dorx8awbg" path="res://addons/ez_tiles/guide.png" id="9_umpsr"] +[ext_resource type="PackedScene" uid="uid://cxnhqxx237lix" path="res://addons/ez_tiles/collision_polygon_templates/inverse_rounded_corners.tscn" id="9_wk7qe"] +[ext_resource type="PackedScene" uid="uid://bdtlwd7f6ojk0" path="res://addons/ez_tiles/collision_polygon_templates/rectangles.tscn" id="10_fyd7t"] +[ext_resource type="PackedScene" uid="uid://cm4063l3dfehn" path="res://addons/ez_tiles/collision_polygon_templates/rounded_corners.tscn" id="11_cnbjd"] +[ext_resource type="PackedScene" uid="uid://lfnyjmnayoqe" path="res://addons/ez_tiles/collision_polygon_templates/slopes.tscn" id="12_x4rcv"] +[ext_resource type="PackedScene" uid="uid://ckfu3f4u350bg" path="res://addons/ez_tiles/collision_polygon_templates/slopes_bottom.tscn" id="13_3furq"] +[ext_resource type="PackedScene" uid="uid://3gmoem8hi2hi" path="res://addons/ez_tiles/collision_polygon_templates/slopes_top.tscn" id="14_djl3r"] +[ext_resource type="PackedScene" uid="uid://ywxhlehtt18d" path="res://addons/ez_tiles/collision_polygon_templates/cactus.tscn" id="15_ll5rq"] +[ext_resource type="PackedScene" uid="uid://bp35luh5na8o7" path="res://addons/ez_tiles/collision_polygon_templates/tree.tscn" id="16_02naq"] + +[sub_resource type="LabelSettings" id="LabelSettings_2svd6"] +font_color = Color(0.619608, 0.619608, 0.619608, 1) + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wkbrg"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3l5ec"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ikc07"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fl86h"] +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[node name="EZTilesDock" type="HBoxContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_xlstp") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 40) +layout_mode = 2 + +[node name="LoadFilesButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +text = "Import Images" +script = ExtResource("2_8dh4w") + +[node name="GenerateTileSetButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +disabled = true +text = "Save TileSet" + +[node name="GenerateTileMapLayerButton" type="Button" parent="VBoxContainer/HBoxContainer"] +layout_mode = 2 +disabled = true +text = "Create TileMapLayer" + +[node name="ImagesContainer" parent="VBoxContainer" instance=ExtResource("3_vxumx")] +layout_mode = 2 + +[node name="VBoxContainer2" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer2"] +custom_minimum_size = Vector2(0, 40) +layout_mode = 2 + +[node name="TileSizeLabel" type="Label" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +tooltip_text = "The tile size is determined automatically from the first image you import. As you can see in the template below, EZ Tiles expects a 6 by 4 grid; the tiles do not have to be square." +mouse_filter = 0 +text = "Tile Size* " +label_settings = SubResource("LabelSettings_2svd6") + +[node name="XSizeInputContainer" type="PanelContainer" parent="VBoxContainer2/HBoxContainer"] +custom_minimum_size = Vector2(84, 0) +layout_mode = 2 +size_flags_horizontal = 0 + +[node name="YSizeInputContainer" type="PanelContainer" parent="VBoxContainer2/HBoxContainer"] +custom_minimum_size = Vector2(84, 0) +layout_mode = 2 +size_flags_horizontal = 0 + +[node name="HintColorLabel" type="Label" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +mouse_filter = 0 +text = "Hint colors: " +label_settings = SubResource("LabelSettings_2svd6") + +[node name="ColorPickerButton" type="ColorPickerButton" parent="VBoxContainer2/HBoxContainer"] +custom_minimum_size = Vector2(40, 0) +layout_mode = 2 +tooltip_text = "Overlay Color" +color = Color(0, 0, 0, 0.701961) + +[node name="CollisionLayerColorPickerButton" type="ColorPickerButton" parent="VBoxContainer2/HBoxContainer"] +custom_minimum_size = Vector2(40, 0) +layout_mode = 2 +tooltip_text = "Collision Polygon color" +color = Color(1, 0, 0, 0.392157) + +[node name="GenerateTemplateButton" type="Button" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +disabled = true +text = "Save template" +icon = ExtResource("4_2smhm") + +[node name="ZoomPreviewLabel" type="Label" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Zoom Preview: " +label_settings = SubResource("LabelSettings_2svd6") +horizontal_alignment = 2 + +[node name="ZoomOutButton" type="Button" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxEmpty_wkbrg") +icon = ExtResource("4_k6fm5") + +[node name="ResetZoomButton" type="Button" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxEmpty_3l5ec") +text = "100%" + +[node name="ZoomInButton" type="Button" parent="VBoxContainer2/HBoxContainer"] +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxEmpty_ikc07") +icon = ExtResource("5_0phj1") + +[node name="PreviewScrollContainer" type="ScrollContainer" parent="VBoxContainer2"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_styles/panel = SubResource("StyleBoxFlat_fl86h") + +[node name="PreviewPanelContainer" type="CenterContainer" parent="VBoxContainer2/PreviewScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource("6_3jtbs") + +[node name="PreviewTextureRect" type="TextureRect" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer"] +texture_filter = 1 +layout_mode = 2 +expand_mode = 3 + +[node name="Rounded Corners (Inverse)" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("9_wk7qe")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Rectangles" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("10_fyd7t")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Rounded Corners" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("11_cnbjd")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Sloped (All Corners)" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("12_x4rcv")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Sloped (Bottom Corners)" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("13_3furq")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Sloped (Top Corners)" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("14_djl3r")] +visible = false +modulate = Color(0.970763, 0, 0.452533, 0.42) + +[node name="Cactus" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("15_ll5rq")] +visible = false + +[node name="Tree" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer/PreviewTextureRect" instance=ExtResource("16_02naq")] +visible = false + +[node name="OverlayTextureRect" type="TextureRect" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer"] +texture_filter = 1 +layout_mode = 2 +expand_mode = 3 + +[node name="GuideTextureRect" type="TextureRect" parent="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer"] +modulate = Color(1, 1, 1, 0.701961) +texture_filter = 1 +layout_mode = 2 +texture = ExtResource("9_umpsr") +expand_mode = 3 + +[connection signal="load_files" from="VBoxContainer/HBoxContainer/LoadFilesButton" to="." method="_on_file_menu_load_files"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/LoadFilesButton" to="VBoxContainer/HBoxContainer/LoadFilesButton" method="_on_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/GenerateTileSetButton" to="." method="_on_generate_tile_set_button_pressed"] +[connection signal="pressed" from="VBoxContainer/HBoxContainer/GenerateTileMapLayerButton" to="." method="_on_generate_tile_map_layer_button_pressed"] +[connection signal="drop_files" from="VBoxContainer/ImagesContainer" to="." method="_on_images_container_drop_files"] +[connection signal="terrain_list_collision_type_selected" from="VBoxContainer/ImagesContainer" to="." method="_on_images_container_terrain_list_collision_type_selected"] +[connection signal="terrain_list_entry_removed" from="VBoxContainer/ImagesContainer" to="." method="_on_images_container_terrain_list_entry_removed"] +[connection signal="terrain_list_entry_selected" from="VBoxContainer/ImagesContainer" to="." method="_on_images_container_terrain_list_entry_selected"] +[connection signal="color_changed" from="VBoxContainer2/HBoxContainer/ColorPickerButton" to="." method="_on_color_picker_button_color_changed"] +[connection signal="color_changed" from="VBoxContainer2/HBoxContainer/CollisionLayerColorPickerButton" to="." method="_on_collision_layer_color_picker_button_color_changed"] +[connection signal="pressed" from="VBoxContainer2/HBoxContainer/GenerateTemplateButton" to="." method="_on_generate_template_button_pressed"] +[connection signal="pressed" from="VBoxContainer2/HBoxContainer/ZoomOutButton" to="." method="_on_zoom_out_button_pressed"] +[connection signal="pressed" from="VBoxContainer2/HBoxContainer/ResetZoomButton" to="." method="_on_reset_zoom_button_pressed"] +[connection signal="pressed" from="VBoxContainer2/HBoxContainer/ZoomInButton" to="." method="_on_zoom_in_button_pressed"] +[connection signal="gui_input" from="VBoxContainer2/PreviewScrollContainer" to="." method="_on_preview_panel_container_gui_input"] +[connection signal="drop_files" from="VBoxContainer2/PreviewScrollContainer/PreviewPanelContainer" to="." method="_on_preview_panel_container_drop_files"] diff --git a/addons/ez_tiles/ez_tiles_draw/area_draw.gd b/addons/ez_tiles/ez_tiles_draw/area_draw.gd new file mode 100644 index 0000000..7046cbb --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/area_draw.gd @@ -0,0 +1,381 @@ +@tool +extends Control +class_name AreaDraw + +signal connect_mode_toggled(toggled : bool) + +enum Shape { + RECTANGLE, + SLOPE_TL, + SLOPE_TR, + SLOPE_BR, + SLOPE_BL, + HARD_RECTANGLE, + HILL_TOP, + HILL_BOTTOM, + HILL_RIGHT, + HILL_LEFT, + ISLAND, + RECTANGLE_BASIC +} +var shape := Shape.RECTANGLE_BASIC +var preview_container : GridContainer + +const TL := Vector2i(3, 0) +const TR := Vector2i(5, 0) +const TM := Vector2i(4, 0) +const BL := Vector2i(3, 2) +const BR := Vector2i(5, 2) +const BM := Vector2i(4, 2) +const LM := Vector2i(3, 1) +const RM := Vector2i(5, 1) +const CM := Vector2i(4, 1) +const XX := null + +const SHAPE_MAP := { + Shape.RECTANGLE_BASIC: [ + [CM, CM, CM, CM, CM], + [CM, CM, CM, CM, CM], + [CM, CM, CM, CM, CM], + [CM, CM, CM, CM, CM], + [CM, CM, CM, CM, CM], + ], + Shape.RECTANGLE: [ + [TL, TM, TM, TM, TR], + [LM, CM, CM, CM, RM], + [LM, CM, CM, CM, RM], + [BL, BM, BM, BM, BR], + [XX, XX, XX, XX, XX], + ], + Shape.SLOPE_TL: [ + [XX, XX, XX, TL, TM], + [XX, XX, TL, CM, CM], + [XX, TL, CM, CM, CM], + [TL, CM, CM, CM, CM], + [XX, XX, XX, XX, XX], + ], + Shape.SLOPE_TR: [ + [TM, TR, XX, XX, XX], + [CM, CM, TR, XX, XX], + [CM, CM, CM, TR, XX], + [CM, CM, CM, CM, TR], + [XX, XX, XX, XX, XX], + ], + Shape.SLOPE_BR: [ + [CM, CM, CM, CM, BR], + [CM, CM, CM, BR, XX], + [CM, CM, BR, XX, XX], + [BM, BR, XX, XX, XX], + [XX, XX, XX, XX, XX], + ], + Shape.SLOPE_BL: [ + [BL, CM, CM, CM, CM], + [XX, BL, CM, CM, CM], + [XX, XX, BL, CM, CM], + [XX, XX, XX, BL, BM], + [XX, XX, XX, XX, XX], + ], + Shape.HARD_RECTANGLE: [ + [TM, TM, TM, TM, TM], + [LM, CM, CM, CM, RM], + [LM, CM, CM, CM, RM], + [BM, BM, BM, BM, BM], + [XX, XX, XX, XX, XX], + ], + Shape.HILL_TOP: [ + [XX, TL, TM, TR, XX], + [TL, CM, CM, CM, TR], + [LM, CM, CM, CM, RM], + [LM, CM, CM, CM, RM], + [XX, XX, XX, XX, XX], + ], + Shape.HILL_BOTTOM: [ + [LM, CM, CM, CM, RM], + [LM, CM, CM, CM, RM], + [BL, CM, CM, CM, BR], + [XX, BL, BM, BR, XX], + [XX, XX, XX, XX, XX], + ], + Shape.HILL_LEFT: [ + [XX, TL, TM, TM, TM], + [TL, CM, CM, CM, CM], + [LM, CM, CM, CM, CM], + [BL, CM, CM, CM, CM], + [XX, BL, BM, BM, BM], + ], + Shape.HILL_RIGHT: [ + [TM, TM, TM, TR, XX], + [CM, CM, CM, CM, TR], + [CM, CM, CM, CM, RM], + [CM, CM, CM, CM, BR], + [BM, BM, BM, BR, XX], + ], + Shape.ISLAND: [ + [XX, TL, TM, TR, XX], + [TL, CM, CM, CM, TR], + [CM, CM, CM, CM, RM], + [BL, CM, CM, CM, BR], + [XX, BL, BM, BR, XX], + ], +} + +var cur_terrain_texture : Texture2D +var cur_tile_size : Vector2i +var connect_terrains_button : Button +var tile_button : Button + + +func _enter_tree() -> void: + preview_container = find_child("PreviewGridContainer") + connect_terrains_button = find_child("ConnectTerrainsButton") + tile_button = find_child("TileButton1") + + +func _get_empty_tex(tile_size : Vector2i) -> Texture2D: + var plc_tex := GradientTexture2D.new() + plc_tex.width = tile_size.x + plc_tex.height = tile_size.y + plc_tex.gradient = Gradient.new() + plc_tex.gradient.colors = [Color.TRANSPARENT] + return plc_tex + + +func update_grid_preview(terrain_texture : Texture2D = cur_terrain_texture, tile_size : Vector2i = cur_tile_size): + tile_button.icon = AtlasTexture.new() + tile_button.icon.atlas = terrain_texture + tile_button.icon.region = Rect2i(CM * tile_size, tile_size) + cur_terrain_texture = terrain_texture + cur_tile_size = tile_size + var i := 0 + for y in range(SHAPE_MAP[shape].size()): + for x in range(SHAPE_MAP[shape][y].size()): + var tex_rect : TextureRect = preview_container.get_child(i) + i += 1 + if not is_instance_valid(tex_rect): + continue + if SHAPE_MAP[shape][y][x] == null: + tex_rect.texture = _get_empty_tex(tile_size) + continue + var atlas_texture : AtlasTexture = tex_rect.texture if tex_rect.texture is AtlasTexture else AtlasTexture.new() + atlas_texture.atlas = terrain_texture + atlas_texture.region = Rect2i(SHAPE_MAP[shape][y][x] * tile_size, tile_size) + tex_rect.texture = atlas_texture + + +static func get_cells_rectangle_basic(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var cells := {} + for x in range(p1.x, p2.x + 1): + for y in range(p1.y, p2.y + 1): + cells[Vector2i(x, y)] = CM + return cells + + +static func get_cells_rectangle(p1 : Vector2i, p2 : Vector2i, soft := false) -> Dictionary: + var cells := {} + for x in range(p1.x, p2.x + 1): + for y in range(p1.y, p2.y + 1): + if x == p1.x and y == p1.y and soft: + cells[Vector2i(x, y)] = TL + elif x == p2.x and y == p1.y and soft: + cells[Vector2i(x, y)] = TR + elif x == p1.x and y == p2.y and soft: + cells[Vector2i(x, y)] = BL + elif x == p2.x and y == p2.y and soft: + cells[Vector2i(x, y)] = BR + elif x == p2.x and y > p1.y and y < p2.y: + cells[Vector2i(x, y)] = RM + elif x == p1.x and y > p1.y and y < p2.y: + cells[Vector2i(x, y)] = LM + elif y == p2.y: + cells[Vector2i(x, y)] = BM + elif y == p1.y: + cells[Vector2i(x, y)] = TM + else: + cells[Vector2i(x, y)] = CM + return cells + + +static func get_cells_slope_tl(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var cells := {} + var width := p2.x - p1.x + 1 + var height := p2.y - p1.y + 1 + var sq_siz := min(width, height) + for y : int in range(sq_siz): + var range_start = sq_siz - y - 1 if sq_siz - y - 1 > 0 else 0 + for x in range(range_start, sq_siz): + cells[Vector2i(p1.x + x, p1.y + y)] = TL if x == range_start else CM + if width > sq_siz: + for x in range(sq_siz, width): + for y in range(height): + cells[Vector2i(p1.x + x, p1.y + y)] = TM if y == 0 else CM + else: + for y in range(sq_siz, height): + for x in range(width): + cells[Vector2i(p1.x + x, p1.y + y)] = LM if x == 0 else CM + return cells + +static func get_cells_slope_tr(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var cells := {} + var width := p2.x - p1.x + 1 + var height := p2.y - p1.y + 1 + var sq_siz := min(width, height) + for y : int in range(sq_siz): + var range_start = sq_siz - y - 1 if sq_siz - y - 1 > 0 else 0 + for x in range(range_start, sq_siz): + cells[Vector2i(p1.x + (width-x-1), p1.y + y)] = TR if x == range_start else CM + if width > sq_siz: + for x in range(sq_siz, width): + for y in range(height): + cells[Vector2i(p1.x + (width-x-1), p1.y + y)] = TM if y == 0 else CM + else: + for y in range(sq_siz, height): + for x in range(width): + cells[Vector2i(p1.x + (width-x-1), p1.y + y)] = RM if x == 0 else CM + return cells + +static func get_cells_slope_bl(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var cells := {} + var width := p2.x - p1.x + 1 + var height := p2.y - p1.y + 1 + var sq_siz := min(width, height) + for y : int in range(sq_siz): + var range_start = sq_siz - y - 1 if sq_siz - y - 1 > 0 else 0 + for x in range(range_start, sq_siz): + cells[Vector2i(p1.x + x, p1.y + (height - y - 1))] = BL if x == range_start else CM + if width > sq_siz: + for x in range(sq_siz, width): + for y in range(height): + cells[Vector2i(p1.x + x, p1.y + (height - y - 1))] = BM if y == 0 else CM + else: + for y in range(sq_siz, height): + for x in range(width): + cells[Vector2i(p1.x + x, p1.y + (height - y - 1))] = LM if x == 0 else CM + return cells + +static func get_cells_slope_br(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var cells := {} + var width := p2.x - p1.x + 1 + var height := p2.y - p1.y + 1 + var sq_siz := min(width, height) + for y : int in range(sq_siz): + var range_start = sq_siz - y - 1 if sq_siz - y - 1 > 0 else 0 + for x in range(range_start, sq_siz): + cells[Vector2i(p1.x + (width-x-1), p1.y + (height - y - 1))] = BR if x == range_start else CM + if width > sq_siz: + for x in range(sq_siz, width): + for y in range(height): + cells[Vector2i(p1.x + (width-x-1), p1.y + (height - y - 1))] = BM if y == 0 else CM + else: + for y in range(sq_siz, height): + for x in range(width): + cells[Vector2i(p1.x + (width-x-1), p1.y + (height - y - 1))] = RM if x == 0 else CM + return cells + +static func get_cells_hill_top(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var width := p2.x - p1.x + var height := p2.y - p1.y + var out = get_cells_slope_tl(p1, p1 + Vector2i(ceil(width / 2.0) - 1, height)) + out.merge(get_cells_slope_tr(p1 + Vector2i(ceil(width / 2.0), 0), p2)) + return out + + +static func get_cells_hill_bottom(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var width := p2.x - p1.x + var height := p2.y - p1.y + var out = get_cells_slope_bl(p1, p1 + Vector2i(ceil(width / 2.0) - 1, height)) + out.merge(get_cells_slope_br(p1 + Vector2i(ceil(width / 2.0), 0), p2)) + return out + +static func get_cells_hill_left(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var width := p2.x - p1.x + var height := p2.y - p1.y + var out = get_cells_slope_tl(p1, p1 + Vector2i(width, ceil(height / 2.0) - 1)) + out.merge(get_cells_slope_bl(p1 + Vector2i(0, ceil(height / 2.0)), p2)) + return out + + +static func get_cells_hill_right(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var width := p2.x - p1.x + var height := p2.y - p1.y + var out = get_cells_slope_tr(p1, p1 + Vector2i(width, ceil(height / 2.0) - 1)) + out.merge(get_cells_slope_br(p1 + Vector2i(0, ceil(height / 2.0)), p2)) + return out + + +static func get_cells_island(p1 : Vector2i, p2 : Vector2i) -> Dictionary: + var width := p2.x - p1.x + var height := p2.y - p1.y + var out = get_cells_slope_tl(p1, p1 + Vector2i(ceil(width / 2.0) - 1, ceil(height / 2.0) - 1)) + out.merge(get_cells_slope_tr(p1 + Vector2i(ceil(width / 2.0), 0), Vector2i(p2.x, p1.y + ceil(height / 2.0) - 1))) + out.merge(get_cells_slope_bl(p1 + Vector2i(0, ceil(height / 2.0)), Vector2i(p1.x + ceil(width / 2.0) - 1, p2.y))) + out.merge(get_cells_slope_br(p1 + Vector2i(ceil(width / 2.0), ceil(height / 2.0)), p2), true) + return out + + + +func _on_connect_terrains_button_pressed() -> void: + connect_mode_toggled.emit(true) + + +func _on_tile_button_1_pressed() -> void: + connect_mode_toggled.emit(false) + + +func _on_rectangles_button_pressed() -> void: + shape = Shape.RECTANGLE + update_grid_preview() + + +func _on_slopes_tl_button_pressed() -> void: + shape = Shape.SLOPE_TL + update_grid_preview() + + +func _on_slopes_tr_button_pressed() -> void: + shape = Shape.SLOPE_TR + update_grid_preview() + + +func _on_slopes_br_button_pressed() -> void: + shape = Shape.SLOPE_BR + update_grid_preview() + + +func _on_slopes_bl_button_pressed() -> void: + shape = Shape.SLOPE_BL + update_grid_preview() + + +func _on_hard_rectangles_button_pressed() -> void: + shape = Shape.HARD_RECTANGLE + update_grid_preview() + + +func _on_hill_top_button_pressed() -> void: + shape = Shape.HILL_TOP + update_grid_preview() + + +func _on_hill_bottom_button_pressed() -> void: + shape = Shape.HILL_BOTTOM + update_grid_preview() + + +func _on_hill_left_button_pressed() -> void: + shape = Shape.HILL_LEFT + update_grid_preview() + + +func _on_hill_right_button_pressed() -> void: + shape = Shape.HILL_RIGHT + update_grid_preview() + + +func _on_island_button_pressed() -> void: + shape = Shape.ISLAND + update_grid_preview() + + +func _on_rectangles_basic_button_pressed() -> void: + shape = Shape.RECTANGLE_BASIC + update_grid_preview() diff --git a/addons/ez_tiles/ez_tiles_draw/area_draw.gd.uid b/addons/ez_tiles/ez_tiles_draw/area_draw.gd.uid new file mode 100644 index 0000000..fd7cf67 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/area_draw.gd.uid @@ -0,0 +1 @@ +uid://b87n11kajm34 diff --git a/addons/ez_tiles/ez_tiles_draw/area_draw.tscn b/addons/ez_tiles/ez_tiles_draw/area_draw.tscn new file mode 100644 index 0000000..eef1f13 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/area_draw.tscn @@ -0,0 +1,389 @@ +[gd_scene load_steps=18 format=3 uid="uid://bitqwiwmn3s0r"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/area_draw.gd" id="1_ee3lv"] +[ext_resource type="Texture2D" uid="uid://dooqg3fapf15x" path="res://addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg" id="2_0c16j"] +[ext_resource type="Texture2D" uid="uid://xetkyyw6y8ff" path="res://addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg" id="2_lfgj6"] +[ext_resource type="Texture2D" uid="uid://behgjlyeldpdv" path="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg" id="3_j68q8"] +[ext_resource type="Texture2D" uid="uid://dbjof7q6tq4d6" path="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg" id="4_703fo"] +[ext_resource type="Texture2D" uid="uid://7crpolmxjj2r" path="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg" id="5_f5qx1"] +[ext_resource type="Texture2D" uid="uid://clpg11r4kdy8v" path="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg" id="6_r38ls"] +[ext_resource type="Texture2D" uid="uid://c7u17hgk6jvet" path="res://addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg" id="8_05x1s"] +[ext_resource type="Texture2D" uid="uid://cri2mdk3hr6s1" path="res://addons/ez_tiles/ez_tiles_draw/icons/HillT.svg" id="8_trf31"] +[ext_resource type="Texture2D" uid="uid://dntkx0h8qim1n" path="res://addons/ez_tiles/ez_tiles_draw/icons/HillB.svg" id="9_abenc"] +[ext_resource type="Texture2D" uid="uid://dpmrju1gvdr16" path="res://addons/ez_tiles/ez_tiles_draw/icons/HillL.svg" id="10_dsu38"] +[ext_resource type="Texture2D" uid="uid://dv855gccwqgu" path="res://addons/ez_tiles/ez_tiles_draw/icons/HillR.svg" id="11_nyydi"] +[ext_resource type="Texture2D" uid="uid://frudvs8p10ea" path="res://addons/ez_tiles/ez_tiles_draw/icons/Island.svg" id="12_qvlkp"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_51lt4"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.211765, 0.239216, 0.290196, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ehgjy"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[sub_resource type="ButtonGroup" id="ButtonGroup_82nql"] + +[sub_resource type="ButtonGroup" id="ButtonGroup_3cdnu"] + +[node name="AreaDraw" type="PanelContainer"] +clip_children = 2 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_51lt4") +script = ExtResource("1_ee3lv") +metadata/_tab_index = 0 + +[node name="HBoxContainer" type="HBoxContainer" parent="."] +layout_mode = 2 + +[node name="Panel2" type="Panel" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_stretch_ratio = 0.3 +theme_override_styles/panel = SubResource("StyleBoxFlat_ehgjy") + +[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/Panel2"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/Panel2/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="RectanglesBasicButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_82nql") +text = "Rectangle" +icon = ExtResource("2_0c16j") +alignment = 0 + +[node name="RectanglesButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Rectangle (Soft)" +icon = ExtResource("2_lfgj6") +alignment = 0 + +[node name="HardRectanglesButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Rectangle (Hard)" +icon = ExtResource("2_0c16j") +alignment = 0 + +[node name="SlopesTLButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Slope (Top Left)" +icon = ExtResource("3_j68q8") +alignment = 0 + +[node name="SlopesTRButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Slope (Top Right)" +icon = ExtResource("4_703fo") +alignment = 0 + +[node name="SlopesBRButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Slope (Bottom Right)" +icon = ExtResource("5_f5qx1") +alignment = 0 + +[node name="SlopesBLButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Slope (Bottom Left)" +icon = ExtResource("6_r38ls") +alignment = 0 + +[node name="HillTopButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Hill (Top)" +icon = ExtResource("8_trf31") +alignment = 0 + +[node name="HillBottomButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Hill (Bottom)" +icon = ExtResource("9_abenc") +alignment = 0 + +[node name="HillLeftButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Hill (Left)" +icon = ExtResource("10_dsu38") +alignment = 0 + +[node name="HillRightButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Hill (Right)" +icon = ExtResource("11_nyydi") +alignment = 0 + +[node name="IslandButton" type="Button" parent="HBoxContainer/Panel2/ScrollContainer/VBoxContainer"] +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_82nql") +text = "Island" +icon = ExtResource("12_qvlkp") +alignment = 0 + +[node name="Panel" type="Panel" parent="HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_styles/panel = SubResource("StyleBoxFlat_ehgjy") + +[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/Panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="PreviewGridContainer" type="GridContainer" parent="HBoxContainer/Panel/ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 6 +size_flags_vertical = 6 +theme_override_constants/h_separation = 0 +theme_override_constants/v_separation = 0 +columns = 5 + +[node name="TextureRect" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect2" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect3" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect4" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect5" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect6" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect7" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect8" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect9" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect10" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect11" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect12" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect13" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect14" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect15" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect16" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect17" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect18" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect19" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect20" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect21" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect22" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect23" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect24" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="TextureRect25" type="TextureRect" parent="HBoxContainer/Panel/ScrollContainer/PreviewGridContainer"] +custom_minimum_size = Vector2(32, 32) +layout_mode = 2 +size_flags_horizontal = 8 +size_flags_vertical = 8 + +[node name="HFlowContainer" type="HFlowContainer" parent="HBoxContainer/Panel"] +layout_mode = 1 +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 84.0 +grow_horizontal = 2 +theme_override_constants/h_separation = 5 + +[node name="ConnectTerrainsButton" type="Button" parent="HBoxContainer/Panel/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +toggle_mode = true +button_group = SubResource("ButtonGroup_3cdnu") +icon = ExtResource("8_05x1s") + +[node name="TileButton1" type="Button" parent="HBoxContainer/Panel/HFlowContainer"] +custom_minimum_size = Vector2(40, 40) +layout_mode = 2 +theme_override_colors/icon_normal_color = Color(0.556863, 0.556863, 0.556863, 1) +theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1) +theme_override_colors/icon_hover_color = Color(1, 1, 1, 1) +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_3cdnu") +flat = true +icon_alignment = 1 +expand_icon = true + +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/RectanglesBasicButton" to="." method="_on_rectangles_basic_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/RectanglesButton" to="." method="_on_rectangles_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/HardRectanglesButton" to="." method="_on_hard_rectangles_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/SlopesTLButton" to="." method="_on_slopes_tl_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/SlopesTRButton" to="." method="_on_slopes_tr_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/SlopesBRButton" to="." method="_on_slopes_br_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/SlopesBLButton" to="." method="_on_slopes_bl_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/HillTopButton" to="." method="_on_hill_top_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/HillBottomButton" to="." method="_on_hill_bottom_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/HillLeftButton" to="." method="_on_hill_left_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/HillRightButton" to="." method="_on_hill_right_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel2/ScrollContainer/VBoxContainer/IslandButton" to="." method="_on_island_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel/HFlowContainer/ConnectTerrainsButton" to="." method="_on_connect_terrains_button_pressed"] +[connection signal="pressed" from="HBoxContainer/Panel/HFlowContainer/TileButton1" to="." method="_on_tile_button_1_pressed"] diff --git a/addons/ez_tiles/ez_tiles_draw/brush_draw.gd b/addons/ez_tiles/ez_tiles_draw/brush_draw.gd new file mode 100644 index 0000000..49bd7f9 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/brush_draw.gd @@ -0,0 +1,64 @@ +@tool +extends PanelContainer +class_name BrushDraw + +var brush_size : int = 1 +var TileButtonScene : PackedScene + +enum BrushShape {CIRCLE, SQUARE} +signal connect_mode_toggled(toggled : bool) + +var tile_coords := Vector2i.ZERO +var connect_terrains_button : Button +var brush_shape := BrushShape.SQUARE +var button_container : Control +var first_tile_button : Button + +func _enter_tree() -> void: + TileButtonScene = preload("res://addons/ez_tiles/ez_tiles_draw/tile_button.tscn") + connect_terrains_button = find_child("ConnectTerrainsButton") + connect_terrains_button.pressed.connect(func(): connect_mode_toggled.emit(true)) + button_container = find_child("TileButtonContainer") + + +func _on_tile_button_pressed(coords : Vector2i): + tile_coords = coords + connect_mode_toggled.emit(false) + + +func _on_range_slider_with_line_edit_value_changed(value: int) -> void: + brush_size = value + + +func update_tile_buttons(tileset_source : TileSetAtlasSource, tile_size : Vector2i): + first_tile_button = null + for c in button_container.get_children(): + if c is TileButton: + c.queue_free() + + var terrain_texture := tileset_source.texture + for idx in range(tileset_source.get_tiles_count()): + var pos := tileset_source.get_tile_id(idx) + var tile_button : TileButton = TileButtonScene.instantiate() + tile_button.clicked.connect(_on_tile_button_pressed) + tile_button.coords = pos + var texture := AtlasTexture.new() + tile_button.icon = texture + tile_button.icon.atlas = terrain_texture + tile_button.icon.region = Rect2i(pos * tile_size, tile_size) + button_container.add_child(tile_button) + if not is_instance_valid(first_tile_button): + first_tile_button = tile_button + first_tile_button.button_pressed = true + + +func toggle_off_connected_brush() -> void: + if is_instance_valid(first_tile_button): + first_tile_button.button_pressed = true + +func _on_brush_shape_square_button_pressed() -> void: + brush_shape = BrushShape.SQUARE + + +func _on_brush_shape_circle_button_pressed() -> void: + brush_shape = BrushShape.CIRCLE diff --git a/addons/ez_tiles/ez_tiles_draw/brush_draw.gd.uid b/addons/ez_tiles/ez_tiles_draw/brush_draw.gd.uid new file mode 100644 index 0000000..e1db885 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/brush_draw.gd.uid @@ -0,0 +1 @@ +uid://dap4bbli16fp6 diff --git a/addons/ez_tiles/ez_tiles_draw/brush_draw.tscn b/addons/ez_tiles/ez_tiles_draw/brush_draw.tscn new file mode 100644 index 0000000..45e389e --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/brush_draw.tscn @@ -0,0 +1,110 @@ +[gd_scene load_steps=11 format=3 uid="uid://is8n20fchd2q"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/brush_draw.gd" id="1_qrfye"] +[ext_resource type="PackedScene" uid="uid://chi7cp6qp6vki" path="res://addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.tscn" id="2_g17n4"] +[ext_resource type="Texture2D" uid="uid://bps21xe8h1m2p" path="res://addons/ez_tiles/ez_tiles_draw/icons/Square.svg" id="3_eksbm"] +[ext_resource type="Texture2D" uid="uid://c7u17hgk6jvet" path="res://addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg" id="3_lefkq"] +[ext_resource type="Texture2D" uid="uid://bb3xfpcrmc8gc" path="res://addons/ez_tiles/ez_tiles_draw/icons/Circle.svg" id="4_04hac"] +[ext_resource type="ButtonGroup" uid="uid://dtpx52d0n4ff1" path="res://addons/ez_tiles/ez_tiles_draw/brush_tile_button_group.tres" id="5_wkw32"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gwowe"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.211765, 0.239216, 0.290196, 1) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qgks4"] +content_margin_left = 10.0 +content_margin_top = 2.0 +content_margin_right = 10.0 +content_margin_bottom = 2.0 +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[sub_resource type="ButtonGroup" id="ButtonGroup_461xu"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r4hko"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[node name="BrushDraw" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_gwowe") +script = ExtResource("1_qrfye") +metadata/_tab_index = 1 + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 + +[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 40) +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_qgks4") + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"] +custom_minimum_size = Vector2(0, 35) +layout_mode = 2 +size_flags_vertical = 0 +theme_override_constants/separation = 10 + +[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer"] +layout_mode = 2 +text = "Brush Size" + +[node name="RangeSliderWithLineEdit" parent="VBoxContainer/PanelContainer/HBoxContainer" instance=ExtResource("2_g17n4")] +layout_mode = 2 + +[node name="Label2" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer"] +layout_mode = 2 +text = "Shape" + +[node name="BrushShapeSquareButton" type="Button" parent="VBoxContainer/PanelContainer/HBoxContainer"] +custom_minimum_size = Vector2(32, 0) +layout_mode = 2 +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_461xu") +icon = ExtResource("3_eksbm") +icon_alignment = 1 + +[node name="BrushShapeCircleButton" type="Button" parent="VBoxContainer/PanelContainer/HBoxContainer"] +custom_minimum_size = Vector2(32, 0) +layout_mode = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_461xu") +icon = ExtResource("4_04hac") +icon_alignment = 1 + +[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="PanelContainer2" type="PanelContainer" parent="VBoxContainer/ScrollContainer"] +clip_contents = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_styles/panel = SubResource("StyleBoxFlat_r4hko") + +[node name="TileButtonContainer" type="HFlowContainer" parent="VBoxContainer/ScrollContainer/PanelContainer2"] +layout_mode = 2 +theme_override_constants/h_separation = 5 + +[node name="ConnectTerrainsButton" type="Button" parent="VBoxContainer/ScrollContainer/PanelContainer2/TileButtonContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +toggle_mode = true +button_group = ExtResource("5_wkw32") +icon = ExtResource("3_lefkq") + +[connection signal="value_changed" from="VBoxContainer/PanelContainer/HBoxContainer/RangeSliderWithLineEdit" to="." method="_on_range_slider_with_line_edit_value_changed"] +[connection signal="pressed" from="VBoxContainer/PanelContainer/HBoxContainer/BrushShapeSquareButton" to="." method="_on_brush_shape_square_button_pressed"] +[connection signal="pressed" from="VBoxContainer/PanelContainer/HBoxContainer/BrushShapeCircleButton" to="." method="_on_brush_shape_circle_button_pressed"] diff --git a/addons/ez_tiles/ez_tiles_draw/brush_tile_button_group.tres b/addons/ez_tiles/ez_tiles_draw/brush_tile_button_group.tres new file mode 100644 index 0000000..08d31b4 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/brush_tile_button_group.tres @@ -0,0 +1,5 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://dtpx52d0n4ff1"] + +[resource] +resource_local_to_scene = false +allow_unpress = true diff --git a/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd new file mode 100644 index 0000000..734f057 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd @@ -0,0 +1,694 @@ +@tool +extends Control +class_name EZTilesDrawDock + +enum NeighbourMode {OVERWRITE, PEERING_BIT, INCLUSIVE, EXCLUSIVE} +enum DragMode {BRUSH, AREA, STAMP, SNAPSHOT} + +const EZ_TILE_CUSTOM_META := "_is_ez_tiles_generated" + +var StampScene : PackedScene +var StampTileScene : PackedScene +var TerrainPickerEntryScene : PackedScene +var under_edit : TileMapLayer = null +var hint_label : Label +var main_container : Control +var default_editor_check_button : Button +var terrain_list_container : VBoxContainer +var drag_start := Vector2i.ZERO +var drag_mode := DragMode.BRUSH + +var remembered_cells := {} +var viewport_has_mouse := false +var lmb_is_down := false +var rmb_is_down := false +var current_terrain_id := 0 +var neighbour_mode := NeighbourMode.OVERWRITE +var suppress_preview := false +var using_eraser := false +var undo_redo : EditorUndoRedoManager + +var area_draw_tab : AreaDraw +var brush_tab : BrushDraw +var stamp_tab : StampTab + +var area_draw_toggle_button : Button +var brush_draw_toggle_button : Button +var stamp_draw_toggle_button : Button +var select_snap_shot_button : Button +var eraser_button : Button + +var connect_toggle_button : Button +var connect_icon_connected : Texture2D +var connect_icon_disconnected : Texture2D +var neighbor_mode_option_button : OptionButton + +const EZ_NEIGHBOUR_MAP := { + "....O...." : Vector2i.ZERO, + "....OX..." : Vector2i(0,3), + "....O..X." : Vector2i(1,0), + ".X..O..X." : Vector2i(1,1), + ".X..O...." : Vector2i(1,2), + "...XOX..." : Vector2i(1,3), + "...XO...." : Vector2i(2,3), + "....OX.X." : Vector2i(3,0), + ".X..OX.X." : Vector2i(3,1), + ".X..OX..." : Vector2i(3,2), + "...XOX.X." : Vector2i(4,0), + ".X.XOX.X." : Vector2i(4,1), + ".X.XOX..." : Vector2i(4,2), + "...XO..X." : Vector2i(5,0), + ".X.XO..X." : Vector2i(5,1), + ".X.XO...." : Vector2i(5,2) +} + + +func _enter_tree() -> void: + StampScene = preload("res://addons/ez_tiles/ez_tiles_draw/stamp.tscn") + StampTileScene = preload("res://addons/ez_tiles/ez_tiles_draw/stamp_tile.tscn") + TerrainPickerEntryScene = preload("res://addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.tscn") + hint_label = find_child("HintLabel") + main_container = find_child("MainVBoxContainer") + default_editor_check_button = find_child("DefaultEditorCheckButton") + terrain_list_container = find_child("TerrainListVboxContainer") + area_draw_tab = find_child("Area Draw") + brush_tab = find_child("Brush Draw") + stamp_tab = find_child("Stamp") + area_draw_toggle_button = find_child("AreaDrawButton") + brush_draw_toggle_button = find_child("BrushDrawButton") + stamp_draw_toggle_button = find_child("StampDrawButton") + select_snap_shot_button = find_child("SelectSnapShotButton") + eraser_button = find_child("EraserButton") + connect_toggle_button = find_child("ConnectingToggle") + connect_icon_disconnected = preload("res://addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg") + connect_icon_connected = preload("res://addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg") + neighbor_mode_option_button = find_child("NeighbourModeOptionButton") + + +func activate(node : TileMapLayer): + current_terrain_id = 0 + remembered_cells = {} + under_edit = node + hint_label.hide() + main_container.show() + + for child in terrain_list_container.get_children(): + if is_instance_valid(child): + child.queue_free() + + if under_edit.tile_set.get_terrain_sets_count() > 0: + for terrain_id in range(under_edit.tile_set.get_terrains_count(0)): + var entry : TerrainPickerEntry = TerrainPickerEntryScene.instantiate() + entry.terrain_name = under_edit.tile_set.get_terrain_name(0, terrain_id) + entry.texture_resource = _get_first_texture_for_terrain(terrain_id) + entry.terrain_id = terrain_id + entry.selected.connect(_on_terrain_selected) + terrain_list_container.add_child(entry) + area_draw_tab.update_grid_preview( + _get_first_texture_for_terrain(current_terrain_id), + under_edit.tile_set.tile_size) + + brush_tab.update_tile_buttons( + _get_first_tileset_source_for_terrain(current_terrain_id), + under_edit.tile_set.tile_size) + + if under_edit.has_meta(EZ_TILE_CUSTOM_META): + default_editor_check_button.button_pressed = true + else: + default_editor_check_button.button_pressed = false + + stamp_tab.show_stamps_for_tile_map_layer(under_edit) + + +func _get_first_source_id_for_terrain(terrain_id : int) -> int: + for i in range(under_edit.tile_set.get_source_count()): + var source_id := under_edit.tile_set.get_source_id(i) + var source : TileSetAtlasSource = under_edit.tile_set.get_source(source_id) + if source.get_tiles_count() > 0: + for j in source.get_tiles_count(): + var tile_data = source.get_tile_data(source.get_tile_id(j), 0) + if tile_data.terrain == terrain_id: + return source_id + printerr("Terrain %d not found in tile set sources: " % terrain_id) + return terrain_id # assume equal in case of inconsistent data + + +func _get_first_texture_for_terrain(terrain_id : int) -> Texture2D: + var source := _get_first_tileset_source_for_terrain(terrain_id) + if is_instance_valid(source): + return source.texture + return null + + +func _get_first_tileset_source_for_terrain(terrain_id : int) -> TileSetAtlasSource: + for i in range(under_edit.tile_set.get_source_count()): + var source_id := under_edit.tile_set.get_source_id(i) + var source : TileSetAtlasSource = under_edit.tile_set.get_source(source_id) + if source.get_tiles_count() > 0: + for j in source.get_tiles_count(): + var tile_data = source.get_tile_data(source.get_tile_id(j), 0) + if tile_data.terrain == terrain_id: + return source + printerr("Terrain %d not found in tile set sources: " % terrain_id) + return null + + +func deactivate(): + under_edit = null + hint_label.show() + main_container.hide() + + +func _on_terrain_selected(id : int) -> void: + current_terrain_id = id + area_draw_tab.update_grid_preview( + _get_first_texture_for_terrain(id), under_edit.tile_set.tile_size) + brush_tab.update_tile_buttons( + _get_first_tileset_source_for_terrain(id), under_edit.tile_set.tile_size) + if neighbour_mode != NeighbourMode.OVERWRITE: + brush_tab.connect_terrains_button.button_pressed = true + + if stamp_tab.visible: + brush_tab.show() + + +func _place_back_remembered_cells() -> void: + for prev_pos in remembered_cells.keys(): + if remembered_cells[prev_pos][0] > -1: + under_edit.set_cell(prev_pos, remembered_cells[prev_pos][0], remembered_cells[prev_pos][1]) + else: + under_edit.erase_cell(prev_pos) + remembered_cells.clear() + + +func _remember_cell(tile_pos : Vector2i) -> void: + if under_edit.get_cell_source_id(tile_pos) > -1: + remembered_cells[tile_pos] = [under_edit.get_cell_source_id(tile_pos), under_edit.get_cell_atlas_coords(tile_pos)] + else: + remembered_cells[tile_pos] = [-1, Vector2i.ZERO] + + +func _take_snapshot(drag_end : Vector2i) -> void: + var stamp : Stamp = StampScene.instantiate() + var from_x := drag_start.x if drag_start.x < drag_end.x else drag_end.x + var to_x := drag_start.x if drag_start.x > drag_end.x else drag_end.x + var from_y := drag_start.y if drag_start.y < drag_end.y else drag_end.y + var to_y := drag_start.y if drag_start.y > drag_end.y else drag_end.y + stamp.stamp_size = Vector2i(to_x - from_x + 1, to_y - from_y + 1) + var stamp_tile_size := Vector2(under_edit.tile_set.tile_size) + while (stamp.stamp_size.x * stamp_tile_size.x) > 512: + stamp_tile_size *= 0.5 + + for y in range(from_y, to_y + 1): + for x in range(from_x, to_x + 1): + var tile_pos := Vector2i(x, y) + var stamp_tile : TextureRect = StampTileScene.instantiate() + stamp_tile.custom_minimum_size = Vector2i(stamp_tile_size) + if under_edit.get_cell_source_id(tile_pos) > -1: + stamp.stamp_cell_data[Vector2i(x - from_x, y - from_y)] = [under_edit.get_cell_source_id(tile_pos), under_edit.get_cell_atlas_coords(tile_pos)] + stamp_tile.texture = AtlasTexture.new() + stamp_tile.texture.atlas = under_edit.tile_set.get_source(under_edit.get_cell_source_id(tile_pos)).texture + stamp_tile.texture.region = Rect2i( + under_edit.get_cell_atlas_coords(tile_pos) * under_edit.tile_set.tile_size, + under_edit.tile_set.tile_size) + else: + stamp.stamp_cell_data[Vector2i(x - from_x, y - from_y)] = [-1, Vector2i.ZERO] + stamp.tile_textures.append(stamp_tile) + stamp.tile_map_layer_under_edit = under_edit + stamp_tab.add_stamp(stamp) + + +func _grow_cells(area_cells : Array, diagonal := false, base_dir := Vector2i.ZERO) -> Array: + var expanded_region := {} + for cell in area_cells: + if cell not in expanded_region: + expanded_region[cell] = true + for neighour in _get_neighbors(cell, diagonal, base_dir): + if neighour not in expanded_region: + expanded_region[neighour] = true + return expanded_region.keys() + +func _straighten_line_direction(from : Vector2i, to : Vector2i) -> Vector2: + var angle := fmod(rad_to_deg(Vector2(from).angle_to_point(Vector2(to))), 360) + if angle < 0: + angle += 360 + match(snappedi(angle, 45)): + 45: + return Vector2(0.7071, 0.7071) + 90: + return Vector2.DOWN + 135: + return Vector2(-0.7071, 0.7071) + 180: + return Vector2.LEFT + 225: + return Vector2(-0.7071, -0.7071) + 270: + return Vector2.UP + 315: + return Vector2(0.7071, -0.7071) + 0, 360, _: + return Vector2.RIGHT + +func _get_brush_sized_line(from : Vector2i, cell : Dictionary) -> Dictionary: + var to := cell.keys()[0] as Vector2i + var direction = _straighten_line_direction(from, to) + var cur := Vector2(from) + var out := {} + for _i in range(floor(from.distance_to(to))): + cur += direction + out.merge(_get_brush_for_cell({Vector2i(cur.floor()): cell.values()[0]})) + return out + + +func _get_brush_for_cell(cell : Dictionary) -> Dictionary: + if brush_tab.brush_size == 1: + return cell + + var out := Dictionary() + var cur_keys := [] + if brush_tab.brush_shape == BrushDraw.BrushShape.SQUARE: + var middle : Vector2i = cell.keys()[0] + Vector2i.ONE + for x in range(middle.x - ceil(brush_tab.brush_size / 2.0), middle.x + floor(brush_tab.brush_size / 2.0)): + for y in range(middle.y - ceil(brush_tab.brush_size / 2.0), middle.y + floor(brush_tab.brush_size / 2.0)): + cur_keys.append(Vector2i(x, y)) + elif brush_tab.brush_shape == BrushDraw.BrushShape.CIRCLE: + var m : Vector2i = cell.keys()[0] + var sz := brush_tab.brush_size + for x in range(m.x - sz - 1, m.x + sz + 1): + for y in range(m.y - sz - 1, m.y + sz + 1): + if Vector2i(x, y).distance_to(m) <= sz * 0.67: + cur_keys.append(Vector2i(x, y)) + for k in cur_keys: + out[k] = cell.values()[0] + return out + + +func _get_sized_brush(cell : Dictionary) -> Dictionary: + if Input.is_key_pressed(KEY_SHIFT): + return _get_brush_sized_line(drag_start, cell) + + return _get_brush_for_cell(cell) + + +func _get_stamp_placement_area(stamp : Stamp, tile_pos : Vector2i, include_empty_cells := false) -> Array[Vector2i]: + var out : Array[Vector2i] = [] + for stamp_tile_pos in stamp.stamp_cell_data.keys(): + if stamp.stamp_cell_data[stamp_tile_pos][0] > -1 or include_empty_cells: + out.append(tile_pos + stamp_tile_pos) + + return out + + +func _place_stamp_preview(stamp : Stamp, cursor_tile_pos : Vector2i) -> void: + var overwrite_with_empty_cells := Input.is_key_pressed(KEY_SHIFT) + var stamp_plc_area := _get_stamp_placement_area(stamp, cursor_tile_pos, overwrite_with_empty_cells) + var all_cells = _grow_cells(stamp_plc_area, neighbour_mode == NeighbourMode.PEERING_BIT) + for tile_pos in all_cells: + _remember_cell(tile_pos) + + for stamp_tile_pos in stamp.stamp_cell_data.keys(): + if stamp.stamp_cell_data[stamp_tile_pos][0] > -1: + under_edit.set_cell(cursor_tile_pos + stamp_tile_pos, stamp.stamp_cell_data[stamp_tile_pos][0], + stamp.stamp_cell_data[stamp_tile_pos][1]) + elif overwrite_with_empty_cells: + under_edit.erase_cell(cursor_tile_pos + stamp_tile_pos) + if neighbour_mode != NeighbourMode.PEERING_BIT and neighbour_mode != NeighbourMode.OVERWRITE: + _update_atlas_coords(_get_neighbors(cursor_tile_pos + stamp_tile_pos)) + + if neighbour_mode == NeighbourMode.PEERING_BIT: + for tile_pos in stamp_plc_area: + under_edit.set_cells_terrain_connect([tile_pos], 0, under_edit.get_cell_source_id(tile_pos), true) + + +func _place_cells_preview(cells_in_current_draw_area : Dictionary, terrain_id : int) -> void: + var all_cells := _grow_cells(cells_in_current_draw_area.keys(), neighbour_mode == NeighbourMode.PEERING_BIT) + for tile_pos in all_cells: + _remember_cell(tile_pos) + + for tile_pos in cells_in_current_draw_area: + if terrain_id < 0: + under_edit.erase_cell(tile_pos) + else: + var coord : Vector2i = ( + cells_in_current_draw_area[tile_pos] if neighbour_mode == NeighbourMode.OVERWRITE + else _get_ez_atlas_coord(tile_pos, terrain_id) + ) + under_edit.set_cell(tile_pos, _get_first_source_id_for_terrain(terrain_id), coord) + if neighbour_mode != NeighbourMode.PEERING_BIT and neighbour_mode != NeighbourMode.OVERWRITE: + _update_atlas_coords(_get_neighbors(tile_pos)) + + if neighbour_mode == NeighbourMode.PEERING_BIT: + under_edit.set_cells_terrain_connect(cells_in_current_draw_area.keys(), 0, terrain_id, true) + + +func _commit_cell_placement(cells_in_current_draw_area : Array) -> void: + undo_redo.create_action("Update cells in: " + under_edit.name) + for cell in remembered_cells: + if remembered_cells[cell][0] < 0: + undo_redo.add_undo_method(under_edit, "erase_cell", cell) + else: + undo_redo.add_undo_method(under_edit, "set_cell", cell, + remembered_cells[cell][0], remembered_cells[cell][1]) + remembered_cells.clear() + for cell in _grow_cells(cells_in_current_draw_area): + if under_edit.get_cell_source_id(cell) > -1: + undo_redo.add_do_method(under_edit, "set_cell", cell, + under_edit.get_cell_source_id(cell), + under_edit.get_cell_atlas_coords(cell)) + else: + undo_redo.add_do_method(under_edit, "erase_cell", cell) + undo_redo.commit_action(false) + + +func _update_atlas_coords(cells : Array[Vector2i]) -> void: + for tile_pos in cells: + under_edit.set_cell(tile_pos, under_edit.get_cell_source_id(tile_pos), + _get_ez_atlas_coord(tile_pos, under_edit.get_cell_source_id(tile_pos))) + + +func _erase_cells(cells : Dictionary): + # prevent current preview placement from being added to the undo list + if drag_mode == DragMode.BRUSH: + for cell in cells.keys(): + if cell in remembered_cells and remembered_cells[cell][0] > -1: + under_edit.set_cell(cell, remembered_cells[cell][0], remembered_cells[cell][1]) + else: + under_edit.erase_cell(cell) + _place_cells_preview(cells, -1) + + +func _get_neighbors(tile_pos : Vector2i, diagonal := false, base_dir := Vector2i.ZERO) -> Array[Vector2i]: + if base_dir: + return [ + tile_pos + base_dir, + tile_pos + Vector2i(base_dir.x , 0), + tile_pos + Vector2i(0, base_dir.y) + ] + if diagonal: + return [ + tile_pos + Vector2i.LEFT, + tile_pos + Vector2i.UP, + tile_pos + Vector2i.DOWN, + tile_pos + Vector2i.RIGHT, + tile_pos - Vector2i.ONE, + tile_pos + Vector2i.ONE, + tile_pos + Vector2i(-1, 1), + tile_pos + Vector2i(1, -1) + ] + return [tile_pos + Vector2i.LEFT, tile_pos + Vector2i.UP, tile_pos + Vector2i.DOWN, tile_pos + Vector2i.RIGHT] + + +func _consider_a_neighbour(cell : Vector2i, for_source_id : int) -> bool: + var neighbour_source_id := under_edit.get_cell_source_id(cell) + match(neighbour_mode): + NeighbourMode.INCLUSIVE: + return neighbour_source_id > -1 + NeighbourMode.EXCLUSIVE: + return neighbour_source_id > -1 and neighbour_source_id == for_source_id + NeighbourMode.OVERWRITE: + printerr("illegal state: should not be considering neighbours") + return false + NeighbourMode.PEERING_BIT: + printerr("illegal state: should invoke `under_edit.set_cells_terrain_connect`") + return false + return false + + +func _get_ez_atlas_coord(tile_pos : Vector2i, for_terrain_id : int) -> Vector2i: + if neighbour_mode == NeighbourMode.PEERING_BIT: + var source := _get_first_tileset_source_for_terrain(for_terrain_id) + for id in range(source.get_tiles_count()): + return source.get_tile_id(id) + printerr("could not find a tile in terrain: " + str(for_terrain_id)) + return Vector2i.ZERO + # EZ Tiles considers the source_id to be equal to the terrain_id + # Therefore, in these modes the complexity of searching the correct texture is lost + # (thus, making things EZ. is a lot less flexible) + # - In inclusive mode all terrains in neighboring tiles are considered to be the same terrain + # - in exclusive mode the terrains from the exact same TileSetSource are considered the same terrain + var l = "X" if _consider_a_neighbour(tile_pos + Vector2i.LEFT, for_terrain_id) else "." + var r = "X" if _consider_a_neighbour(tile_pos + Vector2i.RIGHT, for_terrain_id) else "."; + var t = "X" if _consider_a_neighbour(tile_pos + Vector2i.UP, for_terrain_id) else "." + var b = "X" if _consider_a_neighbour(tile_pos + Vector2i.DOWN, for_terrain_id) else "."; + + var fmt = ".%s.%sO%s.%s." % [t, l, r, b] + return EZ_NEIGHBOUR_MAP[fmt] if fmt in EZ_NEIGHBOUR_MAP else Vector2i.ZERO + + +func get_draw_rect(tile_pos : Vector2i) -> Rect2i: + match(drag_mode): + DragMode.SNAPSHOT: + if lmb_is_down: + var from_x := drag_start.x if drag_start.x < tile_pos.x else tile_pos.x + var to_x := drag_start.x if drag_start.x > tile_pos.x else tile_pos.x + var from_y := drag_start.y if drag_start.y < tile_pos.y else tile_pos.y + var to_y := drag_start.y if drag_start.y > tile_pos.y else tile_pos.y + return Rect2i(Vector2i(from_x, from_y), Vector2i(to_x, to_y) - Vector2i(from_x, from_y) + Vector2i.ONE) + else: + return Rect2i(tile_pos, Vector2i.ONE) + DragMode.AREA: + if rmb_is_down or lmb_is_down: + var from_x := drag_start.x if drag_start.x < tile_pos.x else tile_pos.x + var to_x := drag_start.x if drag_start.x > tile_pos.x else tile_pos.x + var from_y := drag_start.y if drag_start.y < tile_pos.y else tile_pos.y + var to_y := drag_start.y if drag_start.y > tile_pos.y else tile_pos.y + return Rect2i(Vector2i(from_x, from_y), Vector2i(to_x, to_y) - Vector2i(from_x, from_y) + Vector2i.ONE) + else: + return Rect2i(tile_pos, Vector2i.ONE) + DragMode.STAMP: + var stamp := stamp_tab.get_selected_stamp() + if is_instance_valid(stamp): + return Rect2i(tile_pos, stamp.stamp_size) + else: + Rect2i() + DragMode.BRUSH, _: + return Rect2i() + return Rect2i() + + +func get_draw_area(tile_pos : Vector2i) -> Array: + match(drag_mode): + DragMode.SNAPSHOT: + return [] + DragMode.AREA: + if rmb_is_down or lmb_is_down: + return _get_draw_shape_for_area(drag_start, tile_pos).keys() + else: + return [] + DragMode.BRUSH: + return _get_sized_brush({tile_pos: Vector2.ZERO}).keys() + _: + return [] + +func _get_draw_shape_for_area(p1 : Vector2i, p2 : Vector2i, for_shape : AreaDraw.Shape = area_draw_tab.shape) -> Dictionary: + var from_x := p1.x if p1.x < p2.x else p2.x + var to_x := p1.x if p1.x > p2.x else p2.x + var from_y := p1.y if p1.y < p2.y else p2.y + var to_y := p1.y if p1.y > p2.y else p2.y + + match(for_shape): + AreaDraw.Shape.RECTANGLE_BASIC: + return AreaDraw.get_cells_rectangle_basic(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.HARD_RECTANGLE: + return AreaDraw.get_cells_rectangle(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.RECTANGLE: + return AreaDraw.get_cells_rectangle(Vector2i(from_x, from_y), Vector2i(to_x, to_y), true) + AreaDraw.Shape.SLOPE_TL: + return AreaDraw.get_cells_slope_tl(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.SLOPE_BL: + return AreaDraw.get_cells_slope_bl(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.SLOPE_TR: + return AreaDraw.get_cells_slope_tr(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.SLOPE_BR: + return AreaDraw.get_cells_slope_br(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.HILL_TOP: + return AreaDraw.get_cells_hill_top(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.HILL_BOTTOM: + return AreaDraw.get_cells_hill_bottom(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.HILL_LEFT: + return AreaDraw.get_cells_hill_left(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.HILL_RIGHT: + return AreaDraw.get_cells_hill_right(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + AreaDraw.Shape.ISLAND: + return AreaDraw.get_cells_island(Vector2i(from_x, from_y), Vector2i(to_x, to_y)) + return {} + + +func handle_mouse_move(tile_pos : Vector2i) -> void: + if suppress_preview: + pass + if is_instance_valid(under_edit): + if drag_mode == DragMode.BRUSH: + _place_back_remembered_cells() + if using_eraser: + _place_cells_preview(_get_sized_brush({tile_pos: brush_tab.tile_coords}), -1) + else: + _place_cells_preview(_get_sized_brush({tile_pos: brush_tab.tile_coords}), current_terrain_id) + if lmb_is_down: + _commit_cell_placement(_get_sized_brush({tile_pos: brush_tab.tile_coords}).keys()) + + elif drag_mode == DragMode.AREA: + _place_back_remembered_cells() + if rmb_is_down or (using_eraser and lmb_is_down): + _erase_cells(_get_draw_shape_for_area(drag_start, tile_pos, AreaDraw.Shape.RECTANGLE)) + elif lmb_is_down: + _place_cells_preview(_get_draw_shape_for_area(drag_start, tile_pos), current_terrain_id) + + elif drag_mode == DragMode.STAMP: + _place_back_remembered_cells() + var stamp := stamp_tab.get_selected_stamp() + if is_instance_valid(stamp): + _place_stamp_preview(stamp, tile_pos) + + +func handle_mouse_up(button : MouseButton, tile_pos: Vector2i): + rmb_is_down = false if button == MouseButton.MOUSE_BUTTON_RIGHT else rmb_is_down + lmb_is_down = false if button == MouseButton.MOUSE_BUTTON_LEFT else lmb_is_down + + if button == MouseButton.MOUSE_BUTTON_RIGHT or (using_eraser and button == MouseButton.MOUSE_BUTTON_LEFT): + if drag_mode == DragMode.AREA: + _commit_cell_placement(_get_draw_shape_for_area(drag_start, tile_pos, AreaDraw.Shape.RECTANGLE).keys()) + elif button == MouseButton.MOUSE_BUTTON_LEFT: + if drag_mode == DragMode.AREA: + _commit_cell_placement(_get_draw_shape_for_area(drag_start, tile_pos).keys()) + if drag_mode == DragMode.SNAPSHOT: + _take_snapshot(tile_pos) + _on_stamp_snapshot_toggled(false) + if drag_mode == DragMode.STAMP: + var stamp := stamp_tab.get_selected_stamp() + if is_instance_valid(stamp): + _commit_cell_placement(_get_stamp_placement_area(stamp, tile_pos)) + + + + +func handle_mouse_down(button : MouseButton, tile_pos: Vector2i): + drag_start = tile_pos + rmb_is_down = true if button == MouseButton.MOUSE_BUTTON_RIGHT else rmb_is_down + lmb_is_down = true if button == MouseButton.MOUSE_BUTTON_LEFT else lmb_is_down + + if using_eraser and button == MouseButton.MOUSE_BUTTON_RIGHT: + eraser_button.button_pressed = false + if drag_mode == DragMode.BRUSH: + _place_back_remembered_cells() + elif button == MouseButton.MOUSE_BUTTON_RIGHT: + if drag_mode == DragMode.AREA and not suppress_preview: + _place_back_remembered_cells() + _erase_cells(_get_draw_shape_for_area(drag_start, tile_pos)) + elif drag_mode == DragMode.BRUSH: + _place_back_remembered_cells() + area_draw_toggle_button.button_pressed = true + area_draw_tab.show() + elif drag_mode == DragMode.SNAPSHOT: + _on_stamp_snapshot_toggled(false) + elif drag_mode == DragMode.STAMP: + var stamp := stamp_tab.get_selected_stamp() + if is_instance_valid(stamp): + _place_back_remembered_cells() + stamp.deselect() + elif button == MouseButton.MOUSE_BUTTON_LEFT: + if drag_mode == DragMode.AREA and not suppress_preview: + _place_back_remembered_cells() + _place_cells_preview(_get_draw_shape_for_area(drag_start, tile_pos), current_terrain_id) + elif drag_mode == DragMode.BRUSH: + _commit_cell_placement(_get_sized_brush({tile_pos: brush_tab.tile_coords}).keys()) + + + +func handle_mouse_entered(): + viewport_has_mouse = true + remembered_cells.clear() + + +func handle_mouse_out(): + viewport_has_mouse = false + if not lmb_is_down: + _place_back_remembered_cells() + + +func _on_area_draw_button_pressed() -> void: + area_draw_tab.show() + + +func _on_brush_draw_button_pressed() -> void: + brush_tab.show() + + +func _on_stamp_draw_button_pressed() -> void: + stamp_tab.show() + + +func _on_stamp_snapshot_toggled(on_off: bool) -> void: + select_snap_shot_button.button_pressed = on_off + if on_off: + stamp_tab.show() + stamp_tab.start_snapshot() + drag_mode = DragMode.SNAPSHOT + else: + stamp_tab.stop_snapshotting() + select_snap_shot_button.focus_mode = Control.FOCUS_NONE + drag_mode = DragMode.STAMP + + +func _on_default_editor_check_button_toggled(toggled_on: bool) -> void: + if toggled_on: + under_edit.set_meta(EZ_TILE_CUSTOM_META, true) + else: + under_edit.remove_meta(EZ_TILE_CUSTOM_META) + + +func _on_tab_container_tab_changed(tab: DragMode) -> void: + drag_mode = tab + if tab != DragMode.STAMP: + stamp_tab.stop_snapshotting() + select_snap_shot_button.button_pressed = false + + match(drag_mode): + DragMode.AREA: + area_draw_toggle_button.button_pressed = true + eraser_button.disabled = false + DragMode.BRUSH: + brush_draw_toggle_button.button_pressed = true + eraser_button.disabled = false + DragMode.STAMP: + stamp_draw_toggle_button.button_pressed = true + eraser_button.button_pressed = false + eraser_button.disabled = true + + +func _on_neighbour_mode_option_button_item_selected(index: NeighbourMode) -> void: + neighbour_mode = index + if neighbour_mode == NeighbourMode.OVERWRITE: + connect_toggle_button.icon = connect_icon_disconnected + connect_toggle_button.button_pressed = false + brush_tab.toggle_off_connected_brush() + area_draw_tab.find_child("TileButton1").button_pressed = true + else: + connect_toggle_button.icon = connect_icon_connected + connect_toggle_button.button_pressed = true + brush_tab.connect_terrains_button.button_pressed = true + area_draw_tab.connect_terrains_button.button_pressed = true + + +func _on_connecting_toggle_toggled(toggled_on: bool) -> void: + if toggled_on: + connect_toggle_button.icon = connect_icon_connected + connect_toggle_button.button_pressed = true + if neighbour_mode == NeighbourMode.OVERWRITE: + neighbour_mode = NeighbourMode.PEERING_BIT + neighbor_mode_option_button.selected = NeighbourMode.PEERING_BIT + brush_tab.connect_terrains_button.button_pressed = true + area_draw_tab.connect_terrains_button.button_pressed = true + # else it's already in a connected mode + else: + connect_toggle_button.icon = connect_icon_disconnected + connect_toggle_button.button_pressed = false + neighbour_mode = NeighbourMode.OVERWRITE + neighbor_mode_option_button.selected = NeighbourMode.OVERWRITE + brush_tab.toggle_off_connected_brush() + area_draw_tab.find_child("TileButton1").button_pressed = true + + +func _on_eraser_button_toggled(toggled_on: bool) -> void: + using_eraser = toggled_on diff --git a/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd.uid b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd.uid new file mode 100644 index 0000000..8f353d0 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd.uid @@ -0,0 +1 @@ +uid://6bvphp60kmbq diff --git a/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.tscn b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.tscn new file mode 100644 index 0000000..d061af8 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.tscn @@ -0,0 +1,169 @@ +[gd_scene load_steps=13 format=3 uid="uid://bylxp7tq3yo5s"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/ez_tiles_draw_dock.gd" id="1_wtbry"] +[ext_resource type="Texture2D" uid="uid://pyivvoarllad" path="res://addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg" id="2_dplls"] +[ext_resource type="PackedScene" uid="uid://bitqwiwmn3s0r" path="res://addons/ez_tiles/ez_tiles_draw/area_draw.tscn" id="2_k0y3s"] +[ext_resource type="Texture2D" uid="uid://dooqg3fapf15x" path="res://addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg" id="2_urupm"] +[ext_resource type="Texture2D" uid="uid://d10gshlv0aq2d" path="res://addons/ez_tiles/ez_tiles_draw/icons/Edit.svg" id="3_qgjav"] +[ext_resource type="Texture2D" uid="uid://dhhtq6kkxpaus" path="res://addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg" id="4_uxbhq"] +[ext_resource type="Texture2D" uid="uid://cj2hivk8xemhb" path="res://addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg" id="6_lleak"] +[ext_resource type="PackedScene" uid="uid://is8n20fchd2q" path="res://addons/ez_tiles/ez_tiles_draw/brush_draw.tscn" id="7_sh02n"] +[ext_resource type="Texture2D" uid="uid://bbpao1cndqvwr" path="res://addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg" id="7_vvdr0"] +[ext_resource type="PackedScene" uid="uid://catlvg1l82g5v" path="res://addons/ez_tiles/ez_tiles_draw/stamp_tab.tscn" id="8_6lfv8"] + +[sub_resource type="ButtonGroup" id="ButtonGroup_m6mfs"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fl86h"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[node name="EzTilesDrawDock" type="HBoxContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1_wtbry") + +[node name="MainVBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="HBoxContainer" type="HBoxContainer" parent="MainVBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Determines how to connect neighbouring tiles. +- Overwrite/Ignore (draw over other tiles without connecting to them) +- Use Terrain Peering Bit (the Godot default way of connecting tiles) +- Inclusive (consider all terrains in my terrain set my neighbour - as per the EZ Tiles template) +- Exclusive (consider only my terrain - as per the EZ Tiles template - as neighbour) +" +mouse_filter = 0 +text = "Connect mode* " + +[node name="NeighbourModeOptionButton" type="OptionButton" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Determines in which cases a neighbouring tile is considered a neighbour. When a tile is considered a neighbour, this tile will act as if it is 'glued' to it." +selected = 0 +item_count = 4 +popup/item_0/text = "Overwrite" +popup/item_1/text = "Use Terrain Peering Bit" +popup/item_1/id = 3 +popup/item_2/text = "Inclusive" +popup/item_2/id = 1 +popup/item_3/text = "Exclusive" +popup/item_3/id = 2 + +[node name="ConnectingToggle" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Toggle connected drawing off or on (See connect modes for more options)" +toggle_mode = true +icon = ExtResource("2_dplls") + +[node name="BrushDrawButton" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Brush/Pencil draw (Square, Circle)" +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_m6mfs") +icon = ExtResource("3_qgjav") + +[node name="AreaDrawButton" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Area draw (Rectangles, Slopes, Island)" +toggle_mode = true +button_group = SubResource("ButtonGroup_m6mfs") +icon = ExtResource("2_urupm") + +[node name="StampDrawButton" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Stamp, Copy/Paste draw" +toggle_mode = true +button_group = SubResource("ButtonGroup_m6mfs") +icon = ExtResource("4_uxbhq") + +[node name="SelectSnapShotButton" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Take snapshot for stamp" +toggle_mode = true +icon = ExtResource("6_lleak") + +[node name="EraserButton" type="Button" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +tooltip_text = "Eraser, toggle on the eraser to remove tiles with the left mouse button (this works the same as using the right mouse button). + +Can be used in both brush mode and in area mode." +toggle_mode = true +icon = ExtResource("7_vvdr0") + +[node name="DefaultEditorCheckButton" type="CheckButton" parent="MainVBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 10 +tooltip_text = "When you select a TileMapLayer in your scene, Godot will normally open the builtin TileMap or TileSet bottom pane. +When this toggle is on, EZ Tiles Draw will automatically open for the current TileMapLayer." +text = "Default Editor" + +[node name="MainHBoxContainer" type="HBoxContainer" parent="MainVBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="TerrainPickerScrollContainer" type="ScrollContainer" parent="MainVBoxContainer/MainHBoxContainer"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 3 +theme_override_styles/panel = SubResource("StyleBoxFlat_fl86h") +horizontal_scroll_mode = 0 + +[node name="TerrainListVboxContainer" type="VBoxContainer" parent="MainVBoxContainer/MainHBoxContainer/TerrainPickerScrollContainer"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/separation = 10 + +[node name="TabContainer" type="TabContainer" parent="MainVBoxContainer/MainHBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +current_tab = 0 + +[node name="Brush Draw" parent="MainVBoxContainer/MainHBoxContainer/TabContainer" instance=ExtResource("7_sh02n")] +layout_mode = 2 +metadata/_tab_index = 0 + +[node name="Area Draw" parent="MainVBoxContainer/MainHBoxContainer/TabContainer" instance=ExtResource("2_k0y3s")] +visible = false +clip_contents = true +layout_mode = 2 +metadata/_tab_index = 1 + +[node name="Stamp" parent="MainVBoxContainer/MainHBoxContainer/TabContainer" instance=ExtResource("8_6lfv8")] +visible = false +layout_mode = 2 + +[node name="HintLabel" type="Label" parent="."] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 +text = "Select a TileMapLayer generated by EZ Tiles to use EZ Tiles Draw" +horizontal_alignment = 1 +vertical_alignment = 1 + +[connection signal="item_selected" from="MainVBoxContainer/HBoxContainer/NeighbourModeOptionButton" to="." method="_on_neighbour_mode_option_button_item_selected"] +[connection signal="toggled" from="MainVBoxContainer/HBoxContainer/ConnectingToggle" to="." method="_on_connecting_toggle_toggled"] +[connection signal="pressed" from="MainVBoxContainer/HBoxContainer/BrushDrawButton" to="." method="_on_brush_draw_button_pressed"] +[connection signal="pressed" from="MainVBoxContainer/HBoxContainer/AreaDrawButton" to="." method="_on_area_draw_button_pressed"] +[connection signal="pressed" from="MainVBoxContainer/HBoxContainer/StampDrawButton" to="." method="_on_stamp_draw_button_pressed"] +[connection signal="toggled" from="MainVBoxContainer/HBoxContainer/SelectSnapShotButton" to="." method="_on_stamp_snapshot_toggled"] +[connection signal="toggled" from="MainVBoxContainer/HBoxContainer/EraserButton" to="." method="_on_eraser_button_toggled"] +[connection signal="toggled" from="MainVBoxContainer/HBoxContainer/DefaultEditorCheckButton" to="." method="_on_default_editor_check_button_toggled"] +[connection signal="tab_changed" from="MainVBoxContainer/MainHBoxContainer/TabContainer" to="." method="_on_tab_container_tab_changed"] +[connection signal="connect_mode_toggled" from="MainVBoxContainer/MainHBoxContainer/TabContainer/Brush Draw" to="." method="_on_connecting_toggle_toggled"] +[connection signal="connect_mode_toggled" from="MainVBoxContainer/MainHBoxContainer/TabContainer/Area Draw" to="." method="_on_connecting_toggle_toggled"] +[connection signal="snapshot_toggled" from="MainVBoxContainer/MainHBoxContainer/TabContainer/Stamp" to="." method="_on_stamp_snapshot_toggled"] diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg b/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg new file mode 100644 index 0000000..21236ba --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg.import new file mode 100644 index 0000000..2e39163 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Circle.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bb3xfpcrmc8gc" +path="res://.godot/imported/Circle.svg-8d5a72a976af170c5462c4822817bc86.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Circle.svg" +dest_files=["res://.godot/imported/Circle.svg-8d5a72a976af170c5462c4822817bc86.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg b/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg new file mode 100644 index 0000000..3167e57 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg.import new file mode 100644 index 0000000..acc871e --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://pyivvoarllad" +path="res://.godot/imported/Connect1.svg-e03696726517e376a9f1cb9904cf4c39.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Connect1.svg" +dest_files=["res://.godot/imported/Connect1.svg-e03696726517e376a9f1cb9904cf4c39.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg b/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg new file mode 100644 index 0000000..82cd45b --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg.import new file mode 100644 index 0000000..9d07170 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://un7sibaoyeeo" +path="res://.godot/imported/Connect2.svg-6e813cff05f022d485f4d95296800abe.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Connect2.svg" +dest_files=["res://.godot/imported/Connect2.svg-6e813cff05f022d485f4d95296800abe.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg b/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg new file mode 100644 index 0000000..7963e54 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg.import new file mode 100644 index 0000000..6130cfd --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Edit.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d10gshlv0aq2d" +path="res://.godot/imported/Edit.svg-206c08cdfe2c86e6e36fbd0ea67b4db7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Edit.svg" +dest_files=["res://.godot/imported/Edit.svg-206c08cdfe2c86e6e36fbd0ea67b4db7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg b/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg new file mode 100644 index 0000000..ff8acce --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg.import new file mode 100644 index 0000000..8faa170 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbpao1cndqvwr" +path="res://.godot/imported/Eraser.svg-a188c3a7a38a6aac8c5d49fe081b58f3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Eraser.svg" +dest_files=["res://.godot/imported/Eraser.svg-a188c3a7a38a6aac8c5d49fe081b58f3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg b/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg new file mode 100644 index 0000000..4eaf75e --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg.import new file mode 100644 index 0000000..6312212 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillB.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dntkx0h8qim1n" +path="res://.godot/imported/HillB.svg-2b1e837b4005cfdb77e758705f71d6c7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/HillB.svg" +dest_files=["res://.godot/imported/HillB.svg-2b1e837b4005cfdb77e758705f71d6c7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg b/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg new file mode 100644 index 0000000..6245b0d --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg.import new file mode 100644 index 0000000..302e4d9 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillL.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dpmrju1gvdr16" +path="res://.godot/imported/HillL.svg-f186ea095ce3e10ae26d57f879ef2e31.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/HillL.svg" +dest_files=["res://.godot/imported/HillL.svg-f186ea095ce3e10ae26d57f879ef2e31.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg b/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg new file mode 100644 index 0000000..3cc4005 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg.import new file mode 100644 index 0000000..53e41fb --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillR.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dv855gccwqgu" +path="res://.godot/imported/HillR.svg-11714009d9d53e804e759b93eeefee15.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/HillR.svg" +dest_files=["res://.godot/imported/HillR.svg-11714009d9d53e804e759b93eeefee15.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg b/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg new file mode 100644 index 0000000..ef5efa5 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg.import new file mode 100644 index 0000000..ffe970c --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/HillT.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cri2mdk3hr6s1" +path="res://.godot/imported/HillT.svg-598ff05abd20ebbb7b4a78e8535c9357.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/HillT.svg" +dest_files=["res://.godot/imported/HillT.svg-598ff05abd20ebbb7b4a78e8535c9357.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Island.svg b/addons/ez_tiles/ez_tiles_draw/icons/Island.svg new file mode 100644 index 0000000..a0dfecf --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Island.svg @@ -0,0 +1,46 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Island.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Island.svg.import new file mode 100644 index 0000000..c36d891 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Island.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://frudvs8p10ea" +path="res://.godot/imported/Island.svg-7090cc71872006e2240c54753a4c52e7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Island.svg" +dest_files=["res://.godot/imported/Island.svg-7090cc71872006e2240c54753a4c52e7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg b/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg new file mode 100644 index 0000000..7281929 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg.import new file mode 100644 index 0000000..a2a1ae7 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dooqg3fapf15x" +path="res://.godot/imported/Rectangle.svg-450f2673af07c8d154ef34ab8a606d56.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Rectangle.svg" +dest_files=["res://.godot/imported/Rectangle.svg-450f2673af07c8d154ef34ab8a606d56.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg b/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg new file mode 100644 index 0000000..e57d813 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg.import new file mode 100644 index 0000000..783f0f2 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://xetkyyw6y8ff" +path="res://.godot/imported/RectangleSoft.svg-aded69f4f7c973cda80407dd5d1813e7.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/RectangleSoft.svg" +dest_files=["res://.godot/imported/RectangleSoft.svg-aded69f4f7c973cda80407dd5d1813e7.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg b/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg new file mode 100644 index 0000000..d2eb0f9 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg.import new file mode 100644 index 0000000..5dee57b --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Remove.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cxcgf65bf2tjg" +path="res://.godot/imported/Remove.svg-d38ed9ddff4a945d6e8972b52d88ce61.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Remove.svg" +dest_files=["res://.godot/imported/Remove.svg-d38ed9ddff4a945d6e8972b52d88ce61.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg new file mode 100644 index 0000000..8f5d94a --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg.import new file mode 100644 index 0000000..98abebf --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://clpg11r4kdy8v" +path="res://.godot/imported/SlopeBL.svg-07bc9170ee5f32449d71bdf48e2aadac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeBL.svg" +dest_files=["res://.godot/imported/SlopeBL.svg-07bc9170ee5f32449d71bdf48e2aadac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg new file mode 100644 index 0000000..d82a5c3 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg.import new file mode 100644 index 0000000..0cbfcde --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7crpolmxjj2r" +path="res://.godot/imported/SlopeBR.svg-3123c663666c02b499bb295c174e62d4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeBR.svg" +dest_files=["res://.godot/imported/SlopeBR.svg-3123c663666c02b499bb295c174e62d4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg new file mode 100644 index 0000000..bfe710b --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg.import new file mode 100644 index 0000000..bc02611 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://behgjlyeldpdv" +path="res://.godot/imported/SlopeTL.svg-304f00192e035433e3ab5b565f2a3965.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeTL.svg" +dest_files=["res://.godot/imported/SlopeTL.svg-304f00192e035433e3ab5b565f2a3965.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg new file mode 100644 index 0000000..061397f --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg @@ -0,0 +1,43 @@ + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg.import new file mode 100644 index 0000000..e0fbdc9 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbjof7q6tq4d6" +path="res://.godot/imported/SlopeTR.svg-ea09242bcff8172bbe9a89e2498ebe9b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SlopeTR.svg" +dest_files=["res://.godot/imported/SlopeTR.svg-ea09242bcff8172bbe9a89e2498ebe9b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg b/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg new file mode 100644 index 0000000..f81051c --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg @@ -0,0 +1,57 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg.import new file mode 100644 index 0000000..0b98a10 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://copno6ivhw1mu" +path="res://.godot/imported/SnapShot.svg-b7c8a5ed655ab3c8e1b1a7210c311ccc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg" +dest_files=["res://.godot/imported/SnapShot.svg-b7c8a5ed655ab3c8e1b1a7210c311ccc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg b/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg new file mode 100644 index 0000000..253a69e --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg @@ -0,0 +1,57 @@ + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg.import new file mode 100644 index 0000000..52a321e --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cj2hivk8xemhb" +path="res://.godot/imported/SnapShotSmall.svg-77889c9725918cf955b4bf344be46c1f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/SnapShotSmall.svg" +dest_files=["res://.godot/imported/SnapShotSmall.svg-77889c9725918cf955b4bf344be46c1f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Square.svg b/addons/ez_tiles/ez_tiles_draw/icons/Square.svg new file mode 100644 index 0000000..9d3e641 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Square.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Square.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Square.svg.import new file mode 100644 index 0000000..1ec395c --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Square.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bps21xe8h1m2p" +path="res://.godot/imported/Square.svg-4af37f8b017eb4ebfb0d5af72c78ca11.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Square.svg" +dest_files=["res://.godot/imported/Square.svg-4af37f8b017eb4ebfb0d5af72c78ca11.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg b/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg new file mode 100644 index 0000000..7852d48 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg @@ -0,0 +1,34 @@ + + + + + + diff --git a/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg.import new file mode 100644 index 0000000..1ab248c --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dhhtq6kkxpaus" +path="res://.godot/imported/Stamp.svg-86e9268b7826ab5139d2b06f5a62e1ac.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/Stamp.svg" +dest_files=["res://.godot/imported/Stamp.svg-86e9268b7826ab5139d2b06f5a62e1ac.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg b/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg new file mode 100644 index 0000000..9d366c5 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg.import b/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg.import new file mode 100644 index 0000000..15b4c02 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7u17hgk6jvet" +path="res://.godot/imported/TerrainConnect.svg-29259845b83ee65a5a268a56f0da6c20.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/ez_tiles_draw/icons/TerrainConnect.svg" +dest_files=["res://.godot/imported/TerrainConnect.svg-29259845b83ee65a5a268a56f0da6c20.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/addons/ez_tiles/ez_tiles_draw/plugin.cfg b/addons/ez_tiles/ez_tiles_draw/plugin.cfg new file mode 100644 index 0000000..e12d20a --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="EZ Tiles Draw" +description="" +author="" +version="" +script="ez_tiles_draw.gd" diff --git a/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd new file mode 100644 index 0000000..c190cbb --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd @@ -0,0 +1,51 @@ +@tool + +extends HBoxContainer + +signal value_changed(value : int) +var num_regex := RegEx.new() +var line_edit : LineEdit +var slider : HSlider +var my_value : int = 1 + +func _enter_tree() -> void: + num_regex.compile("^\\d+$") + line_edit = find_child("LineEdit") + slider = find_child("Slider") + + +func _on_slider_value_changed(value: float) -> void: + if int(value) != my_value: + my_value = int(value) + line_edit.text = str(my_value) + value_changed.emit(my_value) + + +func _on_line_edit_text_submitted(new_text: String) -> void: + var prev_value := my_value + if num_regex.search(new_text): + my_value = int(new_text) + if my_value < 0: + my_value = 1 + if my_value > slider.max_value: + my_value = int(slider.max_value) + + line_edit.text = str(my_value) + slider.value = float(my_value) + slider.grab_focus() + if prev_value != my_value: + value_changed.emit(my_value) + + +func _on_line_edit_text_changed(new_text: String) -> void: + var prev_value := my_value + if num_regex.search(new_text): + my_value = int(new_text) + if my_value < 0: + my_value = 1 + if my_value > slider.max_value: + my_value = int(slider.max_value) + line_edit.text = str(my_value) + slider.value = float(my_value) + if prev_value != my_value: + value_changed.emit(my_value) diff --git a/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd.uid b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd.uid new file mode 100644 index 0000000..06ad244 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd.uid @@ -0,0 +1 @@ +uid://cu5gallcaxllu diff --git a/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.tscn b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.tscn new file mode 100644 index 0000000..0e7c33d --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=2 format=3 uid="uid://chi7cp6qp6vki"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/range_slider_with_line_edit.gd" id="1_6fi0e"] + +[node name="RangeSliderWithLineEdit" type="HBoxContainer"] +script = ExtResource("1_6fi0e") + +[node name="Slider" type="HSlider" parent="."] +custom_minimum_size = Vector2(150, 0) +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 1 +min_value = 1.0 +max_value = 10.0 +value = 1.0 +rounded = true +allow_greater = true + +[node name="LineEdit" type="LineEdit" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +theme_override_constants/minimum_character_width = 2 +text = "1" +alignment = 1 +select_all_on_focus = true + +[connection signal="value_changed" from="Slider" to="." method="_on_slider_value_changed"] +[connection signal="text_changed" from="LineEdit" to="." method="_on_line_edit_text_changed"] +[connection signal="text_submitted" from="LineEdit" to="." method="_on_line_edit_text_submitted"] diff --git a/addons/ez_tiles/ez_tiles_draw/stamp.gd b/addons/ez_tiles/ez_tiles_draw/stamp.gd new file mode 100644 index 0000000..647ae96 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp.gd @@ -0,0 +1,56 @@ +@tool +extends PanelContainer + +class_name Stamp + +var style_box_normal : StyleBoxFlat +var style_box_hover : StyleBoxFlat +var style_box_selected : StyleBoxFlat +var grid_container : GridContainer +var is_selected := false +var stamp_size := Vector2i.ONE +var tile_textures : Array[TextureRect] = [] +var tile_map_layer_under_edit : TileMapLayer +var stamp_cell_data := {} + +signal selected() + + +func _enter_tree() -> void: + style_box_normal = preload("res://addons/ez_tiles/ez_tiles_draw/stamp.stylebox") + style_box_hover = preload("res://addons/ez_tiles/ez_tiles_draw/stamp_hover.stylebox") + style_box_selected = preload("res://addons/ez_tiles/ez_tiles_draw/stamp_selected.stylebox") + grid_container = find_child("GridContainer") + grid_container.columns = stamp_size.x + for tt in tile_textures: + grid_container.add_child(tt) + select() + + +func deselect(): + is_selected = false + add_theme_stylebox_override("panel", style_box_normal) + + +func _on_mouse_entered() -> void: + if not is_selected: + add_theme_stylebox_override("panel", style_box_hover) + + +func _on_mouse_exited() -> void: + if not is_selected: + add_theme_stylebox_override("panel", style_box_normal) + +func select(): + selected.emit() + is_selected = true + add_theme_stylebox_override("panel", style_box_selected) + + +func _on_gui_input(event: InputEvent) -> void: + if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed: + select() + + +func _on_remove_button_pressed() -> void: + queue_free() diff --git a/addons/ez_tiles/ez_tiles_draw/stamp.gd.uid b/addons/ez_tiles/ez_tiles_draw/stamp.gd.uid new file mode 100644 index 0000000..b6ae88b --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp.gd.uid @@ -0,0 +1 @@ +uid://bspv17eu4gm0k diff --git a/addons/ez_tiles/ez_tiles_draw/stamp.stylebox b/addons/ez_tiles/ez_tiles_draw/stamp.stylebox new file mode 100644 index 0000000..87ddf0d Binary files /dev/null and b/addons/ez_tiles/ez_tiles_draw/stamp.stylebox differ diff --git a/addons/ez_tiles/ez_tiles_draw/stamp.tscn b/addons/ez_tiles/ez_tiles_draw/stamp.tscn new file mode 100644 index 0000000..2b09aed --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=5 format=3 uid="uid://cxwounoiwp4xo"] + +[ext_resource type="StyleBox" uid="uid://cebcvill7i7w6" path="res://addons/ez_tiles/ez_tiles_draw/stamp.stylebox" id="1_jeeam"] +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/stamp.gd" id="2_4618f"] +[ext_resource type="Texture2D" uid="uid://cxcgf65bf2tjg" path="res://addons/ez_tiles/ez_tiles_draw/icons/Remove.svg" id="3_a7o81"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4kexi"] +bg_color = Color(0, 0, 0, 0.223529) + +[node name="Stamp" type="PanelContainer"] +size_flags_horizontal = 0 +size_flags_vertical = 0 +mouse_default_cursor_shape = 2 +theme_override_styles/panel = ExtResource("1_jeeam") +script = ExtResource("2_4618f") + +[node name="GridContainer" type="GridContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +theme_override_constants/h_separation = 0 +theme_override_constants/v_separation = 0 +columns = 8 + +[node name="RemoveButton" type="Button" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +theme_override_colors/icon_normal_color = Color(0.63, 0.63, 0.63, 1) +theme_override_styles/normal = SubResource("StyleBoxFlat_4kexi") +icon = ExtResource("3_a7o81") + +[connection signal="gui_input" from="." to="." method="_on_gui_input"] +[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] +[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"] +[connection signal="pressed" from="RemoveButton" to="." method="_on_remove_button_pressed"] diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_hover.stylebox b/addons/ez_tiles/ez_tiles_draw/stamp_hover.stylebox new file mode 100644 index 0000000..ae5e577 Binary files /dev/null and b/addons/ez_tiles/ez_tiles_draw/stamp_hover.stylebox differ diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_selected.stylebox b/addons/ez_tiles/ez_tiles_draw/stamp_selected.stylebox new file mode 100644 index 0000000..7d12c0e Binary files /dev/null and b/addons/ez_tiles/ez_tiles_draw/stamp_selected.stylebox differ diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd b/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd new file mode 100644 index 0000000..dfa7260 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd @@ -0,0 +1,58 @@ +@tool +extends PanelContainer +class_name StampTab + +signal snapshot_toggled(on_off : bool) + +var h_flow_container : HFlowContainer +var snapshot_button : Button + +func _enter_tree() -> void: + h_flow_container = find_child("HFlowContainer") + snapshot_button = find_child("SnapShotSelectButton") + for stamp : Stamp in find_children("Stamp*"): + stamp.selected.connect(func(): _on_stamp_selected(stamp)) + + +func _on_stamp_selected(selected_stamp : Stamp): + snapshot_button.button_pressed = false + snapshot_button.focus_mode = Control.FOCUS_NONE + for child in h_flow_container.get_children(): + if is_instance_valid(child) and child != selected_stamp and child is Stamp: + child.deselect() + snapshot_toggled.emit(false) + + +func add_stamp(stamp : Stamp): + stamp.selected.connect(func(): _on_stamp_selected(stamp)) + h_flow_container.add_child(stamp) + + +func get_selected_stamp() -> Stamp: + for child in h_flow_container.get_children(): + if is_instance_valid(child) and child is Stamp and child.is_selected and child.visible: + return child + return null + +func start_snapshot(): + snapshot_button.button_pressed = true + for child in h_flow_container.get_children(): + if is_instance_valid(child) and child is Stamp: + child.deselect() + + +func stop_snapshotting(): + snapshot_button.button_pressed = false + + +func _on_snap_shot_select_button_toggled(toggled_on: bool) -> void: + snapshot_toggled.emit(toggled_on) + + +func show_stamps_for_tile_map_layer(tml : TileMapLayer) -> void: + for child in h_flow_container.get_children(): + if child is Stamp: + if child.tile_map_layer_under_edit == tml: + child.show() + else: + child.hide() diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd.uid b/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd.uid new file mode 100644 index 0000000..d130351 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp_tab.gd.uid @@ -0,0 +1 @@ +uid://b0j87ylb537s0 diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_tab.tscn b/addons/ez_tiles/ez_tiles_draw/stamp_tab.tscn new file mode 100644 index 0000000..ab671a0 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp_tab.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=4 format=3 uid="uid://catlvg1l82g5v"] + +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/stamp_tab.gd" id="1_c1kw7"] +[ext_resource type="Texture2D" uid="uid://copno6ivhw1mu" path="res://addons/ez_tiles/ez_tiles_draw/icons/SnapShot.svg" id="1_jqf6j"] + +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_q6lwj"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 + +[node name="StampTab" type="PanelContainer"] +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_styles/panel = SubResource("StyleBoxEmpty_q6lwj") +script = ExtResource("1_c1kw7") +metadata/_tab_index = 2 + +[node name="ScrollContainer" type="ScrollContainer" parent="."] +layout_mode = 2 +horizontal_scroll_mode = 0 + +[node name="HFlowContainer" type="HFlowContainer" parent="ScrollContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +theme_override_constants/h_separation = 5 +theme_override_constants/v_separation = 5 + +[node name="SnapShotSelectButton" type="Button" parent="ScrollContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 0 +size_flags_vertical = 0 +toggle_mode = true +icon = ExtResource("1_jqf6j") +icon_alignment = 1 + +[connection signal="toggled" from="ScrollContainer/HFlowContainer/SnapShotSelectButton" to="." method="_on_snap_shot_select_button_toggled"] diff --git a/addons/ez_tiles/ez_tiles_draw/stamp_tile.tscn b/addons/ez_tiles/ez_tiles_draw/stamp_tile.tscn new file mode 100644 index 0000000..80be299 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/stamp_tile.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=2 format=3 uid="uid://cn1kk5uedjgwp"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_q2mxv"] + +[node name="StampTile" type="TextureRect"] +custom_minimum_size = Vector2(16, 16) +size_flags_horizontal = 8 +size_flags_vertical = 8 +texture = SubResource("AtlasTexture_q2mxv") +expand_mode = 3 diff --git a/addons/ez_tiles/ez_tiles_draw/terrain_picker_button_group.tres b/addons/ez_tiles/ez_tiles_draw/terrain_picker_button_group.tres new file mode 100644 index 0000000..098ca2c --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/terrain_picker_button_group.tres @@ -0,0 +1,5 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://j3ffo1rd1gce"] + +[resource] +resource_local_to_scene = false +allow_unpress = true diff --git a/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd new file mode 100644 index 0000000..f48a708 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd @@ -0,0 +1,34 @@ +@tool +extends HBoxContainer + +class_name TerrainPickerEntry + +signal selected(terrain_id : int) + +var terrain_id : int +var terrain_name_button : Button +var terrain_name : String +var texture_resource : Texture2D +var icon : TextureRect + + +func _enter_tree() -> void: + terrain_name_button = find_child("TerrainNameButton") + icon = find_child("IconTextureRect") + terrain_name_button.text = terrain_name + if is_instance_valid(texture_resource): + icon.texture = texture_resource + + +func _on_icon_texture_rect_gui_input(event: InputEvent) -> void: + if event is InputEventMouseButton: + if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: + selected.emit(terrain_id) + terrain_name_button.button_pressed = true + if event is InputEventMouseMotion: + terrain_name_button.grab_focus() + + +func _on_terrain_name_button_pressed() -> void: + selected.emit(terrain_id) + diff --git a/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd.uid b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd.uid new file mode 100644 index 0000000..33ea596 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd.uid @@ -0,0 +1 @@ +uid://b5483bu7juaph diff --git a/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.tscn b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.tscn new file mode 100644 index 0000000..80c11c7 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=4 format=3 uid="uid://cfs45hiixp0h2"] + +[ext_resource type="ButtonGroup" uid="uid://j3ffo1rd1gce" path="res://addons/ez_tiles/ez_tiles_draw/terrain_picker_button_group.tres" id="1_1wme2"] +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/terrain_picker_entry.gd" id="1_i3rdw"] + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_geq4r"] +size = Vector2(384, 256) + +[node name="TerrainPickerEntry" type="HBoxContainer"] +custom_minimum_size = Vector2(0, 40) +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 31.0 +grow_horizontal = 2 +script = ExtResource("1_i3rdw") + +[node name="IconTextureRect" type="TextureRect" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +mouse_filter = 0 +mouse_default_cursor_shape = 2 +texture = SubResource("PlaceholderTexture2D_geq4r") +expand_mode = 3 +stretch_mode = 5 + +[node name="TerrainNameButton" type="Button" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = ExtResource("1_1wme2") +text = "Terrain name here" +alignment = 0 + +[connection signal="gui_input" from="IconTextureRect" to="." method="_on_icon_texture_rect_gui_input"] +[connection signal="pressed" from="TerrainNameButton" to="." method="_on_terrain_name_button_pressed"] diff --git a/addons/ez_tiles/ez_tiles_draw/tile_button.gd b/addons/ez_tiles/ez_tiles_draw/tile_button.gd new file mode 100644 index 0000000..8a92821 --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/tile_button.gd @@ -0,0 +1,11 @@ +@tool +extends Button +class_name TileButton + +signal clicked(coords : Vector2i) + +var coords := Vector2i.ZERO + +func _on_pressed() -> void: + clicked.emit(coords) + button_pressed = true diff --git a/addons/ez_tiles/ez_tiles_draw/tile_button.gd.uid b/addons/ez_tiles/ez_tiles_draw/tile_button.gd.uid new file mode 100644 index 0000000..241438f --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/tile_button.gd.uid @@ -0,0 +1 @@ +uid://by7i58quit85g diff --git a/addons/ez_tiles/ez_tiles_draw/tile_button.tscn b/addons/ez_tiles/ez_tiles_draw/tile_button.tscn new file mode 100644 index 0000000..cda172a --- /dev/null +++ b/addons/ez_tiles/ez_tiles_draw/tile_button.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=3 format=3 uid="uid://brj7avx23jyw2"] + +[ext_resource type="ButtonGroup" uid="uid://dtpx52d0n4ff1" path="res://addons/ez_tiles/ez_tiles_draw/brush_tile_button_group.tres" id="1_jn7g0"] +[ext_resource type="Script" path="res://addons/ez_tiles/ez_tiles_draw/tile_button.gd" id="2_831ko"] + +[node name="TileButton" type="Button"] +custom_minimum_size = Vector2(40, 40) +theme_override_colors/icon_normal_color = Color(0.556863, 0.556863, 0.556863, 1) +theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1) +theme_override_colors/icon_hover_color = Color(1, 1, 1, 1) +toggle_mode = true +button_group = ExtResource("1_jn7g0") +flat = true +icon_alignment = 1 +expand_icon = true +script = ExtResource("2_831ko") + +[connection signal="pressed" from="." to="." method="_on_pressed"] diff --git a/addons/ez_tiles/guide.png b/addons/ez_tiles/guide.png new file mode 100644 index 0000000..491d03f Binary files /dev/null and b/addons/ez_tiles/guide.png differ diff --git a/addons/ez_tiles/guide.png.import b/addons/ez_tiles/guide.png.import new file mode 100644 index 0000000..66798a8 --- /dev/null +++ b/addons/ez_tiles/guide.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d4a0dorx8awbg" +path="res://.godot/imported/guide.png-8636de6038a75fffe8f18227cfcb8946.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/ez_tiles/guide.png" +dest_files=["res://.godot/imported/guide.png-8636de6038a75fffe8f18227cfcb8946.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/addons/ez_tiles/images_container.gd b/addons/ez_tiles/images_container.gd new file mode 100644 index 0000000..2c2057f --- /dev/null +++ b/addons/ez_tiles/images_container.gd @@ -0,0 +1,69 @@ +@tool +extends ScrollContainer +class_name ImagesContainer + +signal drop_files(files : PackedStringArray) +signal terrain_list_entry_removed(resource_id : RID) +signal terrain_list_entry_selected(resource_id : RID) +signal terrain_list_collision_type_selected(resource_id : RID, type_id : EZTilesDock.CollisionType) + +var image_list : VBoxContainer +var hint_label : VBoxContainer +var TerrainListEntry +var terrain_name_regex := RegEx.new() + + +func _enter_tree() -> void: + TerrainListEntry = preload("res://addons/ez_tiles/terrain_list_entry.tscn") + image_list = find_child("ImageList") + hint_label = find_child("HintLabel") + terrain_name_regex.compile("^.*\\/([^\\.]+)\\..*$") + + +func _can_drop_data(at_position : Vector2, data : Variant) -> bool: + if not typeof(data) == TYPE_DICTIONARY and "type" in data and data["type"] == "files": + return false + + for file : String in data["files"]: + if (file.ends_with(".png") or file.ends_with(".svg") or file.ends_with(".webp") or + file.ends_with(".jpg") or file.ends_with(".bmp") or file.ends_with(".tga")): + return true + + return false + + +func _drop_data(at_position: Vector2, data: Variant) -> void: + if _can_drop_data(at_position, data): + drop_files.emit(data["files"]) + + +func _on_terrain_list_entry_removed(rid : RID) -> void: + terrain_list_entry_removed.emit(rid) + if image_list.get_children().size() <= 1: + image_list.hide() + hint_label.show() + + +func add_file(img_resource : CompressedTexture2D, invalid_message : String = ""): + hint_label.hide() + var new_entry : TerrainListEntry = TerrainListEntry.instantiate() + var regex_result := terrain_name_regex.search(img_resource.resource_path).strings + if regex_result.size() < 2: + new_entry.terrain_name = img_resource.resource_path + else: + new_entry.terrain_name = regex_result[1].replace("_", " ") + new_entry.texture_resource = img_resource + new_entry.warning_message = invalid_message + image_list.add_child(new_entry) + image_list.show() + new_entry.removed.connect(func(): _on_terrain_list_entry_removed(img_resource.get_rid())) + new_entry.selected.connect(func(): terrain_list_entry_selected.emit(img_resource.get_rid())) + new_entry.collision_type_selected.connect( + func(type_id : EZTilesDock.CollisionType): terrain_list_collision_type_selected.emit(img_resource.get_rid(), type_id) + ) + +func gather_data() -> Array: + var data := [] + for entry : TerrainListEntry in image_list.get_children(): + data.append(entry.gather_data()) + return data diff --git a/addons/ez_tiles/images_container.gd.uid b/addons/ez_tiles/images_container.gd.uid new file mode 100644 index 0000000..f01336b --- /dev/null +++ b/addons/ez_tiles/images_container.gd.uid @@ -0,0 +1 @@ +uid://brfnb2fjqpt5u diff --git a/addons/ez_tiles/images_container.tscn b/addons/ez_tiles/images_container.tscn new file mode 100644 index 0000000..e38c777 --- /dev/null +++ b/addons/ez_tiles/images_container.tscn @@ -0,0 +1,50 @@ +[gd_scene load_steps=4 format=3 uid="uid://1u5mrsioaaon"] + +[ext_resource type="Script" path="res://addons/ez_tiles/images_container.gd" id="1_nrl1h"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_daguq"] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(0.12549, 0.145098, 0.172549, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_wwpia"] +font_color = Color(0.621524, 0.621524, 0.621524, 1) + +[node name="ImagesContainer" type="ScrollContainer"] +custom_minimum_size = Vector2(400, 0) +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_vertical = 3 +theme_override_styles/panel = SubResource("StyleBoxFlat_daguq") +horizontal_scroll_mode = 0 +script = ExtResource("1_nrl1h") + +[node name="HintLabel" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 6 + +[node name="Label" type="Label" parent="HintLabel"] +layout_mode = 2 +size_flags_vertical = 0 +text = "Drop image files here" +label_settings = SubResource("LabelSettings_wwpia") +horizontal_alignment = 1 + +[node name="LinkButton" type="LinkButton" parent="HintLabel"] +layout_mode = 2 +size_flags_horizontal = 4 +size_flags_vertical = 0 +size_flags_stretch_ratio = 0.0 +text = "Watch explainers" +uri = "https://youtube.com/playlist?list=PL5lf_BvgORchB6W4Dn-EbqPPeXR2l30Wt&feature=shared" + +[node name="ImageList" type="VBoxContainer" parent="."] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 diff --git a/addons/ez_tiles/load_files_button.gd b/addons/ez_tiles/load_files_button.gd new file mode 100644 index 0000000..10e6f79 --- /dev/null +++ b/addons/ez_tiles/load_files_button.gd @@ -0,0 +1,27 @@ +@tool +extends Button +class_name LoadFilesButton + +signal load_files(files : PackedStringArray) + +var file_dialog : EditorFileDialog + +func _enter_tree() -> void: + file_dialog = EditorFileDialog.new() + file_dialog.add_filter("*.png,*.svg,*.webp,*.jpg,*.jpeg,*.bmp,*.tga", "Image files") + file_dialog.file_mode = EditorFileDialog.FILE_MODE_OPEN_FILES + file_dialog.files_selected.connect(_on_files_selected) + EditorInterface.get_base_control().add_child(file_dialog) + + +func _on_files_selected(files : PackedStringArray) -> void: + load_files.emit(files) + + +func _exit_tree(): + # Cleanup + file_dialog.queue_free() + + +func _on_pressed() -> void: + file_dialog.popup_file_dialog() diff --git a/addons/ez_tiles/load_files_button.gd.uid b/addons/ez_tiles/load_files_button.gd.uid new file mode 100644 index 0000000..f2a33eb --- /dev/null +++ b/addons/ez_tiles/load_files_button.gd.uid @@ -0,0 +1 @@ +uid://dso6vfx3fidvs diff --git a/addons/ez_tiles/plugin.cfg b/addons/ez_tiles/plugin.cfg new file mode 100644 index 0000000..e2e9c0d --- /dev/null +++ b/addons/ez_tiles/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="EZ Tiles" +description="With EZ Tiles you can quickly import one specific PNG tilesheet template and start drawing quickly. See the Youtube explainer for a quickstart instruction." +author="René and Chris van der Ark" +version="1.0.3" +script="ez_tiles.gd" diff --git a/addons/ez_tiles/preview_panel_container.gd b/addons/ez_tiles/preview_panel_container.gd new file mode 100644 index 0000000..36eb112 --- /dev/null +++ b/addons/ez_tiles/preview_panel_container.gd @@ -0,0 +1,21 @@ +@tool +extends CenterContainer + +signal drop_files(files : PackedStringArray) + + +func _can_drop_data(at_position : Vector2, data : Variant) -> bool: + if not typeof(data) == TYPE_DICTIONARY and "type" in data and data["type"] == "files": + return false + + for file : String in data["files"]: + if (file.ends_with(".png") or file.ends_with(".svg") or file.ends_with(".webp") or + file.ends_with(".jpg") or file.ends_with(".bmp") or file.ends_with(".tga")): + return true + + return false + + +func _drop_data(at_position: Vector2, data: Variant) -> void: + if _can_drop_data(at_position, data): + drop_files.emit(data["files"]) diff --git a/addons/ez_tiles/preview_panel_container.gd.uid b/addons/ez_tiles/preview_panel_container.gd.uid new file mode 100644 index 0000000..70c6548 --- /dev/null +++ b/addons/ez_tiles/preview_panel_container.gd.uid @@ -0,0 +1 @@ +uid://b5lnmugjic5k1 diff --git a/addons/ez_tiles/select_terrain_button_group.tres b/addons/ez_tiles/select_terrain_button_group.tres new file mode 100644 index 0000000..af33b8d --- /dev/null +++ b/addons/ez_tiles/select_terrain_button_group.tres @@ -0,0 +1,5 @@ +[gd_resource type="ButtonGroup" format=3 uid="uid://b5bf2ekbf2vrc"] + +[resource] +resource_local_to_scene = false +allow_unpress = true diff --git a/addons/ez_tiles/terrain_list_entry.gd b/addons/ez_tiles/terrain_list_entry.gd new file mode 100644 index 0000000..3fa685b --- /dev/null +++ b/addons/ez_tiles/terrain_list_entry.gd @@ -0,0 +1,88 @@ +@tool +extends HBoxContainer +class_name TerrainListEntry + +signal removed() +signal selected() +signal collision_type_selected(type_id : EZTilesDock.CollisionType) + +var terrain_name_input : LineEdit +var terrain_name_button : Button +var edit_button : Button +var save_button : Button +var terrain_name : String +var texture_resource : CompressedTexture2D +var collision_type_button : OptionButton +var icon : TextureRect +var warning_icon : TextureRect +var warning_message : String = "" + +func _enter_tree() -> void: + save_button = find_child("SaveButton") + edit_button = find_child("EditButton") + collision_type_button = find_child("CollisionTypeButton") + terrain_name_input = find_child("TerrainNameInput") + terrain_name_button = find_child("TerrainNameButton") + icon = find_child("IconTextureRect") + warning_icon = find_child("WarningIcon") + terrain_name_input.text = terrain_name + terrain_name_button.text = terrain_name + if is_instance_valid(texture_resource): + icon.texture = texture_resource + terrain_name_button.button_pressed = true + if warning_message.length() > 0: + warning_icon.tooltip_text = warning_message + warning_icon.show() + +func _on_edit_button_pressed() -> void: + edit_button.hide() + save_button.show() + terrain_name_button.hide() + terrain_name_input.show() + terrain_name_input.grab_focus() + + +func save_new_terrain_name() -> void: + if terrain_name_input.text.length() > 0: + terrain_name = terrain_name_input.text + + terrain_name_button.text = terrain_name + terrain_name_input.text = terrain_name + terrain_name_button.show() + terrain_name_input.hide() + edit_button.show() + save_button.hide() + + +func _on_remove_button_pressed() -> void: + removed.emit() + queue_free() + + +func _on_terrain_name_button_pressed() -> void: + selected.emit() + + +func _on_terrain_name_input_text_submitted(_new_text: String) -> void: + save_new_terrain_name() + + +func gather_data() -> Dictionary: + return { + "texture_resource": texture_resource, + "terrain_name": terrain_name, + "layer_type": collision_type_button.get_selected_id() + } + + +func _on_icon_texture_rect_gui_input(event: InputEvent) -> void: + if event is InputEventMouseButton: + if event.button_index == MOUSE_BUTTON_LEFT and event.pressed: + selected.emit() + terrain_name_button.button_pressed = true + if event is InputEventMouseMotion: + terrain_name_button.grab_focus() + + +func _on_collision_type_button_item_selected(index: int) -> void: + collision_type_selected.emit(collision_type_button.get_selected_id()) diff --git a/addons/ez_tiles/terrain_list_entry.gd.uid b/addons/ez_tiles/terrain_list_entry.gd.uid new file mode 100644 index 0000000..6522faa --- /dev/null +++ b/addons/ez_tiles/terrain_list_entry.gd.uid @@ -0,0 +1 @@ +uid://donmw3vyv7uar diff --git a/addons/ez_tiles/terrain_list_entry.tscn b/addons/ez_tiles/terrain_list_entry.tscn new file mode 100644 index 0000000..8d5932d --- /dev/null +++ b/addons/ez_tiles/terrain_list_entry.tscn @@ -0,0 +1,105 @@ +[gd_scene load_steps=8 format=3 uid="uid://dk3duerdgfgah"] + +[ext_resource type="Script" path="res://addons/ez_tiles/terrain_list_entry.gd" id="1_237eo"] +[ext_resource type="Texture2D" uid="uid://smg4iofcineo" path="res://addons/ez_tiles/Remove.svg" id="1_e3wgq"] +[ext_resource type="Texture2D" uid="uid://dwo07c1odx7ob" path="res://addons/ez_tiles/Edit.svg" id="2_6tddt"] +[ext_resource type="ButtonGroup" uid="uid://b5bf2ekbf2vrc" path="res://addons/ez_tiles/select_terrain_button_group.tres" id="2_framc"] +[ext_resource type="Texture2D" uid="uid://cxl4w251e8xgf" path="res://addons/ez_tiles/Save.svg" id="4_6vr40"] +[ext_resource type="Texture2D" uid="uid://cfrwoh80yb3se" path="res://addons/ez_tiles/exclamation-warning-triangle-icon.svg" id="6_yi7ck"] + +[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_n7skr"] +size = Vector2(384, 256) + +[node name="TerrainListEntry" type="HBoxContainer"] +anchors_preset = 10 +anchor_right = 1.0 +offset_bottom = 31.0 +grow_horizontal = 2 +size_flags_horizontal = 3 +script = ExtResource("1_237eo") + +[node name="WarningIcon" type="TextureRect" parent="."] +visible = false +custom_minimum_size = Vector2(32, 16) +layout_mode = 2 +tooltip_text = "Unexpected image size: +Expected it to be: " +texture = ExtResource("6_yi7ck") +stretch_mode = 3 + +[node name="IconTextureRect" type="TextureRect" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +mouse_filter = 0 +mouse_default_cursor_shape = 2 +texture = SubResource("PlaceholderTexture2D_n7skr") +expand_mode = 3 +stretch_mode = 5 + +[node name="TerrainNameButton" type="Button" parent="."] +layout_mode = 2 +size_flags_horizontal = 3 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = ExtResource("2_framc") +alignment = 0 + +[node name="TerrainNameInput" type="LineEdit" parent="."] +visible = false +layout_mode = 2 +size_flags_horizontal = 3 +placeholder_text = "Terrain name..." +select_all_on_focus = true + +[node name="EditButton" type="Button" parent="."] +layout_mode = 2 +tooltip_text = "Change Terrain Name" +icon = ExtResource("2_6tddt") + +[node name="SaveButton" type="Button" parent="."] +visible = false +layout_mode = 2 +icon = ExtResource("4_6vr40") + +[node name="CollisionTypeButton" type="OptionButton" parent="."] +layout_mode = 2 +size_flags_horizontal = 0 +tooltip_text = "Pick a template for collision polygon, or pick: +- No Collision +- Navigable, i.e.: no Collision with Navigation; where navigation polygons are generated as full rectangles for pathfinding." +selected = 8 +fit_to_longest_item = false +allow_reselect = true +item_count = 10 +popup/item_0/text = "Rectangles" +popup/item_1/text = "Sloped All Corners" +popup/item_1/id = 3 +popup/item_2/text = "Sloped Top Corners" +popup/item_2/id = 1 +popup/item_3/text = "Sloped Bottom Corners" +popup/item_3/id = 4 +popup/item_4/text = "Rounded Corners" +popup/item_4/id = 5 +popup/item_5/text = "Rounded Corners (Inverse)" +popup/item_5/id = 6 +popup/item_6/text = "Tree" +popup/item_6/id = 7 +popup/item_7/text = "Cactus" +popup/item_7/id = 8 +popup/item_8/text = "No Collision" +popup/item_8/id = 2 +popup/item_9/text = "Navigable" +popup/item_9/id = 9 + +[node name="RemoveButton" type="Button" parent="."] +layout_mode = 2 +icon = ExtResource("1_e3wgq") + +[connection signal="gui_input" from="IconTextureRect" to="." method="_on_icon_texture_rect_gui_input"] +[connection signal="pressed" from="TerrainNameButton" to="." method="_on_terrain_name_button_pressed"] +[connection signal="focus_exited" from="TerrainNameInput" to="." method="save_new_terrain_name"] +[connection signal="text_submitted" from="TerrainNameInput" to="." method="_on_terrain_name_input_text_submitted"] +[connection signal="pressed" from="EditButton" to="." method="_on_edit_button_pressed"] +[connection signal="pressed" from="SaveButton" to="." method="save_new_terrain_name"] +[connection signal="item_selected" from="CollisionTypeButton" to="." method="_on_collision_type_button_item_selected"] +[connection signal="pressed" from="RemoveButton" to="." method="_on_remove_button_pressed"] diff --git a/coin.gd b/coin.gd new file mode 100644 index 0000000..5871267 --- /dev/null +++ b/coin.gd @@ -0,0 +1,6 @@ +extends Area2D + +func _on_body_entered(body: Node2D) -> void: + print("you got coing") + queue_free() + pass # Replace with function body. diff --git a/coin.gd.uid b/coin.gd.uid new file mode 100644 index 0000000..19930ac --- /dev/null +++ b/coin.gd.uid @@ -0,0 +1 @@ +uid://csmkrqtuurkyo diff --git a/coin.tscn b/coin.tscn new file mode 100644 index 0000000..8106fa2 --- /dev/null +++ b/coin.tscn @@ -0,0 +1,65 @@ +[gd_scene format=3 uid="uid://bwwv5c0bsfmgh"] + +[ext_resource type="Script" uid="uid://csmkrqtuurkyo" path="res://coin.gd" id="1_0t63x"] +[ext_resource type="Texture2D" uid="uid://c7kuxextst4j0" path="res://sprites/coin/MonedaD.png" id="1_d5gmh"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_0t63x"] +radius = 7.0 + +[sub_resource type="AtlasTexture" id="AtlasTexture_v7riw"] +atlas = ExtResource("1_d5gmh") +region = Rect2(0, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pdq0q"] +atlas = ExtResource("1_d5gmh") +region = Rect2(16, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_w14il"] +atlas = ExtResource("1_d5gmh") +region = Rect2(32, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_h4etq"] +atlas = ExtResource("1_d5gmh") +region = Rect2(48, 0, 16, 16) + +[sub_resource type="AtlasTexture" id="AtlasTexture_o4fra"] +atlas = ExtResource("1_d5gmh") +region = Rect2(64, 0, 16, 16) + +[sub_resource type="SpriteFrames" id="SpriteFrames_te2np"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_v7riw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pdq0q") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_w14il") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_h4etq") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_o4fra") +}], +"loop": true, +"name": &"default", +"speed": 5.0 +}] + +[node name="Coin" type="Area2D" unique_id=1353750555] +script = ExtResource("1_0t63x") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1032039025] +scale = Vector2(4, 4) +shape = SubResource("CircleShape2D_0t63x") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=168181176] +scale = Vector2(4, 4) +sprite_frames = SubResource("SpriteFrames_te2np") +autoplay = "default" +frame_progress = 0.9891366 + +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/dino.gd b/dino.gd new file mode 100644 index 0000000..6f5b46e --- /dev/null +++ b/dino.gd @@ -0,0 +1,25 @@ +extends CharacterBody2D + + +const SPEED = 300.0 +const JUMP_VELOCITY = -800.0 + + +func _physics_process(delta: float) -> void: + # Add the gravity. + if not is_on_floor(): + velocity += get_gravity() * delta + + # Handle jump. + if Input.is_action_just_pressed("ui_accept") and is_on_floor(): + velocity.y = JUMP_VELOCITY + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + var direction := Input.get_axis("ui_left", "ui_right") + if direction: + velocity.x = direction * SPEED + else: + velocity.x = move_toward(velocity.x, 0, SPEED) + + move_and_slide() diff --git a/dino.gd.uid b/dino.gd.uid new file mode 100644 index 0000000..ca7b08b --- /dev/null +++ b/dino.gd.uid @@ -0,0 +1 @@ +uid://bpkdfjw75x4tv diff --git a/dino.tscn b/dino.tscn new file mode 100644 index 0000000..d06aa19 --- /dev/null +++ b/dino.tscn @@ -0,0 +1,135 @@ +[gd_scene format=3 uid="uid://b4dj7u1t6qjuy"] + +[ext_resource type="Texture2D" uid="uid://dw64sm6hvikka" path="res://sprites/dino/DinoSprites - doux.png" id="1_la3et"] + +[sub_resource type="AtlasTexture" id="AtlasTexture_2lsqi"] +atlas = ExtResource("1_la3et") +region = Rect2(0, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ab7rj"] +atlas = ExtResource("1_la3et") +region = Rect2(24, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_cm433"] +atlas = ExtResource("1_la3et") +region = Rect2(48, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_x55me"] +atlas = ExtResource("1_la3et") +region = Rect2(72, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_8c0fg"] +atlas = ExtResource("1_la3et") +region = Rect2(240, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_il6vs"] +atlas = ExtResource("1_la3et") +region = Rect2(264, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ltur4"] +atlas = ExtResource("1_la3et") +region = Rect2(288, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_1tmb4"] +atlas = ExtResource("1_la3et") +region = Rect2(312, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_73a84"] +atlas = ExtResource("1_la3et") +region = Rect2(96, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_fmqac"] +atlas = ExtResource("1_la3et") +region = Rect2(120, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ywlg6"] +atlas = ExtResource("1_la3et") +region = Rect2(144, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_pfltw"] +atlas = ExtResource("1_la3et") +region = Rect2(168, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_vwdhm"] +atlas = ExtResource("1_la3et") +region = Rect2(192, 0, 24, 24) + +[sub_resource type="AtlasTexture" id="AtlasTexture_ygjic"] +atlas = ExtResource("1_la3et") +region = Rect2(216, 0, 24, 24) + +[sub_resource type="SpriteFrames" id="SpriteFrames_cqd6i"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_2lsqi") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ab7rj") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_cm433") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_x55me") +}], +"loop": true, +"name": &"idle", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_8c0fg") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_il6vs") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ltur4") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_1tmb4") +}], +"loop": true, +"name": &"jump", +"speed": 10.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": SubResource("AtlasTexture_73a84") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_fmqac") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ywlg6") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_pfltw") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_vwdhm") +}, { +"duration": 1.0, +"texture": SubResource("AtlasTexture_ygjic") +}], +"loop": true, +"name": &"walk", +"speed": 5.0 +}] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_la3et"] +size = Vector2(8, 17) + +[node name="Dino" type="CharacterBody2D" unique_id=1560363456] + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=465878451] +position = Vector2(0, -9) +sprite_frames = SubResource("SpriteFrames_cqd6i") +animation = &"idle" +autoplay = "idle" +frame_progress = 0.46606407 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=834206527] +position = Vector2(0, -8.5) +shape = SubResource("RectangleShape2D_la3et") diff --git a/game.tscn b/game.tscn new file mode 100644 index 0000000..28975fd --- /dev/null +++ b/game.tscn @@ -0,0 +1,364 @@ +[gd_scene format=4 uid="uid://dnqvtckxgbhqv"] + +[ext_resource type="PackedScene" uid="uid://b4dj7u1t6qjuy" path="res://dino.tscn" id="1_80nbo"] +[ext_resource type="Script" uid="uid://bpkdfjw75x4tv" path="res://dino.gd" id="2_e2o6t"] +[ext_resource type="Texture2D" uid="uid://dxc264vu06a4x" path="res://addons/ez_tiles/examples/64x64/spikes.svg" id="3_7jktm"] +[ext_resource type="Texture2D" uid="uid://82nd1ajjv633" path="res://addons/ez_tiles/examples/64x64/plains_1.svg" id="4_7jktm"] +[ext_resource type="Texture2D" uid="uid://bbr3esj1mxpl0" path="res://addons/ez_tiles/examples/64x64/plains_2.svg" id="4_ryrav"] +[ext_resource type="PackedScene" uid="uid://bwwv5c0bsfmgh" path="res://coin.tscn" id="6_ryrav"] + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7jktm"] +texture = ExtResource("3_7jktm") +texture_region_size = Vector2i(64, 64) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 0 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0 = 0 +1:0/0/terrain_set = 0 +1:0/0/terrain = 0 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0/terrains_peering_bit/bottom_side = 0 +3:0/0 = 0 +3:0/0/terrain_set = 0 +3:0/0/terrain = 0 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, 32, -32, 32, 32, 32, 32) +3:0/0/terrains_peering_bit/right_side = 0 +3:0/0/terrains_peering_bit/bottom_side = 0 +4:0/0 = 0 +4:0/0/terrain_set = 0 +4:0/0/terrain = 0 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:0/0/terrains_peering_bit/right_side = 0 +4:0/0/terrains_peering_bit/bottom_side = 0 +4:0/0/terrains_peering_bit/left_side = 0 +5:0/0 = 0 +5:0/0/terrain_set = 0 +5:0/0/terrain = 0 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, 32, 32, 32) +5:0/0/terrains_peering_bit/bottom_side = 0 +5:0/0/terrains_peering_bit/left_side = 0 +1:1/0 = 0 +1:1/0/terrain_set = 0 +1:1/0/terrain = 0 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:1/0/terrains_peering_bit/bottom_side = 0 +1:1/0/terrains_peering_bit/top_side = 0 +3:1/0 = 0 +3:1/0/terrain_set = 0 +3:1/0/terrain = 0 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +3:1/0/terrains_peering_bit/right_side = 0 +3:1/0/terrains_peering_bit/bottom_side = 0 +3:1/0/terrains_peering_bit/top_side = 0 +4:1/0 = 0 +4:1/0/terrain_set = 0 +4:1/0/terrain = 0 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:1/0/terrains_peering_bit/right_side = 0 +4:1/0/terrains_peering_bit/bottom_side = 0 +4:1/0/terrains_peering_bit/left_side = 0 +4:1/0/terrains_peering_bit/top_side = 0 +5:1/0 = 0 +5:1/0/terrain_set = 0 +5:1/0/terrain = 0 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +5:1/0/terrains_peering_bit/bottom_side = 0 +5:1/0/terrains_peering_bit/left_side = 0 +5:1/0/terrains_peering_bit/top_side = 0 +1:2/0 = 0 +1:2/0/terrain_set = 0 +1:2/0/terrain = 0 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:2/0/terrains_peering_bit/top_side = 0 +3:2/0 = 0 +3:2/0/terrain_set = 0 +3:2/0/terrain = 0 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -32, 32, -32, 32, 32, 32, 32) +3:2/0/terrains_peering_bit/right_side = 0 +3:2/0/terrains_peering_bit/top_side = 0 +4:2/0 = 0 +4:2/0/terrain_set = 0 +4:2/0/terrain = 0 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:2/0/terrains_peering_bit/right_side = 0 +4:2/0/terrains_peering_bit/left_side = 0 +4:2/0/terrains_peering_bit/top_side = 0 +5:2/0 = 0 +5:2/0/terrain_set = 0 +5:2/0/terrain = 0 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32) +5:2/0/terrains_peering_bit/left_side = 0 +5:2/0/terrains_peering_bit/top_side = 0 +0:3/0 = 0 +0:3/0/terrain_set = 0 +0:3/0/terrain = 0 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +0:3/0/terrains_peering_bit/right_side = 0 +1:3/0 = 0 +1:3/0/terrain_set = 0 +1:3/0/terrain = 0 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:3/0/terrains_peering_bit/right_side = 0 +1:3/0/terrains_peering_bit/left_side = 0 +2:3/0 = 0 +2:3/0/terrain_set = 0 +2:3/0/terrain = 0 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +2:3/0/terrains_peering_bit/left_side = 0 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ryrav"] +texture = ExtResource("4_ryrav") +texture_region_size = Vector2i(64, 64) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 1 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0 = 0 +1:0/0/terrain_set = 0 +1:0/0/terrain = 1 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0/terrains_peering_bit/bottom_side = 1 +3:0/0 = 0 +3:0/0/terrain_set = 0 +3:0/0/terrain = 1 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, 32, -32, 32, 32, 32, 32) +3:0/0/terrains_peering_bit/right_side = 1 +3:0/0/terrains_peering_bit/bottom_side = 1 +4:0/0 = 0 +4:0/0/terrain_set = 0 +4:0/0/terrain = 1 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:0/0/terrains_peering_bit/right_side = 1 +4:0/0/terrains_peering_bit/bottom_side = 1 +4:0/0/terrains_peering_bit/left_side = 1 +5:0/0 = 0 +5:0/0/terrain_set = 0 +5:0/0/terrain = 1 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, 32, 32, 32) +5:0/0/terrains_peering_bit/bottom_side = 1 +5:0/0/terrains_peering_bit/left_side = 1 +1:1/0 = 0 +1:1/0/terrain_set = 0 +1:1/0/terrain = 1 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:1/0/terrains_peering_bit/bottom_side = 1 +1:1/0/terrains_peering_bit/top_side = 1 +3:1/0 = 0 +3:1/0/terrain_set = 0 +3:1/0/terrain = 1 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +3:1/0/terrains_peering_bit/right_side = 1 +3:1/0/terrains_peering_bit/bottom_side = 1 +3:1/0/terrains_peering_bit/top_side = 1 +4:1/0 = 0 +4:1/0/terrain_set = 0 +4:1/0/terrain = 1 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:1/0/terrains_peering_bit/right_side = 1 +4:1/0/terrains_peering_bit/bottom_side = 1 +4:1/0/terrains_peering_bit/left_side = 1 +4:1/0/terrains_peering_bit/top_side = 1 +5:1/0 = 0 +5:1/0/terrain_set = 0 +5:1/0/terrain = 1 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +5:1/0/terrains_peering_bit/bottom_side = 1 +5:1/0/terrains_peering_bit/left_side = 1 +5:1/0/terrains_peering_bit/top_side = 1 +1:2/0 = 0 +1:2/0/terrain_set = 0 +1:2/0/terrain = 1 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:2/0/terrains_peering_bit/top_side = 1 +3:2/0 = 0 +3:2/0/terrain_set = 0 +3:2/0/terrain = 1 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -32, 32, -32, 32, 32, 32, 32) +3:2/0/terrains_peering_bit/right_side = 1 +3:2/0/terrains_peering_bit/top_side = 1 +4:2/0 = 0 +4:2/0/terrain_set = 0 +4:2/0/terrain = 1 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:2/0/terrains_peering_bit/right_side = 1 +4:2/0/terrains_peering_bit/left_side = 1 +4:2/0/terrains_peering_bit/top_side = 1 +5:2/0 = 0 +5:2/0/terrain_set = 0 +5:2/0/terrain = 1 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32) +5:2/0/terrains_peering_bit/left_side = 1 +5:2/0/terrains_peering_bit/top_side = 1 +0:3/0 = 0 +0:3/0/terrain_set = 0 +0:3/0/terrain = 1 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +0:3/0/terrains_peering_bit/right_side = 1 +1:3/0 = 0 +1:3/0/terrain_set = 0 +1:3/0/terrain = 1 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:3/0/terrains_peering_bit/right_side = 1 +1:3/0/terrains_peering_bit/left_side = 1 +2:3/0 = 0 +2:3/0/terrain_set = 0 +2:3/0/terrain = 1 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +2:3/0/terrains_peering_bit/left_side = 1 + +[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_eow3j"] +texture = ExtResource("4_7jktm") +texture_region_size = Vector2i(64, 64) +0:0/0 = 0 +0:0/0/terrain_set = 0 +0:0/0/terrain = 2 +0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0 = 0 +1:0/0/terrain_set = 0 +1:0/0/terrain = 2 +1:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:0/0/terrains_peering_bit/bottom_side = 2 +3:0/0 = 0 +3:0/0/terrain_set = 0 +3:0/0/terrain = 2 +3:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, 32, -32, 32, 32, 32, 32) +3:0/0/terrains_peering_bit/right_side = 2 +3:0/0/terrains_peering_bit/bottom_side = 2 +4:0/0 = 0 +4:0/0/terrain_set = 0 +4:0/0/terrain = 2 +4:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:0/0/terrains_peering_bit/right_side = 2 +4:0/0/terrains_peering_bit/bottom_side = 2 +4:0/0/terrains_peering_bit/left_side = 2 +5:0/0 = 0 +5:0/0/terrain_set = 0 +5:0/0/terrain = 2 +5:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, 32, 32, 32) +5:0/0/terrains_peering_bit/bottom_side = 2 +5:0/0/terrains_peering_bit/left_side = 2 +1:1/0 = 0 +1:1/0/terrain_set = 0 +1:1/0/terrain = 2 +1:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:1/0/terrains_peering_bit/bottom_side = 2 +1:1/0/terrains_peering_bit/top_side = 2 +3:1/0 = 0 +3:1/0/terrain_set = 0 +3:1/0/terrain = 2 +3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +3:1/0/terrains_peering_bit/right_side = 2 +3:1/0/terrains_peering_bit/bottom_side = 2 +3:1/0/terrains_peering_bit/top_side = 2 +4:1/0 = 0 +4:1/0/terrain_set = 0 +4:1/0/terrain = 2 +4:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:1/0/terrains_peering_bit/right_side = 2 +4:1/0/terrains_peering_bit/bottom_side = 2 +4:1/0/terrains_peering_bit/left_side = 2 +4:1/0/terrains_peering_bit/top_side = 2 +5:1/0 = 0 +5:1/0/terrain_set = 0 +5:1/0/terrain = 2 +5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +5:1/0/terrains_peering_bit/bottom_side = 2 +5:1/0/terrains_peering_bit/left_side = 2 +5:1/0/terrains_peering_bit/top_side = 2 +1:2/0 = 0 +1:2/0/terrain_set = 0 +1:2/0/terrain = 2 +1:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:2/0/terrains_peering_bit/top_side = 2 +3:2/0 = 0 +3:2/0/terrain_set = 0 +3:2/0/terrain = 2 +3:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, -32, 32, -32, 32, 32, 32, 32) +3:2/0/terrains_peering_bit/right_side = 2 +3:2/0/terrains_peering_bit/top_side = 2 +4:2/0 = 0 +4:2/0/terrain_set = 0 +4:2/0/terrain = 2 +4:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +4:2/0/terrains_peering_bit/right_side = 2 +4:2/0/terrains_peering_bit/left_side = 2 +4:2/0/terrains_peering_bit/top_side = 2 +5:2/0 = 0 +5:2/0/terrain_set = 0 +5:2/0/terrain = 2 +5:2/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32) +5:2/0/terrains_peering_bit/left_side = 2 +5:2/0/terrains_peering_bit/top_side = 2 +0:3/0 = 0 +0:3/0/terrain_set = 0 +0:3/0/terrain = 2 +0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +0:3/0/terrains_peering_bit/right_side = 2 +1:3/0 = 0 +1:3/0/terrain_set = 0 +1:3/0/terrain = 2 +1:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +1:3/0/terrains_peering_bit/right_side = 2 +1:3/0/terrains_peering_bit/left_side = 2 +2:3/0 = 0 +2:3/0/terrain_set = 0 +2:3/0/terrain = 2 +2:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-32, 32, -32, -32, 32, -32, 32, 32, 32, 32) +2:3/0/terrains_peering_bit/left_side = 2 + +[sub_resource type="TileSet" id="TileSet_j5wjh"] +tile_size = Vector2i(64, 64) +physics_layer_0/collision_layer = 1 +terrain_set_0/mode = 2 +terrain_set_0/terrain_0/name = "spikes" +terrain_set_0/terrain_0/color = Color(0.5, 0.34375, 0.25, 1) +terrain_set_0/terrain_1/name = "plains 2" +terrain_set_0/terrain_1/color = Color(0.5, 0.4375, 0.25, 1) +terrain_set_0/terrain_2/name = "plains 1" +terrain_set_0/terrain_2/color = Color(0.46875, 0.5, 0.25, 1) +sources/0 = SubResource("TileSetAtlasSource_7jktm") +sources/1 = SubResource("TileSetAtlasSource_ryrav") +sources/2 = SubResource("TileSetAtlasSource_eow3j") + +[node name="Game" type="Node2D" unique_id=340801904] + +[node name="Dino" parent="." unique_id=1560363456 instance=ExtResource("1_80nbo")] +position = Vector2(0, -128) +scale = Vector2(4, 4) +script = ExtResource("2_e2o6t") + +[node name="Camera2D" type="Camera2D" parent="Dino" unique_id=2139718142] +position_smoothing_enabled = true + +[node name="EZTilesTileMapLayer" type="TileMapLayer" parent="." unique_id=166272375] +tile_map_data = PackedByteArray("AAD7/wAAAQAEAAEAAAD8/wAAAQAEAAEAAAD9/wAAAQAEAAEAAAD+/wAAAQAEAAEAAAD//wAAAQAEAAEAAAAAAAAAAQAEAAEAAAABAAAAAQAEAAEAAAACAAAAAQAEAAEAAAADAAAAAQAEAAEAAAAEAAAAAQAEAAEAAAD7/wEAAQAEAAEAAAD8/wEAAQAEAAEAAAD9/wEAAQAEAAEAAAD+/wEAAQAEAAEAAAD//wEAAQAEAAEAAAAAAAEAAQAEAAEAAAABAAEAAQAEAAEAAAACAAEAAQAEAAEAAAADAAEAAQAEAAEAAAAEAAEAAQAEAAEAAAD7/wIAAQAEAAEAAAD8/wIAAQAEAAEAAAD9/wIAAQAEAAEAAAD+/wIAAQAEAAEAAAD//wIAAQAEAAEAAAAAAAIAAQAEAAEAAAABAAIAAQAEAAEAAAACAAIAAQAEAAEAAAADAAIAAQAEAAEAAAAEAAIAAQAEAAEAAAAFAAAAAQAEAAEAAAAGAAAAAQAEAAEAAAAHAAAAAQAEAAEAAAAIAAAAAQAEAAEAAAAJAAAAAQAEAAEAAAAFAAEAAQAEAAEAAAAGAAEAAQAEAAEAAAAHAAEAAQAEAAEAAAAIAAEAAQAEAAEAAAAJAAEAAQAEAAEAAAAKAAAAAQAEAAEAAAAKAAEAAQAEAAEAAAALAAAAAQAEAAEAAAALAAEAAQAEAAEAAAAMAAAAAQAEAAEAAAAMAAEAAQAEAAEAAAANAAAAAQAEAAEAAAANAAEAAQAEAAEAAAAOAAAAAQAEAAEAAAAOAAEAAQAEAAEAAAAPAAEAAQAEAAEAAAAQAAEAAQAEAAEAAAARAAEAAQAEAAEAAAASAAEAAQAEAAEAAAATAAEAAQAEAAEAAAAUAAEAAQAEAAEAAAAVAAEAAQAEAAEAAAAWAAEAAQAEAAEAAAAXAAAAAQAEAAEAAAAXAAEAAQAEAAEAAAAYAAAAAQAEAAEAAAAYAAEAAQAEAAEAAAAFAAIAAQAEAAEAAAAGAAIAAQAEAAEAAAAHAAIAAQAEAAEAAAAIAAIAAQAEAAEAAAAJAAIAAQAEAAEAAAAKAAIAAQAEAAEAAAALAAIAAQAEAAEAAAAMAAIAAQAEAAEAAAANAAIAAQAEAAEAAAAOAAIAAQAEAAEAAAAPAAIAAQAEAAEAAAAQAAIAAQAEAAEAAAARAAIAAQAEAAEAAAASAAIAAQAEAAEAAAATAAIAAQAEAAEAAAAUAAIAAQAEAAEAAAAVAAIAAQAEAAEAAAAWAAIAAQAEAAEAAAAXAAIAAQAEAAEAAAAYAAIAAQAEAAEAAAAJAP//AQADAAAAAAAKAP//AQAEAAEAAAAKAP7/AQADAAAAAAALAP7/AQAEAAEAAAALAP//AQAEAAEAAAALAP3/AQADAAAAAAAMAP3/AQAEAAEAAAAMAP7/AQAEAAEAAAAMAP//AQAEAAEAAAANAP3/AQAEAAEAAAANAP7/AQAEAAEAAAANAP//AQAEAAEAAAAMAPz/AQADAAAAAAANAPz/AQAEAAEAAAAOAPz/AQAEAAEAAAAOAP3/AQAEAAEAAAAOAP7/AQAEAAEAAAAOAP//AQAEAAEAAAANAPv/AQADAAAAAAAOAPv/AQAEAAAAAAAPAPv/AQAEAAAAAAAQAPv/AQAEAAAAAAARAPv/AQAEAAAAAAASAPv/AQAEAAAAAAATAPv/AQAEAAAAAAAUAPv/AQAEAAAAAAAVAPv/AQAEAAAAAAAWAPv/AQAEAAAAAAAXAPv/AQAEAAAAAAAXAPz/AQAEAAEAAAAXAP3/AQAEAAEAAAAXAP7/AQAEAAEAAAAXAP//AQAEAAEAAAAYAPv/AQAEAAAAAAAYAPz/AQAEAAEAAAAYAP3/AQAEAAEAAAAYAP7/AQAEAAEAAAAYAP//AQAEAAEAAAAPAPz/AAAEAAAAAAAQAP3/AAAEAAEAAAAPAP3/AAAEAAEAAAARAP7/AAAEAAEAAAAQAP7/AAAEAAEAAAAPAP7/AAAEAAEAAAAQAPz/AAAEAAAAAAARAP3/AAAEAAEAAAASAP7/AAAEAAEAAAATAP//AAAEAAEAAAASAP//AAAEAAEAAAARAP//AAAEAAEAAAAQAP//AAAEAAEAAAAPAP//AAAEAAEAAAARAPz/AAAEAAAAAAASAP3/AAAEAAEAAAATAP7/AAAEAAEAAAAUAP//AAAEAAEAAAAVAAAAAAAEAAEAAAAUAAAAAAAEAAEAAAATAAAAAAAEAAEAAAASAAAAAAAEAAEAAAARAAAAAAAEAAEAAAAQAAAAAAAEAAEAAAAPAAAAAAAEAAEAAAASAPz/AAAFAAAAAAATAP3/AAAFAAAAAAAUAP7/AAAFAAAAAAAVAP//AAAFAAAAAAAWAAAAAAAFAAAAAAAZAAAAAQAEAAEAAAAaAAAAAQAEAAEAAAAoAAAAAQAEAAEAAAApAAAAAQAEAAEAAAAqAAAAAQAEAAEAAAArAAAAAQAEAAEAAAAsAAAAAQAEAAEAAAAtAAAAAQAEAAEAAAAuAAAAAQAEAAEAAAAvAAAAAQAEAAEAAAAwAAAAAQAEAAEAAAAxAAAAAQAEAAEAAAAyAAAAAQAEAAEAAAAzAAAAAQAEAAEAAAA0AAAAAQAEAAEAAAA1AAAAAQAEAAEAAAA2AAAAAQAEAAEAAAA3AAAAAQAEAAEAAAA4AAAAAQAEAAEAAAA5AAAAAQAEAAEAAAAZAAEAAQAEAAEAAAAaAAEAAQAEAAEAAAApAAEAAQAEAAEAAAAqAAEAAQAEAAEAAAArAAEAAQAEAAEAAAAsAAEAAQAEAAEAAAAtAAEAAQAEAAEAAAAuAAEAAQAEAAEAAAAvAAEAAQAEAAEAAAAwAAEAAQAEAAEAAAAxAAEAAQAEAAEAAAAyAAEAAQAEAAEAAAAzAAEAAQAEAAEAAAA0AAEAAQAEAAEAAAA1AAEAAQAEAAEAAAA2AAEAAQAEAAEAAAA3AAEAAQAEAAEAAAA4AAEAAQAEAAEAAAA5AAEAAQAEAAEAAAAZAAIAAQAEAAEAAAAaAAIAAQAEAAEAAAAoAAIAAQAEAAEAAAApAAIAAQAEAAEAAAAqAAIAAQAEAAEAAAArAAIAAQAEAAEAAAAsAAIAAQAEAAEAAAAtAAIAAQAEAAEAAAAuAAIAAQAEAAEAAAAvAAIAAQAEAAEAAAAwAAIAAQAEAAEAAAAxAAIAAQAEAAEAAAAyAAIAAQAEAAEAAAAzAAIAAQAEAAEAAAA0AAIAAQAEAAEAAAA1AAIAAQAEAAEAAAA2AAIAAQAEAAEAAAA3AAIAAQAEAAEAAAA4AAIAAQAEAAEAAAA5AAIAAQAEAAEAAAAbAAAAAQAEAAEAAAAbAAEAAQAEAAEAAAAbAAIAAQAEAAEAAAAeAAAAAQAEAAEAAAAfAAAAAQAEAAEAAAAgAAAAAQAEAAEAAAAhAAAAAQAEAAEAAAAiAAAAAQAEAAEAAAAjAAAAAQAEAAEAAAAkAAAAAQAEAAEAAAAlAAAAAQAEAAEAAAAdAAEAAQAEAAEAAAAeAAEAAQAEAAEAAAAfAAEAAQAEAAEAAAAgAAEAAQAEAAEAAAAmAAEAAQAEAAEAAAAlAAEAAQAEAAEAAAAkAAEAAQAEAAEAAAAjAAEAAQAEAAEAAAAiAAEAAQAEAAEAAAAhAAEAAQAEAAEAAAAdAAIAAQAEAAEAAAAeAAIAAQAEAAEAAAAfAAIAAQAEAAEAAAAgAAIAAQAEAAEAAAAjAAIAAQAEAAEAAAAiAAIAAQAEAAEAAAAhAAIAAQAEAAEAAAAcAAIAAQAEAAEAAAAoAAEAAQAEAAEAAAAdAAAAAQAEAAEAAAAeAP//AQAEAAEAAAAfAP//AQAEAAEAAAAiAP//AQAEAAEAAAAhAP//AQAEAAEAAAAgAP//AQAEAAEAAAAeAP7/AQAEAAEAAAAdAP//AQAEAAEAAAAcAAAAAQAEAAEAAAAfAP7/AQAEAAEAAAAiAP7/AQAEAAEAAAAjAP//AQAEAAEAAAAhAP7/AQAEAAEAAAAgAP7/AQAEAAEAAAAfAP3/AQAEAAEAAAAgAP3/AQAEAAEAAAAiAP3/AQAEAAEAAAAjAP7/AQAEAAEAAAAkAP//AQAEAAEAAAAhAP3/AQAEAAEAAAAfAPz/AQADAAAAAAAeAP3/AQADAAAAAAAdAP7/AQADAAAAAAAcAP//AQADAAAAAAAgAPz/AQAEAAAAAAAiAPz/AQAEAAAAAAAjAP3/AQAEAAEAAAAkAP7/AQAEAAEAAAAlAP//AQAEAAEAAAAhAPz/AQAEAAAAAAAjAPz/AQAEAAAAAAAkAP3/AQAEAAEAAAAlAP7/AQAEAAEAAAAmAP//AQAEAAEAAAAmAAAAAQAEAAEAAAAkAPz/AQAFAAAAAAAlAP3/AQAFAAAAAAAmAP7/AQAFAAAAAAAnAP//AQAFAAAAAAAnAAAAAQAEAAEAAAAkAAIAAQAEAAEAAAAcAAEAAQAEAAEAAAAlAAIAAQAEAAEAAAAmAAIAAQAEAAEAAAAnAAEAAQAEAAEAAAAnAAIAAQAEAAEAAAA2APv/AQADAAIAAAA3APz/AQADAAIAAAA3APv/AQAEAAEAAAA4APz/AQAEAAEAAAA4APv/AQAEAAEAAAA4AP3/AQADAAIAAAA5AP3/AQAEAAIAAAA5APz/AQAEAAEAAAA5APv/AQAEAAEAAAA6AAAAAQAEAAEAAAA6AAEAAQAEAAEAAAA6AAIAAQAEAAEAAAA+AAAAAQADAAEAAAA/AAAAAQAEAAEAAABAAAAAAQAEAAEAAABBAAAAAQAEAAEAAABCAAAAAQAEAAEAAABDAAAAAQAEAAEAAABEAAAAAQAEAAEAAABFAAAAAQAEAAEAAABGAAAAAQAEAAEAAABHAAAAAQAEAAEAAABIAAAAAQAEAAEAAABJAAAAAQAEAAEAAABKAAAAAQAEAAEAAABLAAAAAQAEAAEAAABMAAAAAQAEAAEAAABSAAAAAQAEAAEAAABTAAAAAQAEAAEAAABUAAAAAQAEAAEAAABVAAAAAQAEAAEAAABWAAAAAQAEAAEAAAA/AAEAAQAEAAEAAABAAAEAAQAEAAEAAABBAAEAAQAEAAEAAABCAAEAAQAEAAEAAABDAAEAAQAEAAEAAABEAAEAAQAEAAEAAABFAAEAAQAEAAEAAABGAAEAAQAEAAEAAABHAAEAAQAEAAEAAABIAAEAAQAEAAEAAABJAAEAAQAEAAEAAABVAAEAAQAEAAEAAABUAAEAAQAEAAEAAABTAAEAAQAEAAEAAABSAAEAAQAEAAEAAABRAAEAAQAEAAEAAABNAAEAAQAEAAEAAABMAAEAAQAEAAEAAABLAAEAAQAEAAEAAABKAAEAAQAEAAEAAABWAAEAAQAEAAEAAABXAAAAAQAEAAEAAABXAAEAAQAEAAEAAABYAAAAAQAEAAEAAABYAAEAAQAEAAEAAABZAAAAAQAEAAEAAABZAAEAAQAEAAEAAABaAAAAAQAEAAEAAABaAAEAAQAEAAEAAABbAAAAAQAEAAEAAABbAAEAAQAEAAEAAABcAAAAAQAEAAEAAABcAAEAAQAEAAEAAABdAAAAAQAEAAEAAABAAAIAAQAEAAEAAABBAAIAAQAEAAEAAABCAAIAAQAEAAEAAABDAAIAAQAEAAEAAABEAAIAAQAEAAEAAABFAAIAAQAEAAEAAABGAAIAAQAEAAEAAABHAAIAAQAEAAEAAABIAAIAAQAEAAEAAABJAAIAAQAEAAEAAABKAAIAAQAEAAEAAABLAAIAAQAEAAEAAABMAAIAAQAEAAEAAABNAAIAAQAEAAEAAABbAAIAAQAEAAEAAABaAAIAAQAEAAEAAABZAAIAAQAEAAEAAABYAAIAAQAEAAEAAABXAAIAAQAEAAEAAABWAAIAAQAEAAEAAABVAAIAAQAEAAEAAABUAAIAAQAEAAEAAABTAAIAAQAEAAEAAABSAAIAAQAEAAEAAABRAAIAAQAEAAEAAABQAAIAAQAEAAEAAABOAAIAAQAEAAEAAABBAAMAAQAEAAEAAABCAAMAAQAEAAEAAABDAAMAAQAEAAEAAABEAAMAAQAEAAEAAABFAAMAAQAEAAEAAABGAAMAAQAEAAEAAABHAAMAAQAEAAEAAABIAAMAAQAEAAEAAABJAAMAAQAEAAEAAABKAAMAAQAEAAEAAABLAAMAAQAEAAEAAABMAAMAAQAEAAEAAABNAAMAAQAEAAEAAABaAAMAAQAEAAEAAABZAAMAAQAEAAEAAABYAAMAAQAEAAEAAABXAAMAAQAEAAEAAABWAAMAAQAEAAEAAABVAAMAAQAEAAEAAABUAAMAAQAEAAEAAABTAAMAAQAEAAEAAABSAAMAAQAEAAEAAABRAAMAAQAEAAEAAABQAAMAAQAEAAEAAABOAAMAAQAEAAEAAABCAAQAAQAEAAEAAABDAAQAAQAEAAEAAABEAAQAAQAEAAEAAABFAAQAAQAEAAEAAABGAAQAAQAEAAEAAABHAAQAAQAEAAEAAABIAAQAAQAEAAEAAABJAAQAAQAEAAEAAABKAAQAAQAEAAEAAABLAAQAAQAEAAEAAABMAAQAAQAEAAEAAABNAAQAAQAEAAEAAABZAAQAAQAEAAEAAABYAAQAAQAEAAEAAABXAAQAAQAEAAEAAABWAAQAAQAEAAEAAABVAAQAAQAEAAEAAABUAAQAAQAEAAEAAABTAAQAAQAEAAEAAABSAAQAAQAEAAEAAABRAAQAAQAEAAEAAABQAAQAAQAEAAEAAABOAAQAAQAEAAEAAABDAAUAAQAEAAEAAABEAAUAAQAEAAEAAABFAAUAAQAEAAEAAABGAAUAAQAEAAEAAABHAAUAAQAEAAEAAABIAAUAAQAEAAEAAABJAAUAAQAEAAEAAABKAAUAAQAEAAEAAABLAAUAAQAEAAEAAABMAAUAAQAEAAEAAABNAAUAAQAEAAEAAABZAAUAAQAEAAEAAABaAAQAAQAEAAEAAABbAAMAAQAEAAEAAABcAAIAAQAEAAEAAABdAAEAAQAEAAEAAABeAAAAAQAFAAEAAABYAAUAAQAEAAEAAABXAAUAAQAEAAEAAABWAAUAAQAEAAEAAABVAAUAAQAEAAEAAABUAAUAAQAEAAEAAABTAAUAAQAEAAEAAABSAAUAAQAEAAEAAABRAAUAAQAEAAEAAABQAAUAAQAEAAEAAABOAAUAAQAEAAEAAABEAAYAAQAEAAEAAABFAAYAAQAEAAEAAABGAAYAAQAEAAEAAABHAAYAAQAEAAEAAABYAAYAAQAEAAEAAABRAAYAAQAEAAEAAABQAAYAAQAEAAEAAABOAAYAAQAEAAEAAABFAAcAAQAEAAEAAABGAAcAAQAEAAEAAABHAAcAAQAEAAEAAABRAAcAAQAEAAEAAABQAAcAAQAEAAEAAABOAAcAAQAEAAEAAABGAAgAAQAEAAEAAABHAAgAAQAEAAEAAABRAAgAAQAEAAEAAABQAAgAAQAEAAEAAABHAAkAAQAEAAEAAABRAAkAAQAEAAEAAABIAAoAAQAEAAEAAABJAAoAAQAEAAEAAABLAAoAAQAEAAEAAABMAAoAAQAEAAEAAABNAAoAAQAEAAEAAABPAAoAAQAEAAEAAABOAAoAAQAEAAEAAABJAAsAAQAEAAEAAABLAAsAAQAEAAEAAABMAAsAAQAEAAEAAABNAAsAAQAEAAEAAABTAAsAAQAEAAEAAABSAAsAAQAEAAEAAABRAAsAAQAEAAEAAABQAAsAAQAEAAEAAABPAAsAAQAEAAEAAABOAAsAAQAEAAEAAABNAAwAAQAEAAEAAABLAA0AAQAEAAEAAABNAA0AAQAEAAEAAABNAA8AAQAEAAEAAABNABAAAQAEAAEAAABMAA8AAQAEAAEAAABLAA4AAQAEAAEAAABKAA0AAQAEAAEAAABJAAwAAQAEAAEAAABIAAsAAQAEAAEAAABHAAoAAQAEAAEAAABGAAkAAQAEAAEAAABFAAgAAQAEAAEAAABEAAcAAQAEAAEAAABDAAYAAQAEAAEAAABCAAUAAQAEAAEAAABBAAQAAQAEAAEAAABAAAMAAQAEAAEAAAA/AAIAAQAEAAEAAAA+AAEAAQADAAEAAABNABEAAQAEAAEAAABMABAAAQAEAAEAAABLAA8AAQAEAAEAAABKAA4AAQAEAAEAAABJAA0AAQAEAAEAAABIAAwAAQAEAAEAAABHAAsAAQAEAAEAAABGAAoAAQAEAAEAAABFAAkAAQAEAAEAAABEAAgAAQAEAAEAAABDAAcAAQAEAAEAAABCAAYAAQAEAAEAAABBAAUAAQAEAAEAAABAAAQAAQAEAAEAAAA/AAMAAQAEAAEAAAA+AAIAAQADAAEAAABTAAwAAQAEAAEAAABUAAsAAQAEAAEAAABYAAcAAQAEAAEAAABZAAYAAQAEAAEAAABaAAUAAQAEAAEAAABbAAQAAQAEAAEAAABcAAMAAQAEAAEAAABdAAIAAQAEAAEAAABeAAEAAQAFAAEAAABNABIAAQAEAAEAAABMABEAAQAEAAEAAABLABAAAQAEAAEAAABKAA8AAQAEAAEAAABJAA4AAQAEAAEAAABIAA0AAQAEAAEAAABHAAwAAQAEAAEAAABGAAsAAQAEAAEAAABFAAoAAQAEAAEAAABEAAkAAQAEAAEAAABDAAgAAQAEAAEAAABCAAcAAQAEAAEAAABBAAYAAQAEAAEAAABAAAUAAQAEAAEAAAA/AAQAAQAEAAEAAAA+AAMAAQADAAEAAABOABIAAQAEAAEAAABTAA0AAQAEAAEAAABUAAwAAQAEAAEAAABVAAsAAQAEAAEAAABYAAgAAQAEAAEAAABZAAcAAQAEAAEAAABaAAYAAQAEAAEAAABbAAUAAQAEAAEAAABcAAQAAQAEAAEAAABdAAMAAQAEAAEAAABeAAIAAQAFAAEAAABNABMAAQAEAAEAAABMABIAAQAEAAEAAABLABEAAQAEAAEAAABKABAAAQAEAAEAAABJAA8AAQAEAAEAAABIAA4AAQAEAAEAAABHAA0AAQAEAAEAAABGAAwAAQAEAAEAAABFAAsAAQAEAAEAAABEAAoAAQAEAAEAAABDAAkAAQAEAAEAAABCAAgAAQAEAAEAAABBAAcAAQAEAAEAAABAAAYAAQAEAAEAAAA/AAUAAQAEAAEAAAA+AAQAAQADAAEAAABOABMAAQAEAAEAAABPABIAAQAEAAEAAABTAA4AAQAEAAEAAABUAA0AAQAEAAEAAABVAAwAAQAEAAEAAABWAAsAAQAEAAEAAABYAAkAAQAEAAEAAABZAAgAAQAEAAEAAABaAAcAAQAEAAEAAABbAAYAAQAEAAEAAABcAAUAAQAEAAEAAABdAAQAAQAEAAEAAABeAAMAAQAFAAEAAABNABQAAQAEAAEAAABMABMAAQAEAAEAAABLABIAAQAEAAEAAABKABEAAQAEAAEAAABJABAAAQAEAAEAAABIAA8AAQAEAAEAAABHAA4AAQAEAAEAAABGAA0AAQAEAAEAAABFAAwAAQAEAAEAAABEAAsAAQAEAAEAAABDAAoAAQAEAAEAAABCAAkAAQAEAAEAAABBAAgAAQAEAAEAAABAAAcAAQAEAAEAAAA/AAYAAQAEAAEAAAA+AAUAAQADAAEAAABOABQAAQAEAAEAAABPABMAAQAEAAEAAABQABIAAQAEAAEAAABRABEAAQAEAAEAAABTAA8AAQAEAAEAAABUAA4AAQAEAAEAAABVAA0AAQAEAAEAAABWAAwAAQAEAAEAAABXAAsAAQAEAAEAAABYAAoAAQAEAAEAAABZAAkAAQAEAAEAAABaAAgAAQAEAAEAAABbAAcAAQAEAAEAAABcAAYAAQAEAAEAAABdAAUAAQAEAAEAAABeAAQAAQAFAAEAAABNABUAAQADAAIAAABMABQAAQADAAIAAABLABMAAQADAAIAAABKABIAAQADAAIAAABJABEAAQADAAIAAABIABAAAQADAAIAAABHAA8AAQADAAIAAABGAA4AAQADAAIAAABFAA0AAQADAAIAAABEAAwAAQADAAIAAABDAAsAAQADAAIAAABCAAoAAQADAAIAAABBAAkAAQADAAIAAABAAAgAAQADAAIAAAA/AAcAAQADAAIAAAA+AAYAAQADAAIAAABOABUAAQAFAAIAAABPABQAAQAFAAIAAABQABMAAQAFAAIAAABRABIAAQAFAAIAAABSABEAAQAFAAIAAABTABAAAQAFAAIAAABUAA8AAQAFAAIAAABVAA4AAQAFAAIAAABWAA0AAQAFAAIAAABXAAwAAQAFAAIAAABYAAsAAQAFAAIAAABZAAoAAQAFAAIAAABaAAkAAQAFAAIAAABbAAgAAQAFAAIAAABcAAcAAQAFAAIAAABdAAYAAQAFAAIAAABeAAUAAQAFAAIAAABNAAYAAQAEAAEAAABNAAcAAQAEAAEAAABKAAoAAgAEAAEAAABOABEAAQAEAAEAAABPABEAAQAEAAEAAABQABEAAQAEAAEAAABOABAAAQAEAAEAAABPABAAAQAEAAEAAABQABAAAQAEAAEAAABRABAAAQAEAAEAAABSABAAAQAEAAEAAAA=") +tile_set = SubResource("TileSet_j5wjh") +metadata/_is_ez_tiles_generated = true + +[node name="Coin" parent="." unique_id=1198916388 instance=ExtResource("6_ryrav")] +position = Vector2(1, -61) + +[node name="Coin2" parent="." unique_id=792955553 instance=ExtResource("6_ryrav")] +position = Vector2(608, -160) + +[node name="Coin3" parent="." unique_id=1551367866 instance=ExtResource("6_ryrav")] +position = Vector2(672, -224) + +[node name="Coin4" parent="." unique_id=1762745022 instance=ExtResource("6_ryrav")] +position = Vector2(736, -296) + +[node name="Coin5" parent="." unique_id=1353750555 instance=ExtResource("6_ryrav")] +position = Vector2(800, -352) + +[node name="Coin6" parent="." unique_id=1727849148 instance=ExtResource("6_ryrav")] +position = Vector2(1376, -160) + +[node name="Coin7" parent="." unique_id=1297199083 instance=ExtResource("6_ryrav")] +position = Vector2(2144, -352) + +[node name="Coin8" parent="." unique_id=1299498120 instance=ExtResource("6_ryrav")] +position = Vector2(4776, 792) + +[node name="Coin9" parent="." unique_id=1541600136 instance=ExtResource("6_ryrav")] +position = Vector2(5152, 864) diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..c6bbb7d --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..7ead1e5 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cd5gewbyasj7t" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..d80d19e --- /dev/null +++ b/project.godot @@ -0,0 +1,29 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="LeoGame" +run/main_scene="uid://dnqvtckxgbhqv" +config/features=PackedStringArray("4.6", "Forward Plus") +config/icon="res://icon.svg" + +[editor_plugins] + +enabled=PackedStringArray("res://addons/ez_tiles/plugin.cfg") + +[physics] + +3d/physics_engine="Jolt Physics" + +[rendering] + +textures/canvas_textures/default_texture_filter=0 +rendering_device/driver.windows="d3d12" diff --git a/sprites/coin/MonedaD.png b/sprites/coin/MonedaD.png new file mode 100644 index 0000000..0f1067c Binary files /dev/null and b/sprites/coin/MonedaD.png differ diff --git a/sprites/coin/MonedaD.png.import b/sprites/coin/MonedaD.png.import new file mode 100644 index 0000000..765fd58 --- /dev/null +++ b/sprites/coin/MonedaD.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7kuxextst4j0" +path="res://.godot/imported/MonedaD.png-7fa191ba4058d1ce666deee98c6438ab.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/MonedaD.png" +dest_files=["res://.godot/imported/MonedaD.png-7fa191ba4058d1ce666deee98c6438ab.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/MonedaP.png b/sprites/coin/MonedaP.png new file mode 100644 index 0000000..2d6dc2b Binary files /dev/null and b/sprites/coin/MonedaP.png differ diff --git a/sprites/coin/MonedaP.png.import b/sprites/coin/MonedaP.png.import new file mode 100644 index 0000000..1f02699 --- /dev/null +++ b/sprites/coin/MonedaP.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwye2r1dj4sq" +path="res://.godot/imported/MonedaP.png-108c922c1b6c9fedcf7da4f30c1a930e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/MonedaP.png" +dest_files=["res://.godot/imported/MonedaP.png-108c922c1b6c9fedcf7da4f30c1a930e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/MonedaR.png b/sprites/coin/MonedaR.png new file mode 100644 index 0000000..e09add0 Binary files /dev/null and b/sprites/coin/MonedaR.png differ diff --git a/sprites/coin/MonedaR.png.import b/sprites/coin/MonedaR.png.import new file mode 100644 index 0000000..7d29e15 --- /dev/null +++ b/sprites/coin/MonedaR.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://30fdxc615oow" +path="res://.godot/imported/MonedaR.png-a99fdad1d1f73ea87baedcb3a4b4d2f9.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/MonedaR.png" +dest_files=["res://.godot/imported/MonedaR.png-a99fdad1d1f73ea87baedcb3a4b4d2f9.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/spr_coin_ama.png b/sprites/coin/spr_coin_ama.png new file mode 100644 index 0000000..51a5f56 Binary files /dev/null and b/sprites/coin/spr_coin_ama.png differ diff --git a/sprites/coin/spr_coin_ama.png.import b/sprites/coin/spr_coin_ama.png.import new file mode 100644 index 0000000..ca54e59 --- /dev/null +++ b/sprites/coin/spr_coin_ama.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbs47tjfyjmxp" +path="res://.godot/imported/spr_coin_ama.png-2119c57d896ff3953f7560a93dfc61d4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/spr_coin_ama.png" +dest_files=["res://.godot/imported/spr_coin_ama.png-2119c57d896ff3953f7560a93dfc61d4.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/spr_coin_azu.png b/sprites/coin/spr_coin_azu.png new file mode 100644 index 0000000..60ee2b1 Binary files /dev/null and b/sprites/coin/spr_coin_azu.png differ diff --git a/sprites/coin/spr_coin_azu.png.import b/sprites/coin/spr_coin_azu.png.import new file mode 100644 index 0000000..ab68da1 --- /dev/null +++ b/sprites/coin/spr_coin_azu.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dq0o6yiev06eb" +path="res://.godot/imported/spr_coin_azu.png-2bbe09085b0de5f5e3954dfa9d13cafa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/spr_coin_azu.png" +dest_files=["res://.godot/imported/spr_coin_azu.png-2bbe09085b0de5f5e3954dfa9d13cafa.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/spr_coin_gri.png b/sprites/coin/spr_coin_gri.png new file mode 100644 index 0000000..99da544 Binary files /dev/null and b/sprites/coin/spr_coin_gri.png differ diff --git a/sprites/coin/spr_coin_gri.png.import b/sprites/coin/spr_coin_gri.png.import new file mode 100644 index 0000000..db671d6 --- /dev/null +++ b/sprites/coin/spr_coin_gri.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bcpog6vos0vlq" +path="res://.godot/imported/spr_coin_gri.png-e31cc7d87ebac04348731d9466bd02a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/spr_coin_gri.png" +dest_files=["res://.godot/imported/spr_coin_gri.png-e31cc7d87ebac04348731d9466bd02a5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/spr_coin_roj.png b/sprites/coin/spr_coin_roj.png new file mode 100644 index 0000000..d63752c Binary files /dev/null and b/sprites/coin/spr_coin_roj.png differ diff --git a/sprites/coin/spr_coin_roj.png.import b/sprites/coin/spr_coin_roj.png.import new file mode 100644 index 0000000..fb3d5f0 --- /dev/null +++ b/sprites/coin/spr_coin_roj.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://by2kf74613awk" +path="res://.godot/imported/spr_coin_roj.png-a05733e4d9da1698145dafad26875969.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/spr_coin_roj.png" +dest_files=["res://.godot/imported/spr_coin_roj.png-a05733e4d9da1698145dafad26875969.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/coin/spr_coin_strip4.png b/sprites/coin/spr_coin_strip4.png new file mode 100644 index 0000000..a4da579 Binary files /dev/null and b/sprites/coin/spr_coin_strip4.png differ diff --git a/sprites/coin/spr_coin_strip4.png.import b/sprites/coin/spr_coin_strip4.png.import new file mode 100644 index 0000000..eb2932d --- /dev/null +++ b/sprites/coin/spr_coin_strip4.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7xct20elgad7" +path="res://.godot/imported/spr_coin_strip4.png-1e92f869070cd636001b8a7c5a5c5d2f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/coin/spr_coin_strip4.png" +dest_files=["res://.godot/imported/spr_coin_strip4.png-1e92f869070cd636001b8a7c5a5c5d2f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/dino/DinoSprites - doux.png b/sprites/dino/DinoSprites - doux.png new file mode 100644 index 0000000..8fb8734 Binary files /dev/null and b/sprites/dino/DinoSprites - doux.png differ diff --git a/sprites/dino/DinoSprites - doux.png.import b/sprites/dino/DinoSprites - doux.png.import new file mode 100644 index 0000000..ed63262 --- /dev/null +++ b/sprites/dino/DinoSprites - doux.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dw64sm6hvikka" +path="res://.godot/imported/DinoSprites - doux.png-d51036e5161b6cff627ade033fad6f3e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/dino/DinoSprites - doux.png" +dest_files=["res://.godot/imported/DinoSprites - doux.png-d51036e5161b6cff627ade033fad6f3e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/dino/DinoSprites - mort.png b/sprites/dino/DinoSprites - mort.png new file mode 100644 index 0000000..9089923 Binary files /dev/null and b/sprites/dino/DinoSprites - mort.png differ diff --git a/sprites/dino/DinoSprites - mort.png.import b/sprites/dino/DinoSprites - mort.png.import new file mode 100644 index 0000000..3f703fd --- /dev/null +++ b/sprites/dino/DinoSprites - mort.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfqwenf33w7t0" +path="res://.godot/imported/DinoSprites - mort.png-0e66ed977e10918ef3cca5e2d8c8d8b3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/dino/DinoSprites - mort.png" +dest_files=["res://.godot/imported/DinoSprites - mort.png-0e66ed977e10918ef3cca5e2d8c8d8b3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/dino/DinoSprites - tard.png b/sprites/dino/DinoSprites - tard.png new file mode 100644 index 0000000..c99f59e Binary files /dev/null and b/sprites/dino/DinoSprites - tard.png differ diff --git a/sprites/dino/DinoSprites - tard.png.import b/sprites/dino/DinoSprites - tard.png.import new file mode 100644 index 0000000..b026f27 --- /dev/null +++ b/sprites/dino/DinoSprites - tard.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbe3fmpak1agv" +path="res://.godot/imported/DinoSprites - tard.png-4ef735ebe477308e6d9e4e91ab9ce500.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/dino/DinoSprites - tard.png" +dest_files=["res://.godot/imported/DinoSprites - tard.png-4ef735ebe477308e6d9e4e91ab9ce500.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/sprites/dino/DinoSprites - vita.png b/sprites/dino/DinoSprites - vita.png new file mode 100644 index 0000000..1ee6744 Binary files /dev/null and b/sprites/dino/DinoSprites - vita.png differ diff --git a/sprites/dino/DinoSprites - vita.png.import b/sprites/dino/DinoSprites - vita.png.import new file mode 100644 index 0000000..c2b52ba --- /dev/null +++ b/sprites/dino/DinoSprites - vita.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnfmpot7qh8wu" +path="res://.godot/imported/DinoSprites - vita.png-4c4596cbc96a240c1c95612bc8b4e2ba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/dino/DinoSprites - vita.png" +dest_files=["res://.godot/imported/DinoSprites - vita.png-4c4596cbc96a240c1c95612bc8b4e2ba.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1