From 6e8d2e972c710759ef4d6bc393c2ca6b03939921 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Tue, 7 Jul 2020 19:52:44 +0200 Subject: [PATCH] Add wires --- Graphics/tgstation/cables.tres | 28 +++++++++++++++++ Graphics/tgstation/wires-l2.png | Bin 0 -> 3446 bytes Graphics/tgstation/wires-l2.png.import | 34 +++++++++++++++++++++ Scenes/Game.gd | 1 + Scenes/Game.tscn | 6 +++- Scenes/Maps/runtime.tscn | 9 ++++-- Scenes/Test.tscn | 40 +++++++++++++++++++++++++ 7 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 Graphics/tgstation/cables.tres create mode 100644 Graphics/tgstation/wires-l2.png create mode 100644 Graphics/tgstation/wires-l2.png.import create mode 100644 Scenes/Test.tscn diff --git a/Graphics/tgstation/cables.tres b/Graphics/tgstation/cables.tres new file mode 100644 index 0000000..8709951 --- /dev/null +++ b/Graphics/tgstation/cables.tres @@ -0,0 +1,28 @@ +[gd_resource type="TileSet" load_steps=2 format=2] + +[ext_resource path="res://Graphics/tgstation/wires-l2.png" type="Texture" id=1] + +[resource] +0/name = "wires-l2.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 256, 256 ) +0/tile_mode = 1 +0/autotile/bitmask_mode = 1 +0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 24, Vector2( 0, 1 ), 56, Vector2( 0, 2 ), 48, Vector2( 0, 3 ), 152, Vector2( 0, 4 ), 24, Vector2( 0, 6 ), 304, Vector2( 0, 7 ), 216, Vector2( 1, 0 ), 184, Vector2( 1, 1 ), 176, Vector2( 1, 2 ), 144, Vector2( 1, 3 ), 16, Vector2( 1, 4 ), 504, Vector2( 1, 5 ), 432, Vector2( 1, 6 ), 208, Vector2( 2, 0 ), 58, Vector2( 2, 1 ), 50, Vector2( 2, 2 ), 154, Vector2( 2, 3 ), 186, Vector2( 2, 4 ), 63, Vector2( 2, 5 ), 54, Vector2( 2, 6 ), 219, Vector2( 2, 7 ), 511, Vector2( 3, 0 ), 178, Vector2( 3, 1 ), 146, Vector2( 3, 2 ), 18, Vector2( 3, 3 ), 26, Vector2( 3, 4 ), 438, Vector2( 3, 7 ), 27, Vector2( 6, 3 ), 446, Vector2( 6, 7 ), 251 ] +0/autotile/icon_coordinate = Vector2( 2, 7 ) +0/autotile/tile_size = Vector2( 32, 32 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 diff --git a/Graphics/tgstation/wires-l2.png b/Graphics/tgstation/wires-l2.png new file mode 100644 index 0000000000000000000000000000000000000000..ef9f47533d60ac22960b376b49297fbeae9d0e86 GIT binary patch literal 3446 zcma)9do)yQAKsiw>4G{UT}GTPx=H2hB8HH3G3C|;4XLD(TOu=KD~b*px=n=XrioCJ zai39Bh9*WNY05Os79#-7=;_czWt-&)^Vr@r(3v-i8#`mJ~E_xC){?|I%UdtIDn zY8z<-05H>ehl48sXsDMOz|<+~mv`9X;}c)uu1?#4!o~$X>Y}yI4tDNQnFC)f!k+A$ zb6Ft6ABuOoDZjU4{=Qd>GM9&_AE~EiUj3xynCCO3B~MN{_S?&MYa4bmajnxDtJmnT z*n!)PPv}ME=AA4%{M6p3E$+>5K}!c(REy&CXKJQmv;kkk$-vrVO~7!w1~B6R09@V& z0KU^Abv~-zml=3_w1$*>kFSZncug8GS@&*`S4j~Ti^Ve-j1RR=^B{@I=_E4`kC_+@ zrkP$)2Ds3!C)N!i2y!i&@R{zhkZ&a2_-?go4TZDUqxBndN9^iNAnvN;Kg%6rqvW`| zr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og^vamx+2V(jkF^{_muTfR!RoNNj=w3OEMvDJ5;J=*RtWIL9Xj4ZDO`dj?2!G zJ>L`6rkq?lLbO49$T925?bJ778J!ybCIV)Rmow$*p~?ZvMpzVVg;D~j%W7}Z1C3ha zd{0(BQnZ-2@3ZK_w~d8(75N_sug9si11gff&I+^IHe!7H^P02`sBLxwNW4Vv+tQ0v|dY{zD#lZq?YlxDL_E!Q+=-Ur}?|=)w+*yLI8^NEQpBnc~0^?{c z^5^EILzIam2e!m4{vKuZqPCT2=rA9mTxZHzwqD)j!h@k-7rkWLYGOjrZF+WT{4l~~QAfw^54Y;W~N3UGFGaVXs8d-2~(EbaaP literal 0 HcmV?d00001 diff --git a/Graphics/tgstation/wires-l2.png.import b/Graphics/tgstation/wires-l2.png.import new file mode 100644 index 0000000..782bb0d --- /dev/null +++ b/Graphics/tgstation/wires-l2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/wires-l2.png-0c22bc064c3a3ccaf36b70c3087bb116.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/wires-l2.png" +dest_files=[ "res://.import/wires-l2.png-0c22bc064c3a3ccaf36b70c3087bb116.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/Game.gd b/Scenes/Game.gd index 25e265a..a05900b 100644 --- a/Scenes/Game.gd +++ b/Scenes/Game.gd @@ -7,6 +7,7 @@ onready var world = $world as GameWorld func _ready(): ui.connect("command", world, "process_command") + $world/odyssey.queue_free() func process_command(cmd: UICommand): match cmd.cmd_type: diff --git a/Scenes/Game.tscn b/Scenes/Game.tscn index b434dea..3321996 100644 --- a/Scenes/Game.tscn +++ b/Scenes/Game.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] +[ext_resource path="res://Scenes/Maps/odyssey.tscn" type="PackedScene" id=1] [ext_resource path="res://Actors/Player/Player.tscn" type="PackedScene" id=2] [ext_resource path="res://Scenes/ui.tscn" type="PackedScene" id=3] [ext_resource path="res://Scenes/World.gd" type="Script" id=4] @@ -18,6 +19,9 @@ map_path = NodePath("runtime") [node name="runtime" parent="world" instance=ExtResource( 7 )] +[node name="odyssey" parent="world" instance=ExtResource( 1 )] +visible = false + [node name="player" parent="world" instance=ExtResource( 2 )] position = Vector2( 206.017, 250.966 ) z_index = 1 diff --git a/Scenes/Maps/runtime.tscn b/Scenes/Maps/runtime.tscn index e645253..294a312 100644 --- a/Scenes/Maps/runtime.tscn +++ b/Scenes/Maps/runtime.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=13 format=2] [ext_resource path="res://Graphics/tgstation/walls.tres" type="TileSet" id=1] [ext_resource path="res://Graphics/tgstation/1x1.tres" type="TileSet" id=2] [ext_resource path="res://Scenes/Rendering/MapTiles.gd" type="Script" id=3] +[ext_resource path="res://Graphics/tgstation/cables.tres" type="TileSet" id=4] [ext_resource path="res://Scenes/Maps/runtime.gd" type="Script" id=5] [ext_resource path="res://Actors/Objects/Computer/Computer.tscn" type="PackedScene" id=6] [ext_resource path="res://Graphics/space.png" type="Texture" id=7] @@ -44,8 +45,7 @@ script = ExtResource( 3 ) extended_tilemap_node = NodePath("../1x1") [node name="cables" type="TileMap" parent="."] -visible = false -tile_set = ExtResource( 1 ) +tile_set = ExtResource( 4 ) cell_size = Vector2( 32, 32 ) cell_quadrant_size = 32 occluder_light_mask = -2147483647 @@ -87,14 +87,17 @@ __meta__ = { [node name="Engine" parent="engines" instance=ExtResource( 10 )] position = Vector2( -320, 321 ) direction = 0 +strength = 1.0 [node name="Engine2" parent="engines" instance=ExtResource( 10 )] position = Vector2( -320, 208 ) direction = 0 +strength = 1.0 [node name="Engine3" parent="engines" instance=ExtResource( 10 )] position = Vector2( -320, 96 ) direction = 0 +strength = 1.0 [node name="objects" type="Node2D" parent="."] __meta__ = { diff --git a/Scenes/Test.tscn b/Scenes/Test.tscn new file mode 100644 index 0000000..2920b36 --- /dev/null +++ b/Scenes/Test.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Scenes/Maps/odyssey.tscn" type="PackedScene" id=1] +[ext_resource path="res://Actors/Player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://Scenes/ui.tscn" type="PackedScene" id=3] +[ext_resource path="res://Scenes/World.gd" type="Script" id=4] +[ext_resource path="res://Scenes/Game.gd" type="Script" id=5] +[ext_resource path="res://Scenes/UI.gd" type="Script" id=6] +[ext_resource path="res://Scenes/Maps/runtime.tscn" type="PackedScene" id=7] + +[node name="scene" type="Node"] +script = ExtResource( 5 ) + +[node name="world" type="Node2D" parent="."] +scale = Vector2( 2, 2 ) +script = ExtResource( 4 ) +player_path = NodePath("player") +map_path = NodePath("odyssey") + +[node name="runtime" parent="world" instance=ExtResource( 7 )] +visible = false + +[node name="odyssey" parent="world" instance=ExtResource( 1 )] + +[node name="player" parent="world" instance=ExtResource( 2 )] +position = Vector2( 206.017, 250.966 ) +z_index = 1 +is_controlled = true + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="ui" parent="CanvasLayer" instance=ExtResource( 3 )] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_right = 0.0 +margin_bottom = 0.0 +mouse_filter = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +script = ExtResource( 6 )