This commit is contained in:
2026-05-17 11:28:40 +02:00
commit daa66d5b54
195 changed files with 9284 additions and 0 deletions

View File

@@ -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()

View File

@@ -0,0 +1 @@
uid://b87n11kajm34

View File

@@ -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"]

View File

@@ -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

View File

@@ -0,0 +1 @@
uid://dap4bbli16fp6

View File

@@ -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"]

View File

@@ -0,0 +1,5 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://dtpx52d0n4ff1"]
[resource]
resource_local_to_scene = false
allow_unpress = true

View File

@@ -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

View File

@@ -0,0 +1 @@
uid://6bvphp60kmbq

View File

@@ -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"]

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="16"
height="16"
viewBox="0 0 4.2333332 4.2333333"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="Circle.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="25.228956"
inkscape:cx="3.3691445"
inkscape:cy="9.5525157"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="0.26458332"
spacingy="0.26458333"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="4"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<circle
style="fill:#e0e0e0;stroke-width:2.80458;stroke-linecap:square;stroke-miterlimit:80;stroke-dashoffset:127.298;paint-order:markers fill stroke"
id="path1"
cx="2.1105669"
cy="2.1000795"
r="1.591446" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -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

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="Connect1.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="34.4375"
inkscape:cx="15.288566"
inkscape:cy="12.950998"
inkscape:current-layer="svg1"
showguides="true">
<sodipodi:guide
position="-0.33879526,12.488849"
orientation="0,-1"
id="guide2"
inkscape:locked="false" />
<sodipodi:guide
position="10.250454,9.8439201"
orientation="0,-1"
id="guide3"
inkscape:locked="false" />
<sodipodi:guide
position="5.1107078,16.232305"
orientation="1,0"
id="guide4"
inkscape:locked="false" />
<sodipodi:guide
position="7.3610971,9.2856939"
orientation="1,0"
id="guide5"
inkscape:locked="false" />
<sodipodi:guide
position="9.6696915,6.6206897"
orientation="0,-1"
id="guide6"
inkscape:locked="false" />
<sodipodi:guide
position="10.163339,4.3266788"
orientation="0,-1"
id="guide7"
inkscape:locked="false" />
<sodipodi:guide
position="10.584392,9.9600726"
orientation="1,0"
id="guide8"
inkscape:locked="false" />
<sodipodi:guide
position="11.949183,2.4246824"
orientation="0,-1"
id="guide9"
inkscape:locked="false" />
</sodipodi:namedview>
<path
id="path1"
style="fill:#e0e0e0;fill-opacity:1;stroke-width:3.46966"
d="M 7.4320342,0.18238402 C 5.7415205,0.18242166 3.1472107,1.940753 3.1472107,4.1263644 V 7.1847778 H 0.03947243 v 2.286455 H 3.1472107 v 2.5455882 c 0,2.18561 2.5943098,3.946477 4.2848235,3.946477 h 0.8366325 v -2.328946 l -1.9199791,-0.01748 0.024962,-4.05828 1.8825363,0.01747 0.012486,-2.5410661 -1.9099943,-0.005 0.012486,-3.8696751 1.9099944,0.019969 -0.012486,-2.99792441 z m 2.9251338,0.0748859 -0.01748,2.94051208 -1.6694318,0.037443 0.005,3.8122627 1.6918988,-0.017473 V 10.002839 L 8.6827446,9.98287 l 0.005,3.626522 1.6519594,-0.03994 v 2.468732 c 1.539424,0.241385 2.733117,-0.774398 2.733117,-3.943981 V 9.7103828 h 2.887466 V 7.2596635 H 13.072812 V 4.2037463 c 0,-3.91742421 -0.689574,-3.97068131 -2.715644,-3.94647638 z"
sodipodi:nodetypes="ssccccssccccccccccsccccccccccsccccsc" />
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -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

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="Connect2.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="24.35099"
inkscape:cx="8.2132185"
inkscape:cy="-0.28746265"
inkscape:current-layer="svg1"
showguides="true">
<sodipodi:guide
position="-0.33879526,12.488849"
orientation="0,-1"
id="guide2"
inkscape:locked="false" />
<sodipodi:guide
position="10.250454,9.8439201"
orientation="0,-1"
id="guide3"
inkscape:locked="false" />
<sodipodi:guide
position="5.1107078,16.232305"
orientation="1,0"
id="guide4"
inkscape:locked="false" />
<sodipodi:guide
position="7.3610971,9.2856939"
orientation="1,0"
id="guide5"
inkscape:locked="false" />
<sodipodi:guide
position="9.6696915,6.6206897"
orientation="0,-1"
id="guide6"
inkscape:locked="false" />
<sodipodi:guide
position="10.163339,4.3266788"
orientation="0,-1"
id="guide7"
inkscape:locked="false" />
<sodipodi:guide
position="10.584392,9.9600726"
orientation="1,0"
id="guide8"
inkscape:locked="false" />
<sodipodi:guide
position="11.949183,2.4246824"
orientation="0,-1"
id="guide9"
inkscape:locked="false" />
</sodipodi:namedview>
<path
id="path1"
style="fill:#e0e0e0;fill-opacity:1;stroke-width:3.47802"
d="M 7.5715605,0.06207122 C 5.8770753,0.08041901 4.5113688,1.8246744 4.5113688,4.0155486 V 7.0813268 H 0.85565317 v 2.7447754 c 0.59043283,-0.3140696 2.43714373,0 3.65571563,0 v 2.0989038 c 0,2.190872 1.3656073,4.02832 3.0601917,4.02832 h 1.0111382 l 0.8154684,-2.406894 -2.9125619,-0.01751 0.025022,-3.6152385 2.875029,0.017516 0.012517,-3 -2.902553,-0.00501 0.012517,-3.8789934 2.9025532,0.020018 L 8.786571,0.0489152 Z m 1.2234334,0.0049452 c -0.076304,0.0029338 -0.1565114,0.0085964 -0.2377092,0.01751557 l 0.074557,2.89498191 -2.3262459,-0.015078 0.05762,3.9792753 2.2369682,0.041672 v 2.9207951 l -2.2294617,-0.020017 0.00501,3.6352537 2.354765,0.117801 -0.1578331,2.316838 c 2.2327058,0 2.6723538,-2.071122 2.6723538,-3.953478 V 9.9011681 H 14.90073 V 7.1563927 H 11.245003 V 4.0931168 c 0,-1.3484853 -0.0845,-4.11711155 -2.4500091,-4.02610568 z"
sodipodi:nodetypes="ssccccssccccccccccssccccccccccsccccss" />
<path
id="path9"
style="fill:#e0e0e0;fill-opacity:1;stroke-width:3.47802"
d="M 7.5715605,0.06207122 C 5.8770753,0.08041901 4.5113688,1.8246744 4.5113688,4.0155486 V 7.0813268 H 0.85565317 v 2.7447754 c 0.59043283,-0.3140696 2.43714373,0 3.65571563,0 v 2.0989038 c 0,2.190872 1.3656073,4.02832 3.0601917,4.02832 h 1.0111382 l 0.8154684,-2.406894 -2.9125619,-0.01751 0.025022,-3.6152385 2.875029,0.017516 0.012517,-3 -2.902553,-0.00501 0.012517,-3.8789934 2.9025532,0.020018 L 8.786571,0.0489152 Z m 1.2234334,0.0049452 c -0.076304,0.0029338 -0.1565114,0.0085964 -0.2377092,0.01751557 l 0.074557,2.89498191 -2.3262459,-0.015078 0.05762,3.9792753 2.2369682,0.041672 v 2.9207951 l -2.2294617,-0.020017 0.00501,3.6352537 2.354765,0.117801 -0.1578331,2.316838 c 2.2327058,0 2.6723538,-2.071122 2.6723538,-3.953478 V 9.9011681 H 14.90073 V 7.1563927 H 11.245003 V 4.0931168 c 0,-1.3484853 -0.0845,-4.11711155 -2.4500091,-4.02610568 z"
sodipodi:nodetypes="ssccccssccccccccccssccccccccccsccccss" />
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="m7 1c-.554 0-1 .446-1 1v2h4v-2c0-.554-.446-1-1-1zm-1 4v7l2 3 2-3v-7zm1 1h1v5h-1z"/></svg>

After

Width:  |  Height:  |  Size: 176 B

View File

@@ -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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="M10 1.5.5 11 4 14.5h4L15.5 7Zm-4.5 7 3 3-1 1h-3L3 11Z"/></svg>

After

Width:  |  Height:  |  Size: 149 B

View File

@@ -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

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="HillB.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.753649"
inkscape:cy="9.4390152"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="7.9969434,11.90976"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="M 5.9243978,11.984778 10.675649,12 14,4.0372167 H 2 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -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

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="HillL.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="13.484375"
inkscape:cx="0.22247972"
inkscape:cy="15.351101"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="7.9969434,11.90976"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="m 4.0338356,5.9430007 -0.015222,4.7512513 7.9627834,3.324351 V 2.0186029 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -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

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="HillR.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="13.484375"
inkscape:cx="0.22247972"
inkscape:cy="15.351101"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="7.9969434,11.90976"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="m 11.966175,5.9430007 0.01522,4.7512513 -7.9627832,3.324351 V 2.0186029 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -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

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="HillT.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.7798685"
inkscape:cy="9.4521249"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="7.9969434,11.90976"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="M 5.9243978,4.052439 10.675649,4.0372165 14,12 H 2 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -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

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="Island.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="11.74633"
inkscape:cy="9.6618808"
inkscape:current-layer="svg1">
<sodipodi:guide
position="8.4727694,8.00927"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="7.99073,14.553882"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
</sodipodi:namedview>
<path
id="path1"
style="fill:none;stroke:#e0e0e0;stroke-width:2.31574;stroke-linecap:square;stroke-miterlimit:80;stroke-dashoffset:127.298;paint-order:markers fill stroke"
transform="matrix(0.8559562,0.10240944,-0.10202128,0.85921285,2.0186786,0.59508019)"
d="M 9.659011,1.7575128 13.96836,6.881018 11.24657,13.270319 6.430428,13.844888 2.282291,8.2749484 5.0542887,2.3068837 Z"
sodipodi:nodetypes="ccccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="2" d="M2 4h12v8H2z"/></svg>

After

Width:  |  Height:  |  Size: 163 B

View File

@@ -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

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="RectangleSoft.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="40.747028"
inkscape:cx="8.2091876"
inkscape:cy="7.4974793"
inkscape:current-layer="svg1">
<sodipodi:guide
position="-0.19088937,13.015184"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
<sodipodi:guide
position="1.0065076,11.644252"
orientation="1,0"
id="guide2"
inkscape:locked="false" />
<sodipodi:guide
position="0.34707158,3.0021692"
orientation="0,-1"
id="guide3"
inkscape:locked="false" />
<sodipodi:guide
position="14.976139,6.021692"
orientation="1,0"
id="guide4"
inkscape:locked="false" />
<sodipodi:guide
position="5.4663774,9.4750542"
orientation="0,-1"
id="guide5"
inkscape:locked="false" />
<sodipodi:guide
position="4.5986985,12.321041"
orientation="1,0"
id="guide6"
inkscape:locked="false" />
<sodipodi:guide
position="11.436009,11.470716"
orientation="1,0"
id="guide7"
inkscape:locked="false" />
<sodipodi:guide
position="5.1193059,6.3687636"
orientation="0,-1"
id="guide8"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="M 2,6.0997831 C 1.8923365,4.3158534 2.7512646,4.0459329 4.1995661,4 H 11.91757 c 1.555045,0.1021848 2.156248,0.5727467 2.099784,2.0911063 l -0.01468,3.9215987 c 0.122882,1.801006 -0.959058,1.9707 -2.189228,1.969941 H 4.2906695 C 2.1876324,11.691273 2.2268981,10.921985 2,10.047722 Z"
id="path1"
sodipodi:nodetypes="ccccccccc" />
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#e0e0e0" d="m5 1v1h-4v2h14v-2h-4v-1zm-3 4v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-8zm1 2h2v6h-2zm4 0h2v6h-2zm4 0h2v6h-2z"/></svg>

After

Width:  |  Height:  |  Size: 197 B

View File

@@ -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

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="SlopeBL.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.7798685"
inkscape:cy="9.4390152"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="m 11.43049,11.984778 2.627473,0.01522 L 14,3.9847751 H 2 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="SlopeBR.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.7798685"
inkscape:cy="9.4390152"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="m 4.6276446,11.984778 -2.627473,0.01522 0.057963,-8.0152229 H 14.058135 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="SlopeTL.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.7798685"
inkscape:cy="9.4521249"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="M 11.43049,4 14.057963,3.9847775 14,12 H 2 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="SlopeTR.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showguides="true"
inkscape:zoom="38.139572"
inkscape:cx="9.7798685"
inkscape:cy="9.4390152"
inkscape:current-layer="svg1">
<sodipodi:guide
position="15.181083,13.010979"
orientation="0,-1"
id="guide1"
inkscape:locked="false" />
</sodipodi:namedview>
<path
fill="none"
stroke="#e0e0e0"
stroke-linejoin="round"
stroke-width="2"
d="M 4.6276446,4 2.0001716,3.9847775 2.0581346,12 H 14.058135 Z"
id="path1"
sodipodi:nodetypes="ccccc" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="32"
height="32"
viewBox="0 0 16 16"
version="1.1"
id="svg1"
sodipodi:docname="SnapShot.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="18.517494"
inkscape:cx="-16.63292"
inkscape:cy="15.201841"
inkscape:current-layer="svg1" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:1.17306;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:3.51916, 3.51916;stroke-dashoffset:2.46341;stroke-opacity:1;paint-order:markers fill stroke"
id="rect1"
width="13.990795"
height="13.075043"
x="0.97073251"
y="1.4364753" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:0.946229;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="rect2"
width="8.6806965"
height="6.2304521"
x="3.3668046"
y="4.9502149" />
<rect
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.946229;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="rect3"
width="2.4080024"
height="0.34870094"
x="9.0129156"
y="3.5383849" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.18858;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="path3"
cx="7.9069872"
cy="7.9159474"
rx="1.4778301"
ry="1.520666" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -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

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
viewBox="0 0 8 8"
version="1.1"
id="svg1"
sodipodi:docname="SnapShotSmall.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="18.517494"
inkscape:cx="-16.63292"
inkscape:cy="15.201841"
inkscape:current-layer="svg1" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:0.613207;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:1.83961, 1.83961;stroke-dashoffset:1.28772;stroke-opacity:1;paint-order:markers fill stroke"
id="rect1"
width="7.3135638"
height="6.8348627"
x="0.31278491"
y="0.5355143" />
<rect
style="fill:none;stroke:#ffffff;stroke-width:0.5;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="rect2"
width="4.5377569"
height="3.2569134"
x="1.5653104"
y="2.3722904" />
<rect
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:0.5;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="rect3"
width="1.2587619"
height="0.18228032"
x="4.5167646"
y="1.6342689" />
<ellipse
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1.6668;stroke-linecap:square;stroke-miterlimit:80;stroke-dasharray:none;stroke-dashoffset:127.298;stroke-opacity:1;paint-order:markers fill stroke"
id="path3"
cx="3.9386501"
cy="3.922601"
rx="0.77252257"
ry="0.79491466" />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -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

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="16"
height="16"
viewBox="0 0 4.2333332 4.2333333"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="Square.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="50.457912"
inkscape:cx="5.4302683"
inkscape:cy="9.483151"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="0.26458332"
spacingy="0.26458333"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="4"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#e0e0e0;stroke-width:2.82349;stroke-linecap:square;stroke-miterlimit:80;stroke-dashoffset:127.298;paint-order:markers fill stroke"
id="rect1"
width="3.084903"
height="3.1416833"
x="0.51167864"
y="0.53647017" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -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

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg1"
sodipodi:docname="Stamp.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs1" />
<sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
inkscape:zoom="24.35099"
inkscape:cx="5.5233894"
inkscape:cy="8.6444125"
inkscape:current-layer="svg1" />
<path
fill="#e0e0e0"
d="m 5.8807939,11.210126 c -1.1740403,0 -2.1192062,0.731062 -2.1192062,1.639153 v 0.978986 h 8.4768243 v -0.978986 c 0,-0.908091 -0.945164,-1.639153 -2.119206,-1.639153 z M 6.6538619,1.4888062 V 11.296399 H 8.7307608 V 1.4888062 Z"
id="path1"
sodipodi:nodetypes="ssccsssccccc"
style="fill:#e0e0e0;fill-opacity:1;stroke-width:1.86379" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 16 16"><g fill="#e0e0e0"><circle cx="8" cy="8" r="2"/><path d="M7 3.5H6L8 1l2 2.5H9v2H7zM3.56 4.975l-.706.707L2.5 2.5l3.182.353-.707.708.707.707-1.414 1.414zm7.465-1.415-.707-.706L13.5 2.5l-.353 3.182-.708-.707-.707.707-1.414-1.414zm1.415 7.465.706-.707.354 3.182-3.182-.354.707-.707-.707-.707 1.414-1.414zM4.975 12.44l.707.707L2.5 13.5l.354-3.182.707.707.707-.707 1.414 1.414zM12.5 7V6L15 8l-2.5 2V9h-2V7zM9 12.5h1L8 15l-2-2.5h1v-2h2zM3.5 9v1L1 8l2.5-2v1h2v2z"/></g></svg>

After

Width:  |  Height:  |  Size: 549 B

View File

@@ -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

View File

@@ -0,0 +1,7 @@
[plugin]
name="EZ Tiles Draw"
description=""
author=""
version=""
script="ez_tiles_draw.gd"

View File

@@ -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)

View File

@@ -0,0 +1 @@
uid://cu5gallcaxllu

View File

@@ -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"]

View File

@@ -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()

View File

@@ -0,0 +1 @@
uid://bspv17eu4gm0k

Binary file not shown.

View File

@@ -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"]

Binary file not shown.

Binary file not shown.

View File

@@ -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()

View File

@@ -0,0 +1 @@
uid://b0j87ylb537s0

View File

@@ -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"]

View File

@@ -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

View File

@@ -0,0 +1,5 @@
[gd_resource type="ButtonGroup" format=3 uid="uid://j3ffo1rd1gce"]
[resource]
resource_local_to_scene = false
allow_unpress = true

View File

@@ -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)

View File

@@ -0,0 +1 @@
uid://b5483bu7juaph

View File

@@ -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"]

View File

@@ -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

View File

@@ -0,0 +1 @@
uid://by7i58quit85g

View File

@@ -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"]