diff --git a/addons/tileset_from_image/plugin.cfg b/addons/tileset_from_image/plugin.cfg new file mode 100644 index 000000000..a9ad31640 --- /dev/null +++ b/addons/tileset_from_image/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Terrain Skin from Template Image" +description="Automatically creates terrain skins from multi-texture template images." +author="Redux Team" +version="0.0.1" +script="plugin.gd" diff --git a/addons/tileset_from_image/plugin.gd b/addons/tileset_from_image/plugin.gd new file mode 100644 index 000000000..b59ea9988 --- /dev/null +++ b/addons/tileset_from_image/plugin.gd @@ -0,0 +1,15 @@ +@tool +extends EditorPlugin + +# Declared here so it can be cleaned up in _exit_tree(). +var plugin + + +func _enter_tree(): + # Load and instantiate the actual script. + plugin = preload("res://addons/tileset_from_image/tileset_from_image.gd").new() + add_import_plugin(plugin) + + +func _exit_tree(): + remove_import_plugin(plugin) diff --git a/addons/tileset_from_image/tileset_from_image.gd b/addons/tileset_from_image/tileset_from_image.gd new file mode 100644 index 000000000..e01e5a6dd --- /dev/null +++ b/addons/tileset_from_image/tileset_from_image.gd @@ -0,0 +1,242 @@ +@tool +extends EditorImportPlugin + +enum Presets { + ## The format originally designed for the Tiny Demo. + FORMAT_V1 +} + + +## Returns the number of presets. +func _get_preset_count(): + return Presets.size() + + +## Returns the user-facing names of the indexed preset. +func _get_preset_name(preset_index): + match preset_index: + Presets.FORMAT_V1: + return "Tiny Demo-era" + _: + return "Unknown" + + +## Returns the actual parameters of the indexed preset. +func _get_import_options(path, preset_index): + match preset_index: + Presets.FORMAT_V1: + return [ + { + "name": "external_textures", + "default_value": false + }, + { + "name": "Texture Rects", + "default_value": null, + "usage": PROPERTY_USAGE_GROUP, + }, + { + "name": "body", + "default_value": Rect2(36, 3, 32, 32) + }, + { + "name": "top", + "default_value": Rect2(105, 3, 32, 32) + }, + { + "name": "top_endcap", + "default_value": Rect2(72, 3, 32, 32) + }, + { + "name": "top_clip", + "default_value": Rect2(105, 36, 32, 32) + }, + { + "name": "top_endcap_clip", + "default_value": Rect2(72, 36, 32, 32) + }, + { + "name": "side", + "default_value": Rect2(3, 3, 32, 32) + }, + { + "name": "bottom", + "default_value": Rect2(36, 36, 32, 32) + }, + + ] + _: # + return [] + + +func _get_importer_name(): + return "63r.terrain_skin" + + +func _get_visible_name(): + return "Terrain Skin Template" + + +func _get_recognized_extensions(): + return ["bmp", "png", "jpg", "jpeg", "tga", "webp"] + + +func _get_save_extension(): + return "res" + + +func _get_resource_type(): + return "Resource" + + +func _get_import_order(): + return 0 + +## Returns true for any option which is visible. +func _get_option_visibility(path, option_name, options): + return true # Stubbed while no options exist. + + +func _import(source_file, save_path, options, r_platform_variants, r_gen_files): + # Open the given file (and error if invalid). + var file := FileAccess.get_file_as_bytes(source_file) + if file == null: + return FileAccess.get_open_error() + + # Load image data from the bytes. + var img := Image.new() + var parse_result + match source_file.get_extension().to_lower() : + "bmp": + parse_result = img.load_bmp_from_buffer(file) + "png": + parse_result = img.load_png_from_buffer(file) + "jpg", "jpeg": + # Not an ideal format, but heck, no reason to prevent it + parse_result = img.load_jpg_from_buffer(file) + "tga": + parse_result = img.load_tga_from_buffer(file) + "webp": # why + parse_result = img.load_webp_from_buffer(file) + _: + parse_result = ERR_INVALID_DATA + # Abort if the load failed. + if parse_result != OK: + return parse_result + + # Create output file. + var out_res := TerrainSkin.new() + + # Get the raw source filename. + var in_extension = source_file.get_extension() + var tex_name = source_file.get_file() + # Remove the extension from the end of name. + tex_name = tex_name.erase( + tex_name.length() - (in_extension.length() + 1), + in_extension.length() + 1 + ) + + out_res.resource_name = tex_name + out_res.resource_path = "%s.%s" % [save_path, _get_save_extension()] + + # Needed when "External Textures" is checked. + var tex_folder: String + var editor_fs: EditorFileSystem + if options["external_textures"]: + # Create a folder to store the separated texture resources. + tex_folder = "%s/%s" % [source_file.get_base_dir(), tex_name] + DirAccess.make_dir_absolute(tex_folder) + + # Get access to the editor filesystem--need this to make the editor + # acknowledge newly created files. + editor_fs = EditorInterface.get_resource_filesystem() + + # Make the editor acknowledge the textures directory. + editor_fs.update_file(tex_folder) + + + # Slice each non-zero-sized texture from the spritesheet. + # (Can't just use atlas textures, they don't loop like we need.) + for tex_type in [ + "body", + "top", "top_clip", + "top_endcap", "top_endcap_clip", + "side", "bottom" + ]: + if options[tex_type].size.x > 0 and options[tex_type].size.y > 0: + var slice = img.get_region(options[tex_type]) + # If the slice has any visible pixels... + if !slice.is_invisible(): + # ...create a texture from it. + var tex = ImageTexture.create_from_image(slice) + + # Name the texture resource. + tex.resource_name = "%s_%s" % [tex_name, tex_type] + + # If we want separate texture files, save those. + if options["external_textures"]: + var tex_path = "%s/%s.png" % \ + [tex_folder, tex_type] + + # If the file's been modified outside the importer, + # do not save over it. + var overwrite_safe := true + if ResourceLoader.exists(tex_path): + var existing = ResourceLoader.load(tex_path) + + # Check when the imported resource was last modified. + # If it exists. Otherwise it's 0. + var last_imp_time = 0 + if FileAccess.file_exists(out_res.resource_path): + last_imp_time = FileAccess.get_modified_time(out_res.resource_path) + + # Check the texture's current modify time. + var modified_time = FileAccess.get_modified_time(tex_path) + + # If the texture's modify time is unset or mismatches + # the resource file, the texture has been modified + # externally and is not safe to replace. + if modified_time == 0 or modified_time != last_imp_time: + overwrite_safe = false + push_warning( + "%s's %s texture appears to have been externally modified. Skipping over it." + % [ + tex_name, tex_type.capitalize() + ] + ) + + # If it's safe to overwrite, save this texture into that folder. + if overwrite_safe: + # Write the texture. + var save_result = ResourceSaver.save(tex, tex_path) + if save_result != OK: + push_error("Failed to write to %s: %s" % [ + tex_path, + error_string(save_result), + ]) + continue + + # Tell the editor this file exists. + editor_fs.update_file(tex_path) + + # Try importing the sliced texture. + var imp_result = append_import_external_resource(tex_path) + # If import failed, report and leave the texture blank. + if imp_result != OK: + push_error("%s's %s texture failed to import: %s" % [ + tex_name, tex_type.capitalize(), + error_string(imp_result) + ]) + continue + + # Register this as one of the generated files. + r_gen_files.push_back(tex_path) + + # Separate or embedded, save it to the resource. + out_res.set(tex_type, tex) + + # If there's different variants of this resource for different platforms, + # push the feature tag to r_platform_variants, then insert the tag between + # save_path and _get_save_extension() (. separated) when saving the files. + + return ResourceSaver.save(out_res) diff --git a/classes/solid/terrain/terrain_border.gd b/classes/solid/terrain/terrain_border.gd index 57a40ffad..d44879fd8 100644 --- a/classes/solid/terrain/terrain_border.gd +++ b/classes/solid/terrain/terrain_border.gd @@ -16,9 +16,9 @@ enum EdgeType { const QUAD_RADIUS = 16 -@onready var root = $".." +@onready var root: TerrainPolygon = $".." @onready var body_polygon: Polygon2D = $"../Body" -@onready var top_edges: TerrainBorderEndcaps = $"../TopEdgeEndcaps" +@onready var endcaps: TerrainBorderEndcaps = $"../TopEdgeEndcaps" func _draw(): @@ -26,20 +26,25 @@ func _draw(): for child in get_children(): child.queue_free() - # Load appearance from the root. - body_polygon.texture = root.body - body_polygon.polygon = root.polygon - body_polygon.color = root.tint_color if root.tint else Color(1, 1, 1) + # Load body appearance from the root, if there's a body texture. + if root.body != null: + body_polygon.visible = true + body_polygon.texture = root.body + body_polygon.polygon = root.polygon + body_polygon.color = root.tint_color if root.tint else Color(1, 1, 1) + # If the root has no body texture, hide the body polygon. + else: + body_polygon.visible = false - # Clear the draw queue for top edges - top_edges.area_queue = [] + # Clear the draw queue for endcaps. + endcaps.area_queue = [] # Draw all terrain polygons. - add_full(root.polygon) - # Queue drawing the top edges. - top_edges.queue_redraw() + draw_all_borders(root.polygon) + # Queue drawing the endcaps. + endcaps.queue_redraw() -func add_full(poly: PackedVector2Array): +func draw_all_borders(poly: PackedVector2Array): # Dictionary of segments which have had their type ID evaluated. # Types are indexed by first vertex: overrides[3] will return the # type ID of segment (3, 4). @@ -60,7 +65,7 @@ func add_full(poly: PackedVector2Array): # Valid chains contain at least 2 vertices. # If the chain is valid, draw it. if list.size() >= 2: - generate_polygons(list, root.edge, 0) + generate_polygons(list, root.side, 0) # Now the bottom as well--same exact deal as the sides. latest_index = 0 @@ -157,7 +162,7 @@ func generate_polygons_top(lines, z_order = 2): # Draw everything # Mark the left-side area for drawing. - top_edges.area_queue.append([true, areas.front()]) + endcaps.area_queue.append([true, areas.front()]) # Draw all areas. for area in areas: @@ -166,18 +171,20 @@ func generate_polygons_top(lines, z_order = 2): 0 if area.type == "quad" or (area.clock_dir == -1 and area.type == "trio") else area.verts.size() - 2) - # Add it as a child. - add_child(poly2d) + # Add it as a child, if its texture exists. + if root.top != null: + add_child(poly2d) - # Make a duplicate polygon to hold the shadow texture. - # TODO: This may be meant to get clipped to within the polygon's body. - if !root.tint: + # Make a duplicate polygon to hold the clip texture, if any. + # This texture is meant to get clipped to within the polygon's body. + # TODO: Is it doing that though? + if !root.tint and root.top_clip != null: var shade = poly2d.duplicate() - shade.texture = root.top_shade + shade.texture = root.top_clip add_child(shade) # Mark the right-side area for drawing. - top_edges.area_queue.append([false, areas.back()]) + endcaps.area_queue.append([false, areas.back()]) func _add_inbetween_segment(areas, start: Vector2, end: Vector2, circumcenter: Vector2): @@ -227,6 +234,10 @@ func _add_inbetween_segment(areas, start: Vector2, end: Vector2, circumcenter: V func generate_polygons(lines: Array, texture: Texture2D, z_order: int): + # If this chain of polygons has no texture set, completely skip it. + if texture == null: + return + var p_len = lines.size() for ind in range(p_len - 1): # First create quads from each line segment. diff --git a/classes/solid/terrain/terrain_border_endcaps.gd b/classes/solid/terrain/terrain_border_endcaps.gd index b650705e6..489b59475 100644 --- a/classes/solid/terrain/terrain_border_endcaps.gd +++ b/classes/solid/terrain/terrain_border_endcaps.gd @@ -17,7 +17,7 @@ const QUAD_SIZE = 32 #2*TerrainBorder.QUAD_RADIUS # type: String = "quad" or "trio" depending on vert count. @export var area_queue: Array -@onready var root = $".." +@onready var root: TerrainPolygon = $".." func _draw(): @@ -105,8 +105,15 @@ func add_cap_segment(is_left, area): ]) var vert_count = cap_verts.size() # TODO: Always == 4 :P + + # Tint the polygon. + # (TODO: Done differently than in terrain_border_endcaps.gd???) + var base_color = Color(1, 1, 1) + if root.tint: + base_color = root.tint_color + var colors = PackedColorArray([base_color, base_color, base_color, base_color]) - # Check if our cap should have a shadow or not + # Check if any point of the cap is inside the polygon. var inside_count = 0 var verts_inside = [] for vert in cap_verts: @@ -115,16 +122,9 @@ func add_cap_segment(is_left, area): verts_inside.append(vert) inside_count += 1 - # Tint the polygon. - # (TODO: Done differently than in pencil.gd???) - var base_color = Color(1, 1, 1) - if root.tint: - base_color = root.tint_color - var colors = PackedColorArray([base_color, base_color, base_color, base_color]) - - # Draw the shadow if there's any point inside the polygon. - if inside_count > 0: - # Is the polygon + # Draw the clip tex (if it exists) if there's any point inside the polygon + if inside_count > 0 and root.top_endcap_clip != null: + # Is any point *outside* the polygon? if inside_count != vert_count: # Clip the box so it fits in the polygon var clip_box = polygon_clip_box(cap_verts, uvs) @@ -132,14 +132,15 @@ func add_cap_segment(is_left, area): var clip_uv = clip_box[1] # VALIDATE: Make sure the cut box is 4 verts if clip_poly.size() == 4: - draw_polygon(clip_poly, colors, clip_uv, root.top_corner_shade) + draw_polygon(clip_poly, colors, clip_uv, root.top_endcap_clip) else: # This should not happen! #print("oh no: ", area.index, ": ", clip_poly.size(), " - ", clip_uv.size()) pass - # If the polygon is fully surrounded, simply draw the shadow. + # If the polygon is fully surrounded, simply draw the texture. else: - draw_polygon(cap_verts, colors, uvs, root.top_corner_shade) + draw_polygon(cap_verts, colors, uvs, root.top_endcap_clip) - # Draw the actual endcap on top of the shadow. - draw_polygon(cap_verts, colors, uvs, root.top_corner) + # Draw the regular endcap on top of the clip texture. + if root.top_endcap != null: + draw_polygon(cap_verts, colors, uvs, root.top_endcap) diff --git a/classes/solid/terrain/terrain_polygon.gd b/classes/solid/terrain/terrain_polygon.gd index f27c6ed9e..a9b34f6bd 100644 --- a/classes/solid/terrain/terrain_polygon.gd +++ b/classes/solid/terrain/terrain_polygon.gd @@ -6,15 +6,7 @@ extends Polygon2D const COLLISION_LAYER_TERRAIN = 1 -@export var texture_spritesheet: Texture2D: set = update_spritesheets - -var body: Texture2D -var top: Texture2D -var top_shade: Texture2D -var top_corner: Texture2D -var top_corner_shade: Texture2D -var edge: Texture2D -var bottom: Texture2D +@export var skin: TerrainSkin: set = reload_tileset @export var up_direction = Vector2(0, -1): set = set_down_direction # TODO: This should always == -up_direction. @@ -33,6 +25,14 @@ var bottom: Texture2D var properties: Dictionary = {} +var body: Texture2D +var top: Texture2D +var top_clip: Texture2D +var top_endcap: Texture2D +var top_endcap_clip: Texture2D +var side: Texture2D +var bottom: Texture2D + @onready var decorations: TerrainBorder = $Borders @onready var collision_body: StaticBody2D = $Static @onready var collision_shape: CollisionPolygon2D = $Static/Collision @@ -64,17 +64,60 @@ func set_null(_new_val): pass -func update_spritesheets(new_sheet: Texture2D): - texture_spritesheet = new_sheet +func reload_tileset(new_ts: TerrainSkin): + # Callback to make the terrain lump update when the skin is modified. + var redraw_on_skin_change = Callable(self, "update_and_redraw") + + # Clean up this terrain lump's callback from off the old skin (if it exists). + if skin != null: + assert(skin.changed.is_connected(redraw_on_skin_change)) + + skin.disconnect("changed", redraw_on_skin_change.bind(skin)) + + # Replace the old skin with the new. + skin = new_ts - # Create textures from the spritesheet. - # Can't just use atlas textures, they don't loop like we need. + if new_ts != null: + # If the new skin isn't nothing, read in its new textures. + update_textures(new_ts) + # Also subscribe to updates, so this lump stays in sync. + new_ts.changed.connect(redraw_on_skin_change.bind(new_ts)) + + assert(new_ts.changed.is_connected(redraw_on_skin_change)) + else: + # If the new skin is nothing, set the textures to nothing as well. + clear_textures() + + # Push graphics updates to child nodes. + # Said nodes can apparently be null right when the editor starts up, + # so only update when these nodes exist. + if decorations != null: + decorations.queue_redraw() + + +func update_and_redraw(new_skin: TerrainSkin): + update_textures(new_skin) + decorations.queue_redraw() + + +func update_textures(src_skin: TerrainSkin): + body = src_skin.body + side = src_skin.side + bottom = src_skin.bottom + + top = src_skin.top + top_endcap = src_skin.top_endcap + top_clip = src_skin.top_clip + top_endcap_clip = src_skin.top_endcap_clip + + +func clear_textures(): + body = null + side = null + bottom = null + + top = null + top_endcap = null + top_clip = null + top_endcap_clip = null - body = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(36, 3, 32, 32) ) ) - edge = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(3, 3, 32, 32) ) ) - bottom = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(36, 36, 32, 32) ) ) - - top = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(105, 3, 32, 32) ) ) - top_corner = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(72, 3, 32, 32) ) ) - top_shade = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(105, 36, 32, 32) ) ) - top_corner_shade = ImageTexture.create_from_image(texture_spritesheet.get_image().get_region( Rect2(72, 36, 32, 32) ) ) diff --git a/classes/solid/terrain/terrain_polygon.tscn b/classes/solid/terrain/terrain_polygon.tscn index ebc030626..2099471c8 100644 --- a/classes/solid/terrain/terrain_polygon.tscn +++ b/classes/solid/terrain/terrain_polygon.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=8 format=3 uid="uid://uxujeycb0ytl"] [ext_resource type="Script" path="res://classes/solid/terrain/terrain_polygon.gd" id="1"] -[ext_resource type="Texture2D" uid="uid://bfx115eob35tv" path="res://classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png" id="3"] +[ext_resource type="Resource" uid="uid://bfx115eob35tv" path="res://terrain_skins/grass/grass.png" id="2_tuqqw"] [ext_resource type="Script" path="res://classes/solid/terrain/terrain_border.gd" id="4"] [ext_resource type="Script" path="res://classes/solid/terrain/terrain_border_endcaps.gd" id="10"] @@ -9,7 +9,7 @@ resource_name = "TerrainMaterial" light_mode = 1 -[sub_resource type="Image" id="Image_55jnb"] +[sub_resource type="Image" id="Image_etd47"] data = { "data": PackedByteArray(205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 229, 159, 83, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 252, 186, 85, 255, 229, 159, 83, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 186, 116, 69, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 216, 145, 90, 255, 216, 145, 90, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 216, 145, 90, 255, 216, 145, 90, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 216, 145, 90, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 216, 145, 90, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 216, 145, 90, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 216, 145, 90, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 216, 145, 90, 255, 216, 145, 90, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 229, 159, 83, 255, 216, 145, 90, 255, 216, 145, 90, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255, 205, 133, 97, 255), "format": "RGBA8", @@ -18,19 +18,21 @@ data = { "width": 32 } -[sub_resource type="ImageTexture" id="ImageTexture_uklmc"] -image = SubResource("Image_55jnb") +[sub_resource type="ImageTexture" id="ImageTexture_x1753"] +resource_name = "grass_body" +image = SubResource("Image_etd47") [node name="TerrainPolygon" type="Polygon2D"] texture_repeat = 2 material = SubResource("CanvasItemMaterial_j0k2v") script = ExtResource("1") -texture_spritesheet = ExtResource("3") +skin = ExtResource("2_tuqqw") +tint_color = Color(1, 1, 1, 0.501961) [node name="Body" type="Polygon2D" parent="."] texture_repeat = 2 use_parent_material = true -texture = SubResource("ImageTexture_uklmc") +texture = SubResource("ImageTexture_x1753") [node name="Borders" type="Node2D" parent="."] use_parent_material = true diff --git a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png.import b/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png.import deleted file mode 100644 index 6bc2110bc..000000000 --- a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png.import +++ /dev/null @@ -1,34 +0,0 @@ -[remap] - -importer="texture" -type="CompressedTexture2D" -uid="uid://bfx115eob35tv" -path="res://.godot/imported/jungle_normal_spritesheet.png-5e9f32a8f565203dc1c45345dc90e191.ctex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png" -dest_files=["res://.godot/imported/jungle_normal_spritesheet.png-5e9f32a8f565203dc1c45345dc90e191.ctex"] - -[params] - -compress/mode=0 -compress/high_quality=false -compress/lossy_quality=0.7 -compress/hdr_compression=1 -compress/normal_map=0 -compress/channel_pack=0 -mipmaps/generate=false -mipmaps/limit=-1 -roughness/mode=0 -roughness/src_normal="" -process/fix_alpha_border=true -process/premult_alpha=false -process/normal_map_invert_y=false -process/hdr_as_srgb=false -process/hdr_clamp_exposure=false -process/size_limit=0 -detect_3d/compress_to=1 diff --git a/project.godot b/project.godot index 61bfe7e88..c5d711195 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Super Mario 63 Redux" run/main_scene="res://scenes/menus/title/title.tscn" -config/features=PackedStringArray("4.1") +config/features=PackedStringArray("4.2") boot_splash/image="res://splash.png" boot_splash/use_filter=false config/icon="res://icon.png" @@ -36,6 +36,10 @@ mouse_cursor/custom_image_hotspot=Vector2(1, 1) project/assembly_name="Super Mario 63 Redux" +[editor_plugins] + +enabled=PackedStringArray("res://addons/tileset_from_image/plugin.cfg") + [gui] theme/custom="res://gui/theme_gui.tres" diff --git a/scenes/levels/tutorial_1/tutorial_1_1.tscn b/scenes/levels/tutorial_1/tutorial_1_1.tscn index 6053be5a6..5bafc9397 100644 --- a/scenes/levels/tutorial_1/tutorial_1_1.tscn +++ b/scenes/levels/tutorial_1/tutorial_1_1.tscn @@ -4,7 +4,7 @@ [ext_resource type="PackedScene" uid="uid://ckc4syjyp8xrq" path="res://classes/solid/log/log.tscn" id="2"] [ext_resource type="PackedScene" uid="uid://c5p3x7s08jvob" path="res://classes/solid/log/log_fall.tscn" id="3"] [ext_resource type="PackedScene" uid="uid://bujgheqb6pmrc" path="res://classes/player/player.tscn" id="4"] -[ext_resource type="PackedScene" path="res://classes/solid/rocks/big_rock/big_rock.tscn" id="5"] +[ext_resource type="PackedScene" uid="uid://bhiyyqle055lo" path="res://classes/solid/rocks/big_rock/big_rock.tscn" id="5"] [ext_resource type="PackedScene" uid="uid://do78au40k7meh" path="res://classes/decorative/big_tree.tscn" id="7"] [ext_resource type="PackedScene" uid="uid://hr76pxvm5b6f" path="res://classes/water/water.tscn" id="8"] [ext_resource type="Texture2D" uid="uid://w4khahd820d5" path="res://classes/decorative/fossil/fossils.png" id="13_dyv3u"] diff --git a/scenes/menus/level_designer/new_atlastexture.tres b/scenes/menus/level_designer/new_atlastexture.tres deleted file mode 100644 index f2443dc07..000000000 --- a/scenes/menus/level_designer/new_atlastexture.tres +++ /dev/null @@ -1,8 +0,0 @@ -[gd_resource type="AtlasTexture" load_steps=2 format=2] - -[ext_resource path="res://classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png" type="Texture2D" id=1] - -[resource] -flags = 2 -atlas = ExtResource( 1 ) -region = Rect2( 36, 3, 32, 32 ) diff --git a/classes/solid/terrain/tilesets/jungle/dark_ground.png b/terrain_skins/grass/dark_ground.png similarity index 100% rename from classes/solid/terrain/tilesets/jungle/dark_ground.png rename to terrain_skins/grass/dark_ground.png diff --git a/classes/solid/terrain/tilesets/jungle/dark_ground.png.import b/terrain_skins/grass/dark_ground.png.import similarity index 69% rename from classes/solid/terrain/tilesets/jungle/dark_ground.png.import rename to terrain_skins/grass/dark_ground.png.import index 27297df4f..5203e6bb3 100644 --- a/classes/solid/terrain/tilesets/jungle/dark_ground.png.import +++ b/terrain_skins/grass/dark_ground.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://buqa465et8vd6" -path="res://.godot/imported/dark_ground.png-2132f77797c414290bf383556a3e4f61.ctex" +path="res://.godot/imported/dark_ground.png-755ec2eba480b27877169d207e1eafed.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://classes/solid/terrain/tilesets/jungle/dark_ground.png" -dest_files=["res://.godot/imported/dark_ground.png-2132f77797c414290bf383556a3e4f61.ctex"] +source_file="res://terrain_skins/grass/dark_ground.png" +dest_files=["res://.godot/imported/dark_ground.png-755ec2eba480b27877169d207e1eafed.ctex"] [params] diff --git a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png b/terrain_skins/grass/grass.png similarity index 100% rename from classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet.png rename to terrain_skins/grass/grass.png diff --git a/terrain_skins/grass/grass.png.import b/terrain_skins/grass/grass.png.import new file mode 100644 index 000000000..5b8138a25 --- /dev/null +++ b/terrain_skins/grass/grass.png.import @@ -0,0 +1,23 @@ +[remap] + +importer="63r.terrain_skin" +type="Resource" +uid="uid://bfx115eob35tv" +path="res://.godot/imported/grass.png-335b218b9e2737131bc8650c2e58216f.res" + +[deps] + +source_file="res://terrain_skins/grass/grass.png" +dest_files=["res://.godot/imported/grass.png-335b218b9e2737131bc8650c2e58216f.res"] + +[params] + +external_textures=false +Texture Rects=null +body=Rect2(36, 3, 32, 32) +top=Rect2(105, 3, 32, 32) +top_endcap=Rect2(72, 3, 32, 32) +top_clip=Rect2(105, 36, 32, 32) +top_endcap_clip=Rect2(72, 36, 32, 32) +side=Rect2(3, 3, 32, 32) +bottom=Rect2(36, 36, 32, 32) diff --git a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png b/terrain_skins/spritesheet_explenation.png similarity index 100% rename from classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png rename to terrain_skins/spritesheet_explenation.png diff --git a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png.import b/terrain_skins/spritesheet_explenation.png.import similarity index 63% rename from classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png.import rename to terrain_skins/spritesheet_explenation.png.import index 66f4e9b1b..b6a813377 100644 --- a/classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png.import +++ b/terrain_skins/spritesheet_explenation.png.import @@ -3,15 +3,15 @@ importer="texture" type="CompressedTexture2D" uid="uid://p8n6lgy1kx1c" -path="res://.godot/imported/jungle_normal_spritesheet_explenation.png-42a0cfa6024da24c02141b392a1bd4b4.ctex" +path="res://.godot/imported/spritesheet_explenation.png-38e35dae46bc8c23b5c91578a2ff5e59.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://classes/solid/terrain/tilesets/jungle/jungle_normal_spritesheet_explenation.png" -dest_files=["res://.godot/imported/jungle_normal_spritesheet_explenation.png-42a0cfa6024da24c02141b392a1bd4b4.ctex"] +source_file="res://terrain_skins/spritesheet_explenation.png" +dest_files=["res://.godot/imported/spritesheet_explenation.png-38e35dae46bc8c23b5c91578a2ff5e59.ctex"] [params] diff --git a/terrain_skins/terrain_skin.gd b/terrain_skins/terrain_skin.gd new file mode 100644 index 000000000..a58c1566f --- /dev/null +++ b/terrain_skins/terrain_skin.gd @@ -0,0 +1,45 @@ +@tool +class_name TerrainSkin +extends Resource + +@export var body: Texture2D: + set(value): + if value != body: + body = value + emit_changed() + +@export var top: Texture2D: + set(value): + if value != top: + top = value + emit_changed() + +@export var top_clip: Texture2D: + set(value): + if value != top_clip: + top_clip = value + emit_changed() + +@export var top_endcap: Texture2D: + set(value): + if value != top_endcap: + top_endcap = value + emit_changed() + +@export var top_endcap_clip: Texture2D: + set(value): + if value != top_endcap_clip: + top_endcap_clip = value + emit_changed() + +@export var side: Texture2D: + set(value): + if value != side: + side = value + emit_changed() + +@export var bottom: Texture2D: + set(value): + if value != bottom: + bottom = value + emit_changed()