diff --git a/Graphics/UI/ui_theme.tres b/Graphics/UI/ui_theme.tres index 194f49a..6c1cc53 100644 --- a/Graphics/UI/ui_theme.tres +++ b/Graphics/UI/ui_theme.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=4 format=2] +[gd_resource type="Theme" load_steps=6 format=2] [ext_resource path="res://Graphics/UI/uifont.tres" type="DynamicFont" id=1] @@ -36,6 +36,40 @@ expand_margin_right = 8.0 expand_margin_top = 8.0 expand_margin_bottom = 8.0 +[sub_resource type="StyleBoxFlat" id=3] +content_margin_left = 10.0 +content_margin_right = 10.0 +content_margin_top = 5.0 +content_margin_bottom = 0.0 +bg_color = Color( 0.09962, 0.0918, 0.17, 1 ) +border_width_left = 4 +border_width_top = 4 +border_width_right = 4 +border_width_bottom = 4 +border_color = Color( 0.0941176, 0.0823529, 0.180392, 1 ) +border_blend = true +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 4 +corner_radius_bottom_left = 4 +expand_margin_bottom = 2.0 + +[sub_resource type="StyleBoxFlat" id=4] +content_margin_left = 10.0 +content_margin_right = 10.0 +content_margin_top = 5.0 +bg_color = Color( 0.133333, 0.12549, 0.203922, 1 ) +border_width_left = 4 +border_width_top = 4 +border_width_right = 4 +border_color = Color( 0.0941176, 0.0823529, 0.180392, 1 ) +border_blend = true +corner_radius_top_left = 4 +corner_radius_top_right = 4 +corner_radius_bottom_right = 2 +corner_radius_bottom_left = 2 +expand_margin_bottom = 4.0 + [resource] default_font = ExtResource( 1 ) Button/colors/font_color = Color( 0.88, 0.88, 0.88, 1 ) @@ -70,6 +104,44 @@ PopupMenu/styles/labeled_separator_right = null PopupMenu/styles/panel = SubResource( 2 ) PopupMenu/styles/panel_disabled = null PopupMenu/styles/separator = null +TabContainer/colors/font_color_bg = Color( 0.69, 0.69, 0.69, 1 ) +TabContainer/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) +TabContainer/colors/font_color_fg = Color( 0.94, 0.94, 0.94, 1 ) +TabContainer/constants/hseparation = 4 +TabContainer/constants/label_valign_bg = 2 +TabContainer/constants/label_valign_fg = 0 +TabContainer/constants/side_margin = 8 +TabContainer/constants/top_margin = 24 +TabContainer/fonts/font = null +TabContainer/icons/decrement = null +TabContainer/icons/decrement_highlight = null +TabContainer/icons/increment = null +TabContainer/icons/increment_highlight = null +TabContainer/icons/menu = null +TabContainer/icons/menu_highlight = null +TabContainer/styles/panel = SubResource( 1 ) +TabContainer/styles/tab_bg = SubResource( 3 ) +TabContainer/styles/tab_disabled = SubResource( 3 ) +TabContainer/styles/tab_fg = SubResource( 4 ) +Tabs/colors/font_color_bg = Color( 0.69, 0.69, 0.69, 1 ) +Tabs/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) +Tabs/colors/font_color_fg = Color( 0.94, 0.94, 0.94, 1 ) +Tabs/constants/hseparation = 4 +Tabs/constants/label_valign_bg = 2 +Tabs/constants/label_valign_fg = 0 +Tabs/constants/top_margin = 24 +Tabs/fonts/font = null +Tabs/icons/close = null +Tabs/icons/decrement = null +Tabs/icons/decrement_highlight = null +Tabs/icons/increment = null +Tabs/icons/increment_highlight = null +Tabs/styles/button = null +Tabs/styles/button_pressed = null +Tabs/styles/panel = SubResource( 1 ) +Tabs/styles/tab_bg = null +Tabs/styles/tab_disabled = null +Tabs/styles/tab_fg = SubResource( 1 ) ToolButton/colors/font_color = Color( 0.88, 0.88, 0.88, 1 ) ToolButton/colors/font_color_disabled = Color( 0.9, 0.95, 1, 0.3 ) ToolButton/colors/font_color_hover = Color( 0.94, 0.94, 0.94, 1 ) diff --git a/Graphics/deepspace_mat.tres b/Graphics/deepspace_mat.tres index e437f8a..b0522fd 100644 --- a/Graphics/deepspace_mat.tres +++ b/Graphics/deepspace_mat.tres @@ -6,10 +6,6 @@ code = "shader_type canvas_item; uniform sampler2D noise_sparse; uniform sampler2D noise_fine; -uniform float scroll_speed = 0.0; -uniform float warp_boost: hint_range(1, 10) = 1.0; -uniform float warp_opacity : hint_range(0, 1) = 0.0; - const float noise_sparse_scale = 0.0007; const float noise_fine_scale = 0.003; const float warp_clouds_scale = 0.0003; @@ -20,10 +16,9 @@ const float PI = 3.1415; render_mode unshaded; void fragment() { - float scroll = scroll_speed * TIME; - float sparse = texture(noise_sparse, (FRAGCOORD.xy + scroll_dir * scroll)*noise_sparse_scale).r; + float sparse = texture(noise_sparse, FRAGCOORD.xy*noise_sparse_scale).r; sparse = ((sparse * sparse) - 0.2) * 1.2; - float fine = texture(noise_fine, (FRAGCOORD.xy + scroll_dir * scroll)*noise_fine_scale).r; + float fine = texture(noise_fine, FRAGCOORD.xy*noise_fine_scale).r; fine = fine - 0.6; if (fine > 0.) { fine = fine * 10.0; @@ -35,17 +30,7 @@ void fragment() { vec4 clouds = vec4(vec3(0.3, 0.5, 0.7) * sparse, 1.0); vec4 stars = vec4(fine); - vec2 warp_scroll = scroll_dir * scroll; - vec2 warp_uv = (FRAGCOORD.xy * sin(SCREEN_UV.y * PI) + warp_scroll)*warp_clouds_scale; - vec2 warp_uv_inv = (FRAGCOORD.xy * sin((abs(SCREEN_UV.y-0.5)) * SCREEN_UV.x * PI) + warp_scroll*0.5)*warp_clouds_scale; - float warp_clouds_sparse = texture(noise_sparse, vec2(0.5,1) * warp_uv).r; - float warp_clouds_fine = texture(noise_sparse, vec2(2,1) * warp_uv_inv).r; - - vec4 warp = vec4(vec3(0), 1); - warp += vec4(vec3(0.3,0.2,0.9)*warp_clouds_sparse, 0); - warp += vec4(vec3(0.5,0.0,0.5)*(warp_clouds_fine*0.5+warp_clouds_sparse)*abs(SCREEN_UV.y-0.5), 0); - - COLOR = mix(clouds + stars, warp*warp_boost, warp_opacity); + COLOR = clouds + stars; }" [sub_resource type="OpenSimplexNoise" id=2] @@ -67,8 +52,5 @@ noise = SubResource( 4 ) [resource] shader = SubResource( 1 ) -shader_param/scroll_speed = 0.0 -shader_param/warp_boost = 0.0 -shader_param/warp_opacity = 0.0 shader_param/noise_sparse = SubResource( 5 ) shader_param/noise_fine = SubResource( 3 ) diff --git a/Graphics/tgstation/walls.tres b/Graphics/tgstation/walls.tres index 3e51b11..a3f2296 100644 --- a/Graphics/tgstation/walls.tres +++ b/Graphics/tgstation/walls.tres @@ -1,54 +1,52 @@ -[gd_resource type="TileSet" load_steps=5 format=2] +[gd_resource type="TileSet" load_steps=3 format=2] -[ext_resource path="res://Graphics/tgstation/wall.png" type="Texture" id=2] -[ext_resource path="res://Graphics/tgstation/window.png" type="Texture" id=3] - -[sub_resource type="ConvexPolygonShape2D" id=1] -points = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=2] -points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) +[ext_resource path="res://Graphics/tgstation/walls_tiled.png" type="Texture" id=1] +[ext_resource path="res://Graphics/tgstation/windows_tiled.png" type="Texture" id=4] [resource] -2/name = "Wall" -2/texture = ExtResource( 2 ) -2/tex_offset = Vector2( 0, 0 ) -2/modulate = Color( 1, 1, 1, 1 ) -2/region = Rect2( 0, 0, 32, 32 ) -2/tile_mode = 0 -2/occluder_offset = Vector2( 0, 0 ) -2/navigation_offset = Vector2( 0, 0 ) -2/shape_offset = Vector2( 0, 0 ) -2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -2/shape = SubResource( 1 ) -2/shape_one_way = false -2/shape_one_way_margin = 1.0 -2/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 1 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -} ] -2/z_index = 0 -3/name = "Window" -3/texture = ExtResource( 3 ) -3/tex_offset = Vector2( 0, 0 ) -3/modulate = Color( 1, 1, 1, 1 ) -3/region = Rect2( 0, 0, 32, 32 ) -3/tile_mode = 0 -3/occluder_offset = Vector2( 0, 0 ) -3/navigation_offset = Vector2( 0, 0 ) -3/shape_offset = Vector2( 0, 0 ) -3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -3/shape = SubResource( 2 ) -3/shape_one_way = false -3/shape_one_way_margin = 1.0 -3/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 2 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -} ] -3/z_index = 0 +4/name = "Wall" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/modulate = Color( 1, 1, 1, 1 ) +4/region = Rect2( 0, 0, 256, 224 ) +4/tile_mode = 1 +4/autotile/bitmask_mode = 1 +4/autotile/bitmask_flags = [ Vector2( 0, 0 ), 176, Vector2( 0, 1 ), 178, Vector2( 0, 2 ), 50, Vector2( 0, 3 ), 442, Vector2( 0, 4 ), 190, Vector2( 0, 5 ), 434, Vector2( 0, 6 ), 182, Vector2( 1, 0 ), 184, Vector2( 1, 1 ), 186, Vector2( 1, 2 ), 58, Vector2( 1, 3 ), 250, Vector2( 1, 4 ), 187, Vector2( 1, 5 ), 218, Vector2( 1, 6 ), 155, Vector2( 2, 0 ), 152, Vector2( 2, 1 ), 154, Vector2( 2, 2 ), 26, Vector2( 2, 3 ), 464, Vector2( 2, 4 ), 23, Vector2( 2, 5 ), 440, Vector2( 2, 6 ), 62, Vector2( 3, 0 ), 144, Vector2( 3, 1 ), 146, Vector2( 3, 2 ), 18, Vector2( 3, 3 ), 16, Vector2( 3, 4 ), 510, Vector2( 3, 5 ), 248, Vector2( 3, 6 ), 59, Vector2( 4, 0 ), 48, Vector2( 4, 1 ), 432, Vector2( 4, 2 ), 438, Vector2( 4, 3 ), 54, Vector2( 4, 4 ), 507, Vector2( 4, 5 ), 447, Vector2( 4, 6 ), 255, Vector2( 5, 0 ), 56, Vector2( 5, 1 ), 504, Vector2( 5, 2 ), 511, Vector2( 5, 3 ), 63, Vector2( 5, 4 ), 308, Vector2( 5, 5 ), 254, Vector2( 5, 6 ), 443, Vector2( 6, 0 ), 24, Vector2( 6, 1 ), 216, Vector2( 6, 2 ), 219, Vector2( 6, 3 ), 27, Vector2( 6, 4 ), 89, Vector2( 6, 5 ), 443, Vector2( 6, 6 ), 254, Vector2( 7, 0 ), 251, Vector2( 7, 1 ), 446, Vector2( 7, 2 ), 191, Vector2( 7, 3 ), 506 ] +4/autotile/icon_coordinate = Vector2( 3, 3 ) +4/autotile/tile_size = Vector2( 32, 32 ) +4/autotile/spacing = 0 +4/autotile/occluder_map = [ ] +4/autotile/navpoly_map = [ ] +4/autotile/priority_map = [ ] +4/autotile/z_index_map = [ ] +4/occluder_offset = Vector2( 0, 0 ) +4/navigation_offset = Vector2( 0, 0 ) +4/shape_offset = Vector2( 0, 0 ) +4/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +4/shape_one_way = false +4/shape_one_way_margin = 0.0 +4/shapes = [ ] +4/z_index = 0 +5/name = "Window" +5/texture = ExtResource( 4 ) +5/tex_offset = Vector2( 0, 0 ) +5/modulate = Color( 1, 1, 1, 1 ) +5/region = Rect2( 0, 0, 256, 224 ) +5/tile_mode = 1 +5/autotile/bitmask_mode = 1 +5/autotile/bitmask_flags = [ Vector2( 0, 0 ), 176, Vector2( 0, 1 ), 178, Vector2( 0, 2 ), 50, Vector2( 0, 3 ), 442, Vector2( 0, 4 ), 190, Vector2( 0, 5 ), 434, Vector2( 0, 6 ), 182, Vector2( 1, 0 ), 184, Vector2( 1, 1 ), 186, Vector2( 1, 2 ), 58, Vector2( 1, 3 ), 250, Vector2( 1, 4 ), 187, Vector2( 1, 5 ), 218, Vector2( 1, 6 ), 155, Vector2( 2, 0 ), 152, Vector2( 2, 1 ), 154, Vector2( 2, 2 ), 26, Vector2( 2, 3 ), 464, Vector2( 2, 4 ), 23, Vector2( 2, 5 ), 440, Vector2( 2, 6 ), 62, Vector2( 3, 0 ), 144, Vector2( 3, 1 ), 146, Vector2( 3, 2 ), 18, Vector2( 3, 3 ), 16, Vector2( 3, 4 ), 510, Vector2( 3, 5 ), 248, Vector2( 3, 6 ), 59, Vector2( 4, 0 ), 48, Vector2( 4, 1 ), 432, Vector2( 4, 2 ), 438, Vector2( 4, 3 ), 54, Vector2( 4, 4 ), 507, Vector2( 4, 5 ), 447, Vector2( 4, 6 ), 255, Vector2( 5, 0 ), 56, Vector2( 5, 1 ), 504, Vector2( 5, 2 ), 511, Vector2( 5, 3 ), 63, Vector2( 5, 4 ), 308, Vector2( 5, 5 ), 254, Vector2( 5, 6 ), 443, Vector2( 6, 0 ), 24, Vector2( 6, 1 ), 216, Vector2( 6, 2 ), 219, Vector2( 6, 3 ), 27, Vector2( 6, 4 ), 89, Vector2( 6, 5 ), 443, Vector2( 6, 6 ), 254, Vector2( 7, 0 ), 251, Vector2( 7, 1 ), 446, Vector2( 7, 2 ), 191, Vector2( 7, 3 ), 506 ] +5/autotile/icon_coordinate = Vector2( 3, 3 ) +5/autotile/tile_size = Vector2( 32, 32 ) +5/autotile/spacing = 0 +5/autotile/occluder_map = [ ] +5/autotile/navpoly_map = [ ] +5/autotile/priority_map = [ ] +5/autotile/z_index_map = [ ] +5/occluder_offset = Vector2( 0, 0 ) +5/navigation_offset = Vector2( 0, 0 ) +5/shape_offset = Vector2( 0, 0 ) +5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +5/shape_one_way = false +5/shape_one_way_margin = 0.0 +5/shapes = [ ] +5/z_index = 0 diff --git a/Graphics/tgstation/walls_tiled.png b/Graphics/tgstation/walls_tiled.png new file mode 100644 index 0000000..68a2f6e Binary files /dev/null and b/Graphics/tgstation/walls_tiled.png differ diff --git a/Graphics/tgstation/walls_tiled.png.import b/Graphics/tgstation/walls_tiled.png.import new file mode 100644 index 0000000..5e218c7 --- /dev/null +++ b/Graphics/tgstation/walls_tiled.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/walls_tiled.png-e9af388078750e44e8d744c580c0c4d5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/walls_tiled.png" +dest_files=[ "res://.import/walls_tiled.png-e9af388078750e44e8d744c580c0c4d5.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Graphics/tgstation/windows_tiled.png b/Graphics/tgstation/windows_tiled.png new file mode 100644 index 0000000..0956bb7 Binary files /dev/null and b/Graphics/tgstation/windows_tiled.png differ diff --git a/Graphics/tgstation/windows_tiled.png.import b/Graphics/tgstation/windows_tiled.png.import new file mode 100644 index 0000000..11de408 --- /dev/null +++ b/Graphics/tgstation/windows_tiled.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/windows_tiled.png-2e919e68bf2e5f8f08c847994c524d05.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/windows_tiled.png" +dest_files=[ "res://.import/windows_tiled.png-2e919e68bf2e5f8f08c847994c524d05.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Scenes/Rendering/MapTiles.gd b/Scenes/Rendering/MapTiles.gd index c7c321a..c2c42c2 100644 --- a/Scenes/Rendering/MapTiles.gd +++ b/Scenes/Rendering/MapTiles.gd @@ -2,48 +2,22 @@ extends TileMap class_name MapTiles -var transparentImage = preload("res://Graphics/transparent.png") +var transparentImage := preload("res://Graphics/transparent.png") export(NodePath) var extended_tilemap_node -export var occluders = ["Wall"] +export var occluders := ["Wall"] -export var shadow_intensity = 0.2 - -onready var extended_tilemap = get_node(extended_tilemap_node) as TileMap +export var shadow_intensity := 0.2 func run_conversions(): # Make occluders make_occluders() - # Convert 2x2 tiles to 1x1 if possible - convert_extended() - - -func convert_extended(): - var extended = extended_tilemap.tile_set - for id in tile_set.get_tiles_ids(): - var name = tile_set.tile_get_name(id) - var extended_id = extended.find_tile_by_name(name) - if extended_id < 0: - # Not found, skip it - continue - # Find all uses of this tile - for cell in get_used_cells_by_id(id): - var x = cell.x * 2 - var y = cell.y * 2 - extended_tilemap.set_cell(x, y, extended_id) - extended_tilemap.set_cell(x+1, y, extended_id) - extended_tilemap.set_cell(x, y+1, extended_id) - extended_tilemap.set_cell(x+1, y+1, extended_id) - tile_set.tile_set_texture(id, transparentImage) - extended_tilemap.update_bitmask_region() - extended_tilemap.update_dirty_quadrants() - func make_occluders(): - var occluder_ids = [] + var occluder_ids := [] for occluder_name in occluders: - var id = tile_set.find_tile_by_name(occluder_name) + var id := tile_set.find_tile_by_name(occluder_name) if id >= 0: occluder_ids.push_back(id) for id in tile_set.get_tiles_ids(): @@ -53,7 +27,7 @@ func make_occluders(): # Find all uses of this tile for cell in get_used_cells_by_id(id): # Check sides - var occluder = Occluder.new() + var occluder := Occluder.new() occluder.ignore_sides = [ occluder_ids.find(get_cell(cell.x, cell.y-1)) >= 0, # Top occluder_ids.find(get_cell(cell.x+1, cell.y)) >= 0, # Right @@ -62,7 +36,6 @@ func make_occluders(): ] occluder.transform.origin = map_to_world(cell) add_child(occluder) - func set_occluder_origin(origin): for child in get_children():