diff --git a/Actors/Objects/Door/Door.gd b/Actors/Objects/Door/Door.gd index 198bdd1..ec471c3 100644 --- a/Actors/Objects/Door/Door.gd +++ b/Actors/Objects/Door/Door.gd @@ -10,12 +10,10 @@ func set_open(open: bool): func _animation_finished(): if $Sprite.animation == "open": - print("Door opened") # Disable collider - collision_layer = 2 - collision_mask = 2 + collision_layer = 16 + collision_mask = 16 else: - print("Door closed") # Enable collider collision_mask = 1 collision_layer = 1 diff --git a/Graphics/space.png b/Graphics/space.png new file mode 100644 index 0000000..88569da Binary files /dev/null and b/Graphics/space.png differ diff --git a/Graphics/space.png.import b/Graphics/space.png.import new file mode 100644 index 0000000..1b12e34 --- /dev/null +++ b/Graphics/space.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/space.png-892d3a0f9c50c1abbcaa3013abc92b4f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/space.png" +dest_files=[ "res://.import/space.png-892d3a0f9c50c1abbcaa3013abc92b4f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=1 +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/1x1.tres b/Graphics/tgstation/1x1.tres index e6ed898..46e3933 100644 --- a/Graphics/tgstation/1x1.tres +++ b/Graphics/tgstation/1x1.tres @@ -1,6 +1,7 @@ -[gd_resource type="TileSet" load_steps=36 format=2] +[gd_resource type="TileSet" load_steps=52 format=2] [ext_resource path="res://Graphics/tgstation/walls.png" type="Texture" id=1] +[ext_resource path="res://Graphics/tgstation/windows.png" type="Texture" id=2] [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) @@ -104,6 +105,51 @@ points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) [sub_resource type="ConvexPolygonShape2D" id=34] points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) +[sub_resource type="ConvexPolygonShape2D" id=35] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=36] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=37] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=38] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=39] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=40] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=41] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=42] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=43] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=44] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=45] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=46] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=47] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=48] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=49] +points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) + [resource] 0/name = "Wall" 0/texture = ExtResource( 1 ) @@ -231,3 +277,117 @@ points = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 ) "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] 0/z_index = 0 +1/name = "Window" +1/texture = ExtResource( 2 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 0, 0, 64, 64 ) +1/tile_mode = 1 +1/autotile/bitmask_mode = 0 +1/autotile/bitmask_flags = [ Vector2( 0, 0 ), 324, Vector2( 0, 1 ), 260, Vector2( 0, 2 ), 256, Vector2( 0, 3 ), 325, Vector2( 1, 0 ), 69, Vector2( 1, 1 ), 65, Vector2( 1, 2 ), 1, Vector2( 1, 3 ), 320, Vector2( 2, 0 ), 261, Vector2( 2, 1 ), 260, Vector2( 2, 2 ), 4, Vector2( 2, 3 ), 321, Vector2( 3, 0 ), 65, Vector2( 3, 1 ), 64, Vector2( 3, 2 ), 5 ] +1/autotile/icon_coordinate = Vector2( 0, 0 ) +1/autotile/tile_size = Vector2( 16, 16 ) +1/autotile/spacing = 0 +1/autotile/occluder_map = [ ] +1/autotile/navpoly_map = [ ] +1/autotile/priority_map = [ ] +1/autotile/z_index_map = [ ] +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +1/shape = SubResource( 35 ) +1/shape_one_way = false +1/shape_one_way_margin = 1.0 +1/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 35 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 36 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 37 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 38 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 39 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 40 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 41 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 42 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 43 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 44 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 45 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 46 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 47 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 48 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 3 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 49 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +1/z_index = 0 diff --git a/Graphics/tgstation/2x2.tres b/Graphics/tgstation/2x2.tres index 67c7803..c133be4 100644 --- a/Graphics/tgstation/2x2.tres +++ b/Graphics/tgstation/2x2.tres @@ -1,7 +1,8 @@ -[gd_resource type="TileSet" load_steps=5 format=2] +[gd_resource type="TileSet" load_steps=7 format=2] [ext_resource path="res://Graphics/tgstation/floor.png" type="Texture" id=1] [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="OccluderPolygon2D" id=1] polygon = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) @@ -9,6 +10,9 @@ polygon = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) [sub_resource type="ConvexPolygonShape2D" id=2] points = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 0, 0, 32, 0, 32, 32, 0, 32 ) + [resource] 1/name = "Floor" 1/texture = ExtResource( 1 ) @@ -46,3 +50,24 @@ points = PoolVector2Array( 32, 32, 0, 32, 0, 0, 32, 0 ) "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( 3 ) +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( 3 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +3/z_index = 0 diff --git a/Graphics/tgstation/window.png b/Graphics/tgstation/window.png new file mode 100644 index 0000000..9778afe Binary files /dev/null and b/Graphics/tgstation/window.png differ diff --git a/Graphics/tgstation/window.png.import b/Graphics/tgstation/window.png.import new file mode 100644 index 0000000..4a82f8e --- /dev/null +++ b/Graphics/tgstation/window.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/window.png-51d84bd3bbfd6da21752c4226e376ebf.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/window.png" +dest_files=[ "res://.import/window.png-51d84bd3bbfd6da21752c4226e376ebf.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.png b/Graphics/tgstation/windows.png new file mode 100644 index 0000000..ba2361c Binary files /dev/null and b/Graphics/tgstation/windows.png differ diff --git a/Graphics/tgstation/windows.png.import b/Graphics/tgstation/windows.png.import new file mode 100644 index 0000000..b33ef7e --- /dev/null +++ b/Graphics/tgstation/windows.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/windows.png-08dd2d703ba4676d18e3c52ccb7fc1cc.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/windows.png" +dest_files=[ "res://.import/windows.png-08dd2d703ba4676d18e3c52ccb7fc1cc.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/transparent.png.import b/Graphics/transparent.png.import index 3b5ab00..e4445ca 100755 --- a/Graphics/transparent.png.import +++ b/Graphics/transparent.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/Scenes/Map.gd b/Scenes/Map.gd index 7604237..7baa093 100755 --- a/Scenes/Map.gd +++ b/Scenes/Map.gd @@ -2,5 +2,11 @@ extends Node2D class_name Map +var ship_direction = Vector2.RIGHT +var ship_speed = 1000 + export(NodePath) var tilemap_path onready var tilemap = get_node(tilemap_path) as MapTiles + +func _process(delta): + $deepspace.region_rect.position += ship_direction * ship_speed * delta diff --git a/Scenes/Maps/odyssey.tscn b/Scenes/Maps/odyssey.tscn index 3f90a8d..fa07beb 100644 --- a/Scenes/Maps/odyssey.tscn +++ b/Scenes/Maps/odyssey.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://Graphics/tgstation/2x2.tres" type="TileSet" id=1] [ext_resource path="res://Graphics/tgstation/1x1.tres" type="TileSet" id=2] @@ -6,18 +6,24 @@ [ext_resource path="res://Graphics/tgstation/objects.tres" type="TileSet" id=4] [ext_resource path="res://Scenes/Map.gd" type="Script" id=5] [ext_resource path="res://Scenes/Maps/Objects.gd" type="Script" id=6] +[ext_resource path="res://Graphics/space.png" type="Texture" id=7] [node name="map" type="Node2D"] script = ExtResource( 5 ) tilemap_path = NodePath("2x2") +[node name="deepspace" type="Sprite" parent="."] +texture = ExtResource( 7 ) +region_enabled = true +region_rect = Rect2( 0, 0, 10000, 10000 ) + [node name="2x2" type="TileMap" parent="."] tile_set = ExtResource( 1 ) cell_size = Vector2( 32, 32 ) cell_quadrant_size = 32 occluder_light_mask = -2147483647 format = 1 -tile_data = PoolIntArray( -393226, 1, 0, -393225, 1, 0, -393224, 1, 0, -393223, 1, 0, -393222, 1, 0, -393221, 1, 0, -393220, 1, 0, -393219, 1, 0, -393218, 1, 0, -393217, 1, 0, -458752, 1, 0, -458751, 1, 0, -458750, 1, 0, -458749, 1, 0, -458748, 1, 0, -458747, 1, 0, -458746, 1, 0, -458745, 1, 0, -458744, 1, 0, -458743, 1, 0, -458742, 1, 0, -458741, 1, 0, -458740, 1, 0, -458739, 1, 0, -458738, 1, 0, -458737, 1, 0, -458736, 1, 0, -458735, 1, 0, -458734, 1, 0, -458733, 1, 0, -458732, 1, 0, -458731, 1, 0, -458730, 1, 0, -458729, 1, 0, -458728, 1, 0, -327690, 1, 0, -327689, 1, 0, -327688, 1, 0, -327687, 1, 0, -327686, 1, 0, -327685, 1, 0, -327684, 1, 0, -327683, 1, 0, -327682, 1, 0, -327681, 1, 0, -393216, 1, 0, -393215, 1, 0, -393214, 1, 0, -393213, 1, 0, -393212, 1, 0, -393211, 1, 0, -393210, 1, 0, -393209, 1, 0, -393208, 1, 0, -393207, 1, 0, -393206, 1, 0, -393205, 1, 0, -393204, 1, 0, -393203, 1, 0, -393202, 1, 0, -393201, 1, 0, -393200, 1, 0, -393199, 1, 0, -393198, 1, 0, -393197, 1, 0, -393196, 1, 0, -393195, 1, 0, -393194, 1, 0, -393193, 1, 0, -393192, 1, 0, -262154, 1, 0, -262153, 1, 0, -262152, 1, 0, -262151, 1, 0, -262150, 1, 0, -262149, 1, 0, -262148, 1, 0, -262147, 1, 0, -262146, 1, 0, -262145, 1, 0, -327680, 1, 0, -327679, 1, 0, -327678, 1, 0, -327677, 1, 0, -327676, 1, 0, -327675, 1, 0, -327674, 1, 0, -327673, 1, 0, -327672, 1, 0, -327671, 1, 0, -327670, 1, 0, -327669, 1, 0, -327668, 1, 0, -327667, 1, 0, -327666, 1, 0, -327665, 1, 0, -327664, 1, 0, -327663, 1, 0, -327662, 1, 0, -327661, 1, 0, -327660, 1, 0, -327659, 1, 0, -327658, 1, 0, -327657, 1, 0, -327656, 1, 0, -196618, 1, 0, -196617, 1, 0, -196616, 1, 0, -196615, 1, 0, -196614, 1, 0, -196613, 1, 0, -196612, 1, 0, -196611, 1, 0, -196610, 1, 0, -196609, 1, 0, -262144, 1, 0, -262143, 1, 0, -262142, 1, 0, -262141, 1, 0, -262140, 1, 0, -262139, 1, 0, -262138, 1, 0, -262137, 1, 0, -262136, 1, 0, -262135, 1, 0, -262134, 1, 0, -262133, 1, 0, -262132, 1, 0, -262131, 1, 0, -262130, 1, 0, -262129, 1, 0, -262128, 1, 0, -262127, 1, 0, -262126, 1, 0, -262125, 1, 0, -262124, 1, 0, -262123, 1, 0, -262122, 1, 0, -262121, 1, 0, -262120, 1, 0, -131082, 1, 0, -131081, 1, 0, -131080, 1, 0, -131079, 1, 0, -131078, 1, 0, -131077, 1, 0, -131076, 1, 0, -131075, 1, 0, -131074, 1, 0, -131073, 1, 0, -196608, 1, 0, -196607, 1, 0, -196606, 1, 0, -196605, 1, 0, -196604, 1, 0, -196603, 1, 0, -196602, 1, 0, -196601, 1, 0, -196600, 1, 0, -196599, 1, 0, -196598, 1, 0, -196597, 1, 0, -196596, 1, 0, -196595, 1, 0, -196594, 1, 0, -196593, 1, 0, -196592, 1, 0, -196591, 1, 0, -196590, 1, 0, -196589, 1, 0, -196588, 1, 0, -196587, 1, 0, -196586, 1, 0, -196585, 1, 0, -196584, 1, 0, -65546, 1, 0, -65545, 1, 0, -65544, 1, 0, -65543, 1, 0, -65542, 1, 0, -65541, 1, 0, -65540, 1, 0, -65539, 1, 0, -65538, 1, 0, -65537, 1, 0, -131072, 1, 0, -131071, 1, 0, -131070, 1, 0, -131069, 1, 0, -131068, 1, 0, -131067, 1, 0, -131066, 1, 0, -131065, 1, 0, -131064, 1, 0, -131063, 1, 0, -131062, 1, 0, -131061, 1, 0, -131060, 1, 0, -131059, 1, 0, -131058, 1, 0, -131057, 1, 0, -131056, 1, 0, -131055, 1, 0, -131054, 1, 0, -131053, 1, 0, -131052, 1, 0, -131051, 1, 0, -131050, 1, 0, -131049, 1, 0, -131048, 1, 0, -10, 1, 0, -9, 1, 0, -8, 1, 0, -7, 1, 0, -6, 1, 0, -5, 1, 0, -4, 1, 0, -3, 1, 0, -2, 1, 0, -1, 1, 0, -65536, 1, 0, -65535, 1, 0, -65534, 1, 0, -65533, 1, 0, -65532, 1, 0, -65531, 1, 0, -65530, 1, 0, -65529, 1, 0, -65528, 1, 0, -65527, 1, 0, -65526, 1, 0, -65525, 1, 0, -65524, 1, 0, -65523, 1, 0, -65522, 1, 0, -65521, 1, 0, -65520, 1, 0, -65519, 1, 0, -65518, 1, 0, -65517, 1, 0, -65516, 1, 0, -65515, 1, 0, -65514, 1, 0, -65513, 1, 0, -65512, 1, 0, 65526, 1, 0, 65527, 1, 0, 65528, 1, 0, 65529, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 10, 1, 0, 11, 1, 0, 12, 1, 0, 13, 1, 0, 14, 1, 0, 15, 1, 0, 16, 1, 0, 17, 1, 0, 18, 1, 0, 19, 1, 0, 20, 1, 0, 21, 1, 0, 22, 1, 0, 23, 1, 0, 24, 1, 0, 131062, 1, 0, 131063, 1, 0, 131064, 1, 0, 131065, 1, 0, 131066, 1, 0, 131067, 1, 0, 131068, 1, 0, 131069, 1, 0, 131070, 1, 0, 131071, 1, 0, 65536, 1, 0, 65537, 1, 0, 65538, 1, 0, 65539, 1, 0, 65540, 1, 0, 65541, 1, 0, 65542, 1, 0, 65543, 1, 0, 65544, 1, 0, 65545, 1, 0, 65546, 1, 0, 65547, 1, 0, 65548, 1, 0, 65549, 1, 0, 65550, 1, 0, 65551, 1, 0, 65552, 1, 0, 65553, 1, 0, 65554, 1, 0, 65555, 1, 0, 65556, 1, 0, 65557, 1, 0, 65558, 1, 0, 65559, 1, 0, 65560, 1, 0, 196598, 1, 0, 196599, 1, 0, 196600, 1, 0, 196601, 1, 0, 196602, 1, 0, 196603, 1, 0, 196604, 1, 0, 196605, 1, 0, 196606, 1, 0, 196607, 1, 0, 131072, 1, 0, 131073, 1, 0, 131074, 1, 0, 131075, 1, 0, 131076, 1, 0, 131077, 1, 0, 131078, 1, 0, 131079, 1, 0, 131080, 1, 0, 131081, 1, 0, 131082, 1, 0, 131083, 1, 0, 131084, 1, 0, 131085, 1, 0, 131086, 1, 0, 131087, 1, 0, 131088, 1, 0, 131089, 1, 0, 131090, 1, 0, 131091, 1, 0, 131092, 1, 0, 131093, 1, 0, 131094, 1, 0, 131095, 1, 0, 131096, 1, 0, 262134, 1, 0, 262135, 1, 0, 262136, 1, 0, 262137, 2, 0, 262138, 2, 0, 262139, 2, 0, 262140, 2, 0, 262141, 2, 0, 262142, 2, 0, 262143, 2, 0, 196608, 2, 0, 196609, 2, 0, 196610, 2, 0, 196611, 2, 0, 196612, 2, 0, 196613, 2, 0, 196614, 2, 0, 196615, 2, 0, 196616, 2, 0, 196617, 2, 0, 196618, 2, 0, 196619, 2, 0, 196620, 2, 0, 196621, 2, 0, 196622, 2, 0, 196623, 2, 0, 196624, 2, 0, 196625, 2, 0, 196626, 2, 0, 196627, 2, 0, 196628, 1, 0, 196629, 1, 0, 196630, 1, 0, 196631, 1, 0, 196632, 1, 0, 327670, 1, 0, 327671, 1, 0, 327672, 1, 0, 327673, 2, 0, 327674, 1, 0, 327675, 1, 0, 327676, 1, 0, 327677, 1, 0, 327678, 1, 0, 327679, 2, 0, 262144, 1, 0, 262145, 1, 0, 262146, 1, 0, 262147, 1, 0, 262148, 1, 0, 262149, 1, 0, 262150, 1, 0, 262151, 1, 0, 262152, 1, 0, 262153, 1, 0, 262154, 1, 0, 262155, 1, 0, 262156, 1, 0, 262157, 2, 0, 262158, 1, 0, 262159, 1, 0, 262160, 1, 0, 262161, 1, 0, 262162, 1, 0, 262163, 2, 0, 262164, 1, 0, 262165, 1, 0, 262166, 1, 0, 262167, 1, 0, 262168, 1, 0, 393206, 1, 0, 393207, 1, 0, 393208, 1, 0, 393209, 2, 0, 393210, 1, 0, 393211, 1, 0, 393212, 1, 0, 393213, 1, 0, 393214, 1, 0, 393215, 2, 0, 327680, 1, 0, 327681, 1, 0, 327682, 1, 0, 327683, 1, 0, 327684, 1, 0, 327685, 1, 0, 327686, 1, 0, 327687, 1, 0, 327688, 1, 0, 327689, 1, 0, 327690, 1, 0, 327691, 1, 0, 327692, 1, 0, 327693, 2, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 2, 0, 327700, 1, 0, 327701, 1, 0, 327702, 1, 0, 327703, 1, 0, 327704, 1, 0, 458742, 1, 0, 458743, 1, 0, 458744, 1, 0, 458745, 2, 0, 458746, 1, 0, 458747, 1, 0, 458748, 1, 0, 458749, 1, 0, 458750, 1, 0, 458751, 1, 0, 393216, 1, 0, 393217, 1, 0, 393218, 1, 0, 393219, 1, 0, 393220, 1, 0, 393221, 1, 0, 393222, 1, 0, 393223, 1, 0, 393224, 1, 0, 393225, 1, 0, 393226, 1, 0, 393227, 1, 0, 393228, 1, 0, 393229, 1, 0, 393230, 1, 0, 393231, 1, 0, 393232, 1, 0, 393233, 1, 0, 393234, 1, 0, 393235, 2, 0, 393236, 1, 0, 393237, 1, 0, 393238, 1, 0, 393239, 1, 0, 393240, 1, 0, 524278, 1, 0, 524279, 1, 0, 524280, 1, 0, 524281, 2, 0, 524282, 1, 0, 524283, 1, 0, 524284, 1, 0, 524285, 1, 0, 524286, 1, 0, 524287, 2, 0, 458752, 1, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 1, 0, 458763, 1, 0, 458764, 1, 0, 458765, 2, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 2, 0, 458772, 1, 0, 458773, 1, 0, 458774, 1, 0, 458775, 1, 0, 458776, 1, 0, 589814, 1, 0, 589815, 1, 0, 589816, 1, 0, 589817, 2, 0, 589818, 1, 0, 589819, 1, 0, 589820, 1, 0, 589821, 1, 0, 589822, 1, 0, 589823, 2, 0, 524288, 1, 0, 524289, 1, 0, 524290, 1, 0, 524291, 1, 0, 524292, 1, 0, 524293, 1, 0, 524294, 1, 0, 524295, 1, 0, 524296, 1, 0, 524297, 1, 0, 524298, 1, 0, 524299, 1, 0, 524300, 1, 0, 524301, 2, 0, 524302, 1, 0, 524303, 1, 0, 524304, 1, 0, 524305, 1, 0, 524306, 1, 0, 524307, 2, 0, 524308, 1, 0, 524309, 1, 0, 524310, 1, 0, 524311, 1, 0, 524312, 1, 0, 655350, 1, 0, 655351, 1, 0, 655352, 1, 0, 655353, 2, 0, 655354, 1, 0, 655355, 1, 0, 655356, 1, 0, 655357, 1, 0, 655358, 1, 0, 655359, 1, 0, 589824, 1, 0, 589825, 1, 0, 589826, 1, 0, 589827, 1, 0, 589828, 1, 0, 589829, 1, 0, 589830, 1, 0, 589831, 1, 0, 589832, 1, 0, 589833, 1, 0, 589834, 1, 0, 589835, 1, 0, 589836, 1, 0, 589837, 1, 0, 589838, 1, 0, 589839, 1, 0, 589840, 1, 0, 589841, 1, 0, 589842, 1, 0, 589843, 2, 0, 589844, 1, 0, 589845, 1, 0, 589846, 1, 0, 589847, 1, 0, 589848, 1, 0, 720886, 1, 0, 720887, 1, 0, 720888, 1, 0, 720889, 2, 0, 720890, 1, 0, 720891, 1, 0, 720892, 1, 0, 720893, 1, 0, 720894, 1, 0, 720895, 2, 0, 655360, 1, 0, 655361, 1, 0, 655362, 1, 0, 655363, 1, 0, 655364, 1, 0, 655365, 1, 0, 655366, 1, 0, 655367, 1, 0, 655368, 1, 0, 655369, 1, 0, 655370, 1, 0, 655371, 1, 0, 655372, 1, 0, 655373, 2, 0, 655374, 1, 0, 655375, 1, 0, 655376, 1, 0, 655377, 1, 0, 655378, 1, 0, 655379, 2, 0, 655380, 1, 0, 655381, 1, 0, 655382, 1, 0, 655383, 1, 0, 655384, 1, 0, 786422, 1, 0, 786423, 1, 0, 786424, 1, 0, 786425, 2, 0, 786426, 1, 0, 786427, 1, 0, 786428, 1, 0, 786429, 1, 0, 786430, 1, 0, 786431, 2, 0, 720896, 1, 0, 720897, 1, 0, 720898, 1, 0, 720899, 1, 0, 720900, 1, 0, 720901, 1, 0, 720902, 1, 0, 720903, 1, 0, 720904, 1, 0, 720905, 1, 0, 720906, 1, 0, 720907, 1, 0, 720908, 1, 0, 720909, 2, 0, 720910, 1, 0, 720911, 1, 0, 720912, 1, 0, 720913, 1, 0, 720914, 1, 0, 720915, 2, 0, 720916, 1, 0, 720917, 1, 0, 720918, 1, 0, 720919, 1, 0, 720920, 1, 0, 851958, 1, 0, 851959, 1, 0, 851960, 1, 0, 851961, 2, 0, 851962, 2, 0, 851963, 2, 0, 851964, 2, 0, 851965, 2, 0, 851966, 2, 0, 851967, 2, 0, 786432, 2, 0, 786433, 2, 0, 786434, 2, 0, 786435, 2, 0, 786436, 2, 0, 786437, 2, 0, 786438, 2, 0, 786439, 2, 0, 786440, 2, 0, 786441, 2, 0, 786442, 2, 0, 786443, 2, 0, 786444, 2, 0, 786445, 2, 0, 786446, 2, 0, 786447, 2, 0, 786448, 2, 0, 786449, 2, 0, 786450, 2, 0, 786451, 2, 0, 786452, 1, 0, 786453, 1, 0, 786454, 1, 0, 786455, 1, 0, 786456, 1, 0, 917494, 1, 0, 917495, 1, 0, 917496, 1, 0, 917497, 1, 0, 917498, 1, 0, 917499, 1, 0, 917500, 1, 0, 917501, 1, 0, 917502, 1, 0, 917503, 1, 0, 851968, 1, 0, 851969, 1, 0, 851970, 1, 0, 851971, 1, 0, 851972, 1, 0, 851973, 1, 0, 851974, 1, 0, 851975, 1, 0, 851976, 1, 0, 851977, 1, 0, 851978, 1, 0, 851979, 1, 0, 851980, 1, 0, 851981, 1, 0, 851982, 1, 0, 851983, 1, 0, 851984, 1, 0, 851985, 1, 0, 851986, 1, 0, 851987, 1, 0, 851988, 1, 0, 851989, 1, 0, 851990, 1, 0, 851991, 1, 0, 851992, 1, 0, 983030, 1, 0, 983031, 1, 0, 983032, 1, 0, 983033, 1, 0, 983034, 1, 0, 983035, 1, 0, 983036, 1, 0, 983037, 1, 0, 983038, 1, 0, 983039, 1, 0, 917504, 1, 0, 917505, 1, 0, 917506, 1, 0, 917507, 1, 0, 917508, 1, 0, 917509, 1, 0, 917510, 1, 0, 917511, 1, 0, 917512, 1, 0, 917513, 1, 0, 917514, 1, 0, 917515, 1, 0, 917516, 1, 0, 917517, 1, 0, 917518, 1, 0, 917519, 1, 0, 917520, 1, 0, 917521, 1, 0, 917522, 1, 0, 917523, 1, 0, 917524, 1, 0, 917525, 1, 0, 917526, 1, 0, 917527, 1, 0, 917528, 1, 0, 1048566, 1, 0, 1048567, 1, 0, 1048568, 1, 0, 1048569, 1, 0, 1048570, 1, 0, 1048571, 1, 0, 1048572, 1, 0, 1048573, 1, 0, 1048574, 1, 0, 1048575, 1, 0, 983040, 1, 0, 983041, 1, 0, 983042, 1, 0, 983043, 1, 0, 983044, 1, 0, 983045, 1, 0, 983046, 1, 0, 983047, 1, 0, 983048, 1, 0, 983049, 1, 0, 983050, 1, 0, 983051, 1, 0, 983052, 1, 0, 983053, 1, 0, 983054, 1, 0, 983055, 1, 0, 983056, 1, 0, 983057, 1, 0, 983058, 1, 0, 983059, 1, 0, 983060, 1, 0, 983061, 1, 0, 983062, 1, 0, 983063, 1, 0, 983064, 1, 0, 1114102, 1, 0, 1114103, 1, 0, 1114104, 1, 0, 1114105, 1, 0, 1114106, 1, 0, 1114107, 1, 0, 1114108, 1, 0, 1114109, 1, 0, 1114110, 1, 0, 1114111, 1, 0, 1048576, 1, 0, 1048577, 1, 0, 1048578, 1, 0, 1048579, 1, 0, 1048580, 1, 0, 1048581, 1, 0, 1048582, 1, 0, 1048583, 1, 0, 1048584, 1, 0, 1048585, 1, 0, 1048586, 1, 0, 1048587, 1, 0, 1048588, 1, 0, 1048589, 1, 0, 1048590, 1, 0, 1048591, 1, 0, 1048592, 1, 0, 1048593, 1, 0, 1048594, 1, 0, 1048595, 1, 0, 1048596, 1, 0, 1048597, 1, 0, 1048598, 1, 0, 1048599, 1, 0, 1048600, 1, 0, 1179638, 1, 0, 1179639, 1, 0, 1179640, 1, 0, 1179641, 1, 0, 1179642, 1, 0, 1179643, 1, 0, 1179644, 1, 0, 1179645, 1, 0, 1179646, 1, 0, 1179647, 1, 0, 1114112, 1, 0, 1114113, 1, 0, 1114114, 1, 0, 1114115, 1, 0, 1114116, 1, 0, 1114117, 1, 0, 1114118, 1, 0, 1114119, 1, 0, 1114120, 1, 0, 1114121, 1, 0, 1114122, 1, 0, 1114123, 1, 0, 1114124, 1, 0, 1114125, 1, 0, 1114126, 1, 0, 1114127, 1, 0, 1114128, 1, 0, 1114129, 1, 0, 1114130, 1, 0, 1114131, 1, 0, 1114132, 1, 0, 1114133, 1, 0, 1114134, 1, 0, 1114135, 1, 0, 1114136, 1, 0, 1245174, 1, 0, 1245175, 1, 0, 1245176, 1, 0, 1245177, 1, 0, 1245178, 1, 0, 1245179, 1, 0, 1245180, 1, 0, 1245181, 1, 0, 1245182, 1, 0, 1245183, 1, 0, 1179648, 1, 0, 1179649, 1, 0, 1179650, 1, 0, 1179651, 1, 0, 1179652, 1, 0, 1179653, 1, 0, 1179654, 1, 0, 1179655, 1, 0, 1179656, 1, 0, 1179657, 1, 0, 1179658, 1, 0, 1179659, 1, 0, 1179660, 1, 0, 1179661, 1, 0, 1179662, 1, 0, 1179663, 1, 0, 1179664, 1, 0, 1179665, 1, 0, 1179666, 1, 0, 1179667, 1, 0, 1179668, 1, 0, 1179669, 1, 0, 1179670, 1, 0, 1179671, 1, 0, 1179672, 1, 0 ) +tile_data = PoolIntArray( 262137, 2, 0, 262138, 2, 0, 262139, 2, 0, 262140, 2, 0, 262141, 2, 0, 262142, 2, 0, 262143, 2, 0, 196608, 2, 0, 196609, 2, 0, 196610, 2, 0, 196611, 2, 0, 196612, 2, 0, 196613, 2, 0, 196614, 2, 0, 196615, 2, 0, 196616, 2, 0, 196617, 2, 0, 196618, 2, 0, 196619, 2, 0, 196620, 2, 0, 196621, 2, 0, 196622, 2, 0, 196623, 2, 0, 196624, 2, 0, 196625, 2, 0, 196626, 2, 0, 196627, 2, 0, 327673, 2, 0, 327674, 1, 0, 327675, 1, 0, 327676, 1, 0, 327677, 1, 0, 327678, 1, 0, 327679, 2, 0, 262144, 1, 0, 262145, 1, 0, 262146, 1, 0, 262147, 1, 0, 262148, 1, 0, 262149, 1, 0, 262150, 1, 0, 262151, 1, 0, 262152, 1, 0, 262153, 1, 0, 262154, 1, 0, 262155, 1, 0, 262156, 1, 0, 262157, 2, 0, 262158, 1, 0, 262159, 1, 0, 262160, 1, 0, 262161, 1, 0, 262162, 1, 0, 262163, 3, 0, 393209, 2, 0, 393210, 1, 0, 393211, 1, 0, 393212, 1, 0, 393213, 1, 0, 393214, 1, 0, 393215, 2, 0, 327680, 1, 0, 327681, 1, 0, 327682, 1, 0, 327683, 1, 0, 327684, 1, 0, 327685, 1, 0, 327686, 1, 0, 327687, 1, 0, 327688, 1, 0, 327689, 1, 0, 327690, 1, 0, 327691, 1, 0, 327692, 1, 0, 327693, 2, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 3, 0, 458745, 2, 0, 458746, 1, 0, 458747, 1, 0, 458748, 1, 0, 458749, 1, 0, 458750, 1, 0, 458751, 1, 0, 393216, 1, 0, 393217, 1, 0, 393218, 1, 0, 393219, 1, 0, 393220, 1, 0, 393221, 1, 0, 393222, 1, 0, 393223, 1, 0, 393224, 1, 0, 393225, 1, 0, 393226, 1, 0, 393227, 1, 0, 393228, 1, 0, 393229, 1, 0, 393230, 1, 0, 393231, 1, 0, 393232, 1, 0, 393233, 1, 0, 393234, 1, 0, 393235, 3, 0, 524281, 2, 0, 524282, 1, 0, 524283, 1, 0, 524284, 1, 0, 524285, 1, 0, 524286, 1, 0, 524287, 3, 0, 458752, 1, 0, 458753, 1, 0, 458754, 1, 0, 458755, 1, 0, 458756, 1, 0, 458757, 1, 0, 458758, 1, 0, 458759, 1, 0, 458760, 1, 0, 458761, 1, 0, 458762, 1, 0, 458763, 1, 0, 458764, 1, 0, 458765, 3, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 2, 0, 589817, 2, 0, 589818, 1, 0, 589819, 1, 0, 589820, 1, 0, 589821, 1, 0, 589822, 1, 0, 589823, 3, 0, 524288, 1, 0, 524289, 1, 0, 524290, 1, 0, 524291, 1, 0, 524292, 1, 0, 524293, 1, 0, 524294, 1, 0, 524295, 1, 0, 524296, 1, 0, 524297, 1, 0, 524298, 1, 0, 524299, 1, 0, 524300, 1, 0, 524301, 3, 0, 524302, 1, 0, 524303, 1, 0, 524304, 1, 0, 524305, 1, 0, 524306, 1, 0, 524307, 2, 0, 655353, 2, 0, 655354, 1, 0, 655355, 1, 0, 655356, 1, 0, 655357, 1, 0, 655358, 1, 0, 655359, 1, 0, 589824, 1, 0, 589825, 1, 0, 589826, 1, 0, 589827, 1, 0, 589828, 1, 0, 589829, 1, 0, 589830, 1, 0, 589831, 1, 0, 589832, 1, 0, 589833, 1, 0, 589834, 1, 0, 589835, 1, 0, 589836, 1, 0, 589837, 1, 0, 589838, 1, 0, 589839, 1, 0, 589840, 1, 0, 589841, 1, 0, 589842, 1, 0, 589843, 3, 0, 720889, 2, 0, 720890, 1, 0, 720891, 1, 0, 720892, 1, 0, 720893, 1, 0, 720894, 1, 0, 720895, 2, 0, 655360, 1, 0, 655361, 1, 0, 655362, 1, 0, 655363, 1, 0, 655364, 1, 0, 655365, 1, 0, 655366, 1, 0, 655367, 1, 0, 655368, 1, 0, 655369, 1, 0, 655370, 1, 0, 655371, 1, 0, 655372, 1, 0, 655373, 2, 0, 655374, 1, 0, 655375, 1, 0, 655376, 1, 0, 655377, 1, 0, 655378, 1, 0, 655379, 3, 0, 786425, 2, 0, 786426, 1, 0, 786427, 1, 0, 786428, 1, 0, 786429, 1, 0, 786430, 1, 0, 786431, 2, 0, 720896, 1, 0, 720897, 1, 0, 720898, 1, 0, 720899, 1, 0, 720900, 1, 0, 720901, 1, 0, 720902, 1, 0, 720903, 1, 0, 720904, 1, 0, 720905, 1, 0, 720906, 1, 0, 720907, 1, 0, 720908, 1, 0, 720909, 2, 0, 720910, 1, 0, 720911, 1, 0, 720912, 1, 0, 720913, 1, 0, 720914, 1, 0, 720915, 3, 0, 851961, 2, 0, 851962, 2, 0, 851963, 2, 0, 851964, 2, 0, 851965, 2, 0, 851966, 2, 0, 851967, 2, 0, 786432, 2, 0, 786433, 2, 0, 786434, 2, 0, 786435, 2, 0, 786436, 2, 0, 786437, 2, 0, 786438, 2, 0, 786439, 2, 0, 786440, 2, 0, 786441, 2, 0, 786442, 2, 0, 786443, 2, 0, 786444, 2, 0, 786445, 2, 0, 786446, 2, 0, 786447, 2, 0, 786448, 2, 0, 786449, 2, 0, 786450, 2, 0, 786451, 2, 0 ) script = ExtResource( 3 ) extended_tilemap_node = NodePath("../1x1") diff --git a/Scenes/Rendering/MapTiles.gd b/Scenes/Rendering/MapTiles.gd index 6e4f662..5c6c5e1 100644 --- a/Scenes/Rendering/MapTiles.gd +++ b/Scenes/Rendering/MapTiles.gd @@ -5,6 +5,10 @@ class_name MapTiles export(NodePath) var extended_tilemap_node export var occluders = ["Wall"] +export var replace_with = { + "Window": "Floor" +} + export var shadow_intensity = 0.2 onready var extended_tilemap = get_node(extended_tilemap_node) as TileMap @@ -24,6 +28,10 @@ func convert_extended(): if extended_id < 0: # Not found, skip it continue + # Check if a replacement exists (for flooring) + var replacement = -1 + if replace_with.has(name): + replacement = tile_set.find_tile_by_name(replace_with[name]) # Find all uses of this tile for cell in get_used_cells_by_id(id): var x = cell.x * 2 @@ -32,7 +40,7 @@ func convert_extended(): 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) - set_cellv(cell, -1) + set_cellv(cell, replacement) extended_tilemap.update_bitmask_region() extended_tilemap.update_dirty_quadrants()