Add wires

This commit is contained in:
Hamcha 2020-07-07 19:52:44 +02:00
parent c5b48c1a8a
commit 6e8d2e972c
Signed by: hamcha
GPG key ID: 41467804B19A3315
7 changed files with 114 additions and 4 deletions

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

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

View file

@ -7,6 +7,7 @@ onready var world = $world as GameWorld
func _ready(): func _ready():
ui.connect("command", world, "process_command") ui.connect("command", world, "process_command")
$world/odyssey.queue_free()
func process_command(cmd: UICommand): func process_command(cmd: UICommand):
match cmd.cmd_type: match cmd.cmd_type:

View file

@ -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://Actors/Player/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Scenes/ui.tscn" type="PackedScene" id=3] [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/World.gd" type="Script" id=4]
@ -18,6 +19,9 @@ map_path = NodePath("runtime")
[node name="runtime" parent="world" instance=ExtResource( 7 )] [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 )] [node name="player" parent="world" instance=ExtResource( 2 )]
position = Vector2( 206.017, 250.966 ) position = Vector2( 206.017, 250.966 )
z_index = 1 z_index = 1

View file

@ -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/walls.tres" type="TileSet" id=1]
[ext_resource path="res://Graphics/tgstation/1x1.tres" type="TileSet" id=2] [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://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://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://Actors/Objects/Computer/Computer.tscn" type="PackedScene" id=6]
[ext_resource path="res://Graphics/space.png" type="Texture" id=7] [ext_resource path="res://Graphics/space.png" type="Texture" id=7]
@ -44,8 +45,7 @@ script = ExtResource( 3 )
extended_tilemap_node = NodePath("../1x1") extended_tilemap_node = NodePath("../1x1")
[node name="cables" type="TileMap" parent="."] [node name="cables" type="TileMap" parent="."]
visible = false tile_set = ExtResource( 4 )
tile_set = ExtResource( 1 )
cell_size = Vector2( 32, 32 ) cell_size = Vector2( 32, 32 )
cell_quadrant_size = 32 cell_quadrant_size = 32
occluder_light_mask = -2147483647 occluder_light_mask = -2147483647
@ -87,14 +87,17 @@ __meta__ = {
[node name="Engine" parent="engines" instance=ExtResource( 10 )] [node name="Engine" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 321 ) position = Vector2( -320, 321 )
direction = 0 direction = 0
strength = 1.0
[node name="Engine2" parent="engines" instance=ExtResource( 10 )] [node name="Engine2" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 208 ) position = Vector2( -320, 208 )
direction = 0 direction = 0
strength = 1.0
[node name="Engine3" parent="engines" instance=ExtResource( 10 )] [node name="Engine3" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 96 ) position = Vector2( -320, 96 )
direction = 0 direction = 0
strength = 1.0
[node name="objects" type="Node2D" parent="."] [node name="objects" type="Node2D" parent="."]
__meta__ = { __meta__ = {

40
Scenes/Test.tscn Normal file
View file

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