diff --git a/Actors/Objects/Computer/Computer.gd b/Actors/Objects/Computer/Computer.gd index d317f4c..c874a86 100644 --- a/Actors/Objects/Computer/Computer.gd +++ b/Actors/Objects/Computer/Computer.gd @@ -70,6 +70,8 @@ func manage_controls(show: bool): match computer_type: ComputerType.ShipCommand: $Control/ControlComp.visible = show + ComputerType.Energy: + $Control/EnergyComp.visible = show func _input(event): if event is InputEventMouseButton and event.pressed and not is_inside and open: diff --git a/Actors/Objects/Computer/Computer.tscn b/Actors/Objects/Computer/Computer.tscn index 6202620..5b96086 100644 --- a/Actors/Objects/Computer/Computer.tscn +++ b/Actors/Objects/Computer/Computer.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=16 format=2] [ext_resource path="res://Graphics/tgstation/computer-screens.png" type="Texture" id=1] [ext_resource path="res://Graphics/tgstation/computer.png" type="Texture" id=2] @@ -7,6 +7,7 @@ [ext_resource path="res://Graphics/light_shadow_light.png" type="Texture" id=5] [ext_resource path="res://Actors/Components/ActivationRange.gd" type="Script" id=6] [ext_resource path="res://Actors/Components/PowerManager.gd" type="Script" id=7] +[ext_resource path="res://Actors/Objects/Computer/UI/EnergyComp.tscn" type="PackedScene" id=8] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 16, 16 ) @@ -164,8 +165,6 @@ anims/fadein = SubResource( 5 ) anims/fadeout = SubResource( 6 ) [node name="Control" type="Node2D" parent="."] -modulate = Color( 1, 1, 1, 0 ) -position = Vector2( 0, 10 ) z_index = 999 [node name="ControlComp" parent="Control" instance=ExtResource( 4 )] @@ -176,6 +175,14 @@ margin_right = 208.0 margin_bottom = 66.0 rect_scale = Vector2( 0.5, 0.5 ) +[node name="EnergyComp" parent="Control" instance=ExtResource( 8 )] +visible = false +margin_left = -47.0 +margin_top = -53.0 +margin_right = 207.0 +margin_bottom = 36.0 +rect_scale = Vector2( 0.5, 0.5 ) + [node name="ActivationRange" type="Area2D" parent="."] visible = false script = ExtResource( 6 ) diff --git a/Actors/Objects/Computer/UI/ControlComp.gd b/Actors/Objects/Computer/UI/ControlComp.gd index 1192928..5b10710 100644 --- a/Actors/Objects/Computer/UI/ControlComp.gd +++ b/Actors/Objects/Computer/UI/ControlComp.gd @@ -3,6 +3,8 @@ extends Control onready var scene = $"/root/scene" as GameInstance func _physics_process(_delta): + if not visible: + return var speed_str = str(round(scene.world.map.current_ship_speed * 10000)) + " u/s" $Margin/Container/VelocityBox/HBoxContainer3/CurrentSpeed.text = speed_str var dir_str = str(round(rad2deg(scene.world.map.current_ship_direction))) + " deg" @@ -15,14 +17,8 @@ func _physics_process(_delta): else: $Margin/Container/VelocityBox/HBoxContainer/CurrentTarget.text = Coordinates.as_string(current_target_str, true) -func _ship_velocity_changed(value): - scene.rpc("process_command", UICommand.new(UICommand.CommandType.SetShipSpeed, [value])) - -func _ship_direction_changed(value): - scene.rpc("process_command", UICommand.new(UICommand.CommandType.SetShipDirection, [deg2rad(value)])) - func _map_button_pressed(): - scene.ui.open_map_popup() + scene.ui.open_popup(GameUI.PopupName.SpaceMap) func force_close(): - scene.ui.close_map_popup() + scene.ui.close_popup(GameUI.PopupName.SpaceMap) diff --git a/Actors/Objects/Computer/UI/ControlComp.tscn b/Actors/Objects/Computer/UI/ControlComp.tscn index ad19490..fd07306 100644 --- a/Actors/Objects/Computer/UI/ControlComp.tscn +++ b/Actors/Objects/Computer/UI/ControlComp.tscn @@ -8,7 +8,7 @@ [node name="ControlComp" type="Control"] material = ExtResource( 4 ) margin_left = -157.0 -margin_top = -150.0 +margin_top = -160.0 margin_right = 156.0 margin_bottom = -20.0 grow_horizontal = 2 @@ -68,11 +68,12 @@ __meta__ = { [node name="Container" type="VBoxContainer" parent="Margin"] material = ExtResource( 4 ) margin_right = 293.0 -margin_bottom = 112.0 +margin_bottom = 120.0 grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 +custom_constants/separation = 10 __meta__ = { "_edit_use_anchors_": false } @@ -80,7 +81,7 @@ __meta__ = { [node name="VelocityBox" type="VBoxContainer" parent="Margin/Container"] material = ExtResource( 4 ) margin_right = 293.0 -margin_bottom = 84.0 +margin_bottom = 86.0 size_flags_horizontal = 3 size_flags_vertical = 3 alignment = 1 @@ -89,8 +90,9 @@ __meta__ = { } [node name="HBoxContainer" type="HBoxContainer" parent="Margin/Container/VelocityBox"] +margin_top = 1.0 margin_right = 293.0 -margin_bottom = 18.0 +margin_bottom = 19.0 custom_constants/separation = 10 __meta__ = { "_edit_use_anchors_": false @@ -117,9 +119,9 @@ text = "2A.01/10" align = 2 [node name="HBoxContainer4" type="HBoxContainer" parent="Margin/Container/VelocityBox"] -margin_top = 22.0 +margin_top = 23.0 margin_right = 293.0 -margin_bottom = 40.0 +margin_bottom = 41.0 custom_constants/separation = 10 __meta__ = { "_edit_use_anchors_": false @@ -146,9 +148,9 @@ text = "0A.00/00" align = 2 [node name="HBoxContainer3" type="HBoxContainer" parent="Margin/Container/VelocityBox"] -margin_top = 44.0 +margin_top = 45.0 margin_right = 293.0 -margin_bottom = 62.0 +margin_bottom = 63.0 custom_constants/separation = 10 __meta__ = { "_edit_use_anchors_": false @@ -174,9 +176,9 @@ custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 ) align = 2 [node name="HBoxContainer2" type="HBoxContainer" parent="Margin/Container/VelocityBox"] -margin_top = 66.0 +margin_top = 67.0 margin_right = 293.0 -margin_bottom = 84.0 +margin_bottom = 85.0 [node name="ShipDirectionLabel" type="Label" parent="Margin/Container/VelocityBox/HBoxContainer2"] material = ExtResource( 4 ) @@ -199,9 +201,9 @@ align = 2 [node name="Button" type="Button" parent="Margin/Container"] material = ExtResource( 4 ) -margin_top = 88.0 +margin_top = 96.0 margin_right = 293.0 -margin_bottom = 112.0 +margin_bottom = 120.0 theme = ExtResource( 3 ) text = "Open map" [connection signal="pressed" from="Margin/Container/Button" to="." method="_map_button_pressed"] diff --git a/Actors/Objects/Computer/UI/EnergyComp.gd b/Actors/Objects/Computer/UI/EnergyComp.gd new file mode 100644 index 0000000..dd3111c --- /dev/null +++ b/Actors/Objects/Computer/UI/EnergyComp.gd @@ -0,0 +1,26 @@ +extends Control + +onready var scene = $"/root/scene" as GameInstance + +func _physics_process(_delta): + if not visible: + return + var children = scene.systems.get_children() + var total_sink = 0 + var total_source = 0 + var total_alerts = 0 + for child in children: + if child is PowerNetwork: + var network = child as PowerNetwork + total_sink += network.total_usage + total_source += network.total_source + total_alerts += network.unpowered + $Margin/Container/EnergyBox/CurrentSource/Value.text = str(round(total_source)) + " kW" + $Margin/Container/EnergyBox/CurrentSink/Value.text = str(round(total_sink)) + " kW" + $Margin/Container/EnergyBox/CurrentAlerts/Value.text = str(total_alerts) + +func _map_button_pressed(): + scene.ui.open_popup(GameUI.PopupName.EnergyUsage) + +func force_close(): + scene.ui.close_popup(GameUI.PopupName.EnergyUsage) diff --git a/Actors/Objects/Computer/UI/EnergyComp.tscn b/Actors/Objects/Computer/UI/EnergyComp.tscn new file mode 100644 index 0000000..1c862ee --- /dev/null +++ b/Actors/Objects/Computer/UI/EnergyComp.tscn @@ -0,0 +1,187 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Actors/Objects/Computer/UI/EnergyComp.gd" type="Script" id=1] +[ext_resource path="res://Graphics/UI/ui-popup-panel.png" type="Texture" id=2] +[ext_resource path="res://Graphics/UI/ui_theme.tres" type="Theme" id=3] +[ext_resource path="res://Graphics/unshaded_mat.tres" type="Material" id=4] + +[node name="EnergyComp" type="Control"] +material = ExtResource( 4 ) +margin_left = -157.0 +margin_top = -144.0 +margin_right = 156.0 +margin_bottom = -20.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 1 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TextureRect" type="TextureRect" parent="."] +material = ExtResource( 4 ) +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -8.0 +margin_top = -16.5409 +margin_right = 8.27014 +margin_bottom = 15.4881 +texture = ExtResource( 2 ) +stretch_mode = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="NinePatchRect" type="NinePatchRect" parent="."] +material = ExtResource( 4 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +texture = ExtResource( 2 ) +region_rect = Rect2( 0, 0, 16, 16 ) +patch_margin_left = 4 +patch_margin_top = 4 +patch_margin_right = 4 +patch_margin_bottom = 5 +axis_stretch_horizontal = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Margin" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 10.0 +margin_top = 10.0 +margin_right = -10.0 +margin_bottom = -10.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Container" type="VBoxContainer" parent="Margin"] +material = ExtResource( 4 ) +margin_right = 293.0 +margin_bottom = 104.0 +grow_horizontal = 2 +grow_vertical = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="EnergyBox" type="VBoxContainer" parent="Margin/Container"] +material = ExtResource( 4 ) +margin_right = 293.0 +margin_bottom = 104.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="CurrentSource" type="HBoxContainer" parent="Margin/Container/EnergyBox"] +margin_top = 21.0 +margin_right = 293.0 +margin_bottom = 39.0 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="Margin/Container/EnergyBox/CurrentSource"] +material = ExtResource( 4 ) +margin_right = 106.0 +margin_bottom = 18.0 +mouse_filter = 1 +theme = ExtResource( 3 ) +text = "Available power" + +[node name="Value" type="Label" parent="Margin/Container/EnergyBox/CurrentSource"] +material = ExtResource( 4 ) +margin_left = 116.0 +margin_right = 293.0 +margin_bottom = 18.0 +mouse_filter = 1 +size_flags_horizontal = 3 +theme = ExtResource( 3 ) +custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 ) +text = "2A.01/10" +align = 2 + +[node name="CurrentSink" type="HBoxContainer" parent="Margin/Container/EnergyBox"] +margin_top = 43.0 +margin_right = 293.0 +margin_bottom = 61.0 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="Margin/Container/EnergyBox/CurrentSink"] +material = ExtResource( 4 ) +margin_right = 130.0 +margin_bottom = 18.0 +mouse_filter = 1 +theme = ExtResource( 3 ) +text = "Current power load" + +[node name="Value" type="Label" parent="Margin/Container/EnergyBox/CurrentSink"] +material = ExtResource( 4 ) +margin_left = 140.0 +margin_right = 293.0 +margin_bottom = 18.0 +mouse_filter = 1 +size_flags_horizontal = 3 +theme = ExtResource( 3 ) +custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 ) +text = "0A.00/00" +align = 2 + +[node name="CurrentAlerts" type="HBoxContainer" parent="Margin/Container/EnergyBox"] +margin_top = 65.0 +margin_right = 293.0 +margin_bottom = 83.0 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="Margin/Container/EnergyBox/CurrentAlerts"] +material = ExtResource( 4 ) +margin_right = 130.0 +margin_bottom = 18.0 +mouse_filter = 1 +theme = ExtResource( 3 ) +text = "Unpowered devices" + +[node name="Value" type="Label" parent="Margin/Container/EnergyBox/CurrentAlerts"] +material = ExtResource( 4 ) +margin_left = 140.0 +margin_right = 293.0 +margin_bottom = 18.0 +mouse_filter = 1 +size_flags_horizontal = 3 +theme = ExtResource( 3 ) +custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 ) +text = "0A.00/00" +align = 2 + +[node name="Button" type="Button" parent="Margin/Container"] +visible = false +material = ExtResource( 4 ) +margin_top = 80.0 +margin_right = 293.0 +margin_bottom = 104.0 +theme = ExtResource( 3 ) +text = "Open usage monitor" +[connection signal="pressed" from="Margin/Container/Button" to="." method="_map_button_pressed"] diff --git a/Actors/Objects/Door/Door.tscn b/Actors/Objects/Door/Door.tscn index d090797..529d97d 100644 --- a/Actors/Objects/Door/Door.tscn +++ b/Actors/Objects/Door/Door.tscn @@ -46,6 +46,7 @@ radius = 18.0 [node name="Door" type="StaticBody2D"] input_pickable = true +collision_layer = 17 script = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/Actors/Player/Player.gd b/Actors/Player/Player.gd index 29fdbe3..7c4a84c 100644 --- a/Actors/Player/Player.gd +++ b/Actors/Player/Player.gd @@ -29,13 +29,14 @@ func _ready(): func _physics_process(delta): var motion = Vector2.ZERO if is_network_master(): - motion = Vector2( - Input.get_action_strength("ui_right")-Input.get_action_strength("ui_left"), - Input.get_action_strength("ui_down")-Input.get_action_strength("ui_up")) + if not scene.writing: + motion = Vector2( + Input.get_action_strength("ui_right")-Input.get_action_strength("ui_left"), + Input.get_action_strength("ui_down")-Input.get_action_strength("ui_up")) # Check sprinting var speed = BASE_SPEED - if Input.is_action_pressed("sprint"): + if Input.is_action_pressed("sprint") and not scene.writing: if motion.length() > EPSILON and stamina > 0: speed_boost += BOOST_COEFF * delta * ease(stamina/MAX_STAMINA, 1.1) stamina -= delta diff --git a/Actors/Systems/Area/AreaProbe.gd b/Actors/Systems/Area/AreaProbe.gd new file mode 100644 index 0000000..cefb311 --- /dev/null +++ b/Actors/Systems/Area/AreaProbe.gd @@ -0,0 +1,117 @@ +tool + +extends Node2D + +class_name ProbeArea + +export(String) var area_name +export(NodePath) var wall_tilemap +export(NodePath) var base_tilemap + +var debug_font = preload("res://Graphics/UI/uifont.tres") + +const AREA_LAYER_ID = 16 + +onready var walls = get_node(wall_tilemap) as TileMap +onready var base = get_node(base_tilemap) as TileMap +onready var physics = get_world_2d().direct_space_state +onready var map = walls.get_parent() as GameMap + +const TILE_SIZE = 32 + +var cells = {} +var bounds = {} + +func _ready(): + scout() + update() + +func _physics_process(delta): + if Engine.editor_hint: + update() + +func scout(): + # Reset lists + cells = {} + bounds = {} + # Get origin and immediate neighbour of probe + var origin = Vector2(floor(position.x / TILE_SIZE), floor(position.y / TILE_SIZE)) + cells[origin] = true + var queue = get_neighbours(origin) + # Use children probes for extra areas + for child in get_children(): + var child_origin = Vector2(floor((position.x + child.position.x) / TILE_SIZE), floor((position.y + child.position.y) / TILE_SIZE)) + cells[child_origin] = true + for neighbour in get_neighbours(child_origin): + queue.push_front(neighbour) + # Depth-first search + while not queue.empty(): + var current = queue.pop_front() + # Have we checked this already? + if not is_valid(current): + continue + var wall_tile = walls.get_cellv(current) + if wall_tile == -1: + var objects = physics.intersect_point(current * TILE_SIZE + Vector2.ONE * TILE_SIZE / 2.0, 1, [], AREA_LAYER_ID) + if objects.size() > 0: + bounds[current] = true + else: + cells[current] = true + for neighbour in get_neighbours(current): + queue.push_front(neighbour) + else: + bounds[current] = true + # Join walls + var joined = [] + for cell in bounds: + var sides = [ + [Vector2(cell.x, cell.y-1),Vector2(cell.x, cell.y+1)], + [Vector2(cell.x-1, cell.y),Vector2(cell.x+1, cell.y)], + ] + for side_pair in sides: + if cells.has(side_pair[0]) and cells.has(side_pair[1]): + # This bound is joined at one side, make it a cell and not a bound + joined.push_back(cell) + for wall in joined: + bounds.erase(wall) + cells[wall] = true + +func is_valid(cell: Vector2) -> bool: + # Have we checked this already? + if cells.has(cell) or bounds.has(cell): + return false + # Is it a valid tile for an area + return base.get_cellv(cell) != -1 + +func get_neighbours(cell: Vector2) -> Array: + var neighbours = [ + Vector2(cell.x-1, cell.y-1), Vector2(cell.x, cell.y-1), Vector2(cell.x+1, cell.y-1), + Vector2(cell.x-1, cell.y), Vector2(cell.x+1, cell.y), + Vector2(cell.x-1, cell.y+1), Vector2(cell.x, cell.y+1), Vector2(cell.x+1, cell.y+1) + ] + var out = [] + for neighbour in neighbours: + # Have we checked this already? + if not is_valid(neighbour): + continue + out.push_back(neighbour) + return out + +func _draw(): + if map == null or not map.debug_areas: + return + var origin = Vector2(floor(position.x / TILE_SIZE), floor(position.y / TILE_SIZE)) + var draw_origin = origin * TILE_SIZE - position + var rect_size = Vector2.ONE * TILE_SIZE + draw_rect(Rect2(draw_origin, rect_size), Color.red, false, 2) + draw_string(debug_font, Vector2.ZERO, area_name, Color.blue) + for child in get_children(): + var child_origin = Vector2(floor(child.position.x / TILE_SIZE), floor(child.position.y / TILE_SIZE)) + draw_rect(Rect2(draw_origin + child_origin * TILE_SIZE, rect_size), Color.orange, false, 2) + draw_string(debug_font, child.position, area_name + "/" + child.name, Color.blue) + for wall in bounds: + draw_rect(Rect2(wall * TILE_SIZE - position + Vector2.ONE * (TILE_SIZE / 2.0 - TILE_SIZE / 4.0), rect_size/2.0), Color(0,0.5,1,0.5)) + +func _area_moved(): + scout() + update() diff --git a/Actors/Systems/Area/AreaProbe.tscn b/Actors/Systems/Area/AreaProbe.tscn new file mode 100644 index 0000000..e43bb33 --- /dev/null +++ b/Actors/Systems/Area/AreaProbe.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Actors/Systems/Area/AreaProbe.gd" type="Script" id=1] + +[node name="AreaProbe" type="Sprite"] +script = ExtResource( 1 ) +[connection signal="item_rect_changed" from="." to="." method="_area_moved"] diff --git a/Actors/Systems/Electricity/PowerNetwork.gd b/Actors/Systems/Electricity/PowerNetwork.gd index 7d3f67f..09d440b 100644 --- a/Actors/Systems/Electricity/PowerNetwork.gd +++ b/Actors/Systems/Electricity/PowerNetwork.gd @@ -9,6 +9,7 @@ var sockets = [] var total_source = 0 var total_usage = 0 +var unpowered = 0 var debugColor = Color.cyan @@ -67,6 +68,7 @@ func _physics_process(_delta: float) -> void: sources.append(manager) # Update manager stats var available_supply = total_source + unpowered = 0 for sink in sinks: # Check if item can be powered this cycle if sink.power_usage > 0: @@ -77,6 +79,7 @@ func _physics_process(_delta: float) -> void: else: if sink.powered: sink.rpc("set_powered", false) + unpowered += 1 # Update available power to sinks for sink in sinks: sink.available = available_supply diff --git a/Classes/Coordinates.gd b/Classes/Coordinates.gd index ea92303..97bc2ec 100644 --- a/Classes/Coordinates.gd +++ b/Classes/Coordinates.gd @@ -25,6 +25,6 @@ static func to_letter(num: int) -> String: var out = "" var base = letters.length() while num > 0: - out += letters.substr(num % base, 1) + out = letters.substr(num % base, 1) + out num /= base return out diff --git a/Graphics/UI/iosevka-aile-bold.ttf b/Graphics/UI/iosevka-aile-bold.ttf new file mode 100644 index 0000000..1dceaec Binary files /dev/null and b/Graphics/UI/iosevka-aile-bold.ttf differ diff --git a/Graphics/UI/iosevka-aile-bolditalic.ttf b/Graphics/UI/iosevka-aile-bolditalic.ttf new file mode 100644 index 0000000..3f3dfe5 Binary files /dev/null and b/Graphics/UI/iosevka-aile-bolditalic.ttf differ diff --git a/Graphics/UI/iosevka-aile-italic.ttf b/Graphics/UI/iosevka-aile-italic.ttf new file mode 100644 index 0000000..be1e25b Binary files /dev/null and b/Graphics/UI/iosevka-aile-italic.ttf differ diff --git a/Graphics/tgstation/tcomm.png b/Graphics/tgstation/tcomm.png new file mode 100644 index 0000000..945bee2 Binary files /dev/null and b/Graphics/tgstation/tcomm.png differ diff --git a/Graphics/tgstation/tcomm.png.import b/Graphics/tgstation/tcomm.png.import new file mode 100644 index 0000000..02670ac --- /dev/null +++ b/Graphics/tgstation/tcomm.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/tcomm.png-d10359105f84709691a87ffd8437229d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Graphics/tgstation/tcomm.png" +dest_files=[ "res://.import/tcomm.png-d10359105f84709691a87ffd8437229d.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/Scenes/Game.gd b/Scenes/Game.gd index 42059b4..7264ae4 100644 --- a/Scenes/Game.gd +++ b/Scenes/Game.gd @@ -9,13 +9,15 @@ onready var world = $world onready var systems = $systems onready var netgame = $"/root/Multiplayer" +var writing = false + func _ready() -> void: randomize() ui.connect("command", world, "process_command") if netgame.hosting: world.load_map(netgame.get_current_map()) world.map.current_ship_position = Vector2(randf() * 1e4, randf() * 1e4) - world.map.current_ship_target = null + world.map.current_ship_target = world.map.current_ship_position + Vector2(randf() * 1e2, randf() * 1e2) rpc("spawn_player", 1) else: world.load_map(GameWorld.Map.EMPTY) diff --git a/Scenes/Global/Multiplayer.gd b/Scenes/Global/Multiplayer.gd index 9ccfd4d..db0c9de 100644 --- a/Scenes/Global/Multiplayer.gd +++ b/Scenes/Global/Multiplayer.gd @@ -94,6 +94,7 @@ func host(): bind_events() var peer = NetworkedMultiplayerENet.new() + peer.compression_mode = NetworkedMultiplayerENet.COMPRESS_FASTLZ var server_res = peer.create_server(port, MAX_PLAYERS) if server_res != OK: match server_res: diff --git a/Scenes/Map.gd b/Scenes/Map.gd index 493de6f..ac3dded 100644 --- a/Scenes/Map.gd +++ b/Scenes/Map.gd @@ -3,6 +3,8 @@ extends Node2D class_name GameMap +var debug_areas = false + var ship_direction = 0 var ship_speed = 0 diff --git a/Scenes/Maps/odyssey.tscn b/Scenes/Maps/odyssey.tscn index eef168f..db2c8a0 100644 --- a/Scenes/Maps/odyssey.tscn +++ b/Scenes/Maps/odyssey.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=17 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] @@ -7,6 +7,7 @@ [ext_resource path="res://Scenes/Map.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] +[ext_resource path="res://Actors/Systems/Area/AreaProbe.tscn" type="PackedScene" id=8] [ext_resource path="res://Graphics/tgstation/floor.tres" type="TileSet" id=9] [ext_resource path="res://Actors/Objects/Engine/Engine.tscn" type="PackedScene" id=10] [ext_resource path="res://Graphics/tgstation/base.tres" type="TileSet" id=11] @@ -46,7 +47,7 @@ cell_size = Vector2( 32, 32 ) cell_quadrant_size = 32 occluder_light_mask = -2147483647 format = 1 -tile_data = PoolIntArray( -655359, 1, 0, -655358, 1, 0, -655357, 1, 0, -655355, 1, 0, -655354, 1, 0, -655353, 1, 0, -524309, 1, 0, -524308, 1, 0, -524307, 1, 0, -524306, 1, 0, -524305, 1, 0, -524304, 1, 0, -524303, 1, 0, -524302, 1, 0, -524301, 1, 0, -524300, 1, 0, -524299, 1, 0, -524298, 1, 0, -524297, 1, 0, -524296, 1, 0, -524295, 1, 0, -524294, 1, 0, -524293, 1, 0, -524292, 1, 0, -524291, 1, 0, -524290, 1, 0, -524289, 1, 0, -589824, 1, 0, -589823, 1, 0, -589822, 1, 0, -589821, 1, 0, -589819, 1, 0, -589818, 1, 0, -589817, 1, 0, -458773, 1, 0, -458772, 1, 0, -458771, 1, 0, -458770, 1, 0, -458769, 1, 0, -458768, 1, 0, -458767, 1, 0, -458766, 1, 0, -458765, 1, 0, -458764, 1, 0, -458763, 1, 0, -458762, 1, 0, -458761, 1, 0, -458760, 1, 0, -458759, 1, 0, -458758, 1, 0, -458757, 1, 0, -458756, 1, 0, -458755, 1, 0, -458754, 1, 0, -458753, 1, 0, -524288, 1, 0, -524287, 1, 0, -524286, 1, 0, -524285, 1, 0, -524283, 1, 0, -524282, 1, 0, -524281, 1, 0, -393243, 1, 0, -393242, 1, 0, -393241, 1, 0, -393240, 1, 0, -393239, 1, 0, -393238, 1, 0, -393237, 1, 0, -393236, 1, 0, -393235, 1, 0, -393234, 1, 0, -393233, 1, 0, -393232, 1, 0, -393231, 1, 0, -393230, 1, 0, -393229, 1, 0, -393228, 1, 0, -393227, 1, 0, -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, -327707, 1, 0, -327706, 1, 0, -327705, 1, 0, -327704, 1, 0, -327703, 1, 0, -327702, 1, 0, -327701, 1, 0, -327700, 1, 0, -327699, 1, 0, -327698, 1, 0, -327697, 1, 0, -327696, 1, 0, -327695, 1, 0, -327694, 1, 0, -327693, 1, 0, -327692, 1, 0, -327691, 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, -262171, 1, 0, -262170, 1, 0, -262169, 1, 0, -262168, 1, 0, -262167, 1, 0, -262166, 1, 0, -262165, 1, 0, -262164, 1, 0, -262163, 1, 0, -262162, 1, 0, -262161, 1, 0, -262160, 1, 0, -262159, 1, 0, -262158, 1, 0, -262157, 1, 0, -262156, 1, 0, -262155, 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, -196638, 1, 0, -196637, 1, 0, -196636, 1, 0, -196635, 1, 0, -196634, 1, 0, -196633, 1, 0, -196632, 1, 0, -196631, 1, 0, -196630, 1, 0, -196629, 1, 0, -196628, 1, 0, -196627, 1, 0, -196626, 1, 0, -196625, 1, 0, -196624, 1, 0, -196623, 1, 0, -196622, 1, 0, -196621, 1, 0, -196620, 1, 0, -196619, 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, -131102, 1, 0, -131101, 1, 0, -131100, 1, 0, -131099, 1, 0, -131098, 1, 0, -131097, 1, 0, -131096, 1, 0, -131095, 1, 0, -131094, 1, 0, -131093, 1, 0, -131092, 1, 0, -131091, 1, 0, -131090, 1, 0, -131089, 1, 0, -131088, 1, 0, -131087, 1, 0, -131086, 1, 0, -131085, 1, 0, -131084, 1, 0, -131083, 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, -196583, 1, 0, -196582, 1, 0, -196581, 1, 0, -65566, 1, 0, -65565, 1, 0, -65564, 1, 0, -65563, 1, 0, -65562, 1, 0, -65561, 1, 0, -65560, 1, 0, -65559, 1, 0, -65558, 1, 0, -65557, 1, 0, -65556, 1, 0, -65555, 1, 0, -65554, 1, 0, -65553, 1, 0, -65552, 1, 0, -65551, 1, 0, -65550, 1, 0, -65549, 1, 0, -65548, 1, 0, -65547, 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, -131047, 1, 0, -131046, 1, 0, -131045, 1, 0, -131044, 1, 0, -30, 1, 0, -29, 1, 0, -28, 1, 0, -27, 1, 0, -26, 1, 0, -25, 1, 0, -24, 1, 0, -23, 1, 0, -22, 1, 0, -21, 1, 0, -20, 1, 0, -19, 1, 0, -18, 1, 0, -17, 1, 0, -16, 1, 0, -15, 1, 0, -14, 1, 0, -13, 1, 0, -12, 1, 0, -11, 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, -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, -65511, 1, 0, -65510, 1, 0, -65509, 1, 0, -65508, 1, 0, 65506, 1, 0, 65507, 1, 0, 65508, 1, 0, 65509, 1, 0, 65510, 1, 0, 65511, 1, 0, 65512, 1, 0, 65513, 1, 0, 65514, 1, 0, 65515, 1, 0, 65516, 1, 0, 65517, 1, 0, 65518, 1, 0, 65519, 1, 0, 65520, 1, 0, 65521, 1, 0, 65522, 1, 0, 65523, 1, 0, 65524, 1, 0, 65525, 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, 25, 1, 0, 26, 1, 0, 27, 1, 0, 28, 1, 0, 131042, 1, 0, 131043, 1, 0, 131044, 1, 0, 131045, 1, 0, 131046, 1, 0, 131047, 1, 0, 131048, 1, 0, 131049, 1, 0, 131050, 1, 0, 131051, 1, 0, 131052, 1, 0, 131053, 1, 0, 131054, 1, 0, 131055, 1, 0, 131056, 1, 0, 131057, 1, 0, 131058, 1, 0, 131059, 1, 0, 131060, 1, 0, 131061, 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, 65561, 1, 0, 65562, 1, 0, 65563, 1, 0, 65564, 1, 0, 196578, 1, 0, 196579, 1, 0, 196580, 1, 0, 196581, 1, 0, 196582, 1, 0, 196583, 1, 0, 196584, 1, 0, 196585, 1, 0, 196586, 1, 0, 196587, 1, 0, 196588, 1, 0, 196589, 1, 0, 196590, 1, 0, 196591, 1, 0, 196592, 1, 0, 196593, 1, 0, 196594, 1, 0, 196595, 1, 0, 196596, 1, 0, 196597, 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, 131097, 1, 0, 131098, 1, 0, 131099, 1, 0, 131100, 1, 0, 262114, 1, 0, 262115, 1, 0, 262116, 1, 0, 262117, 1, 0, 262118, 1, 0, 262119, 1, 0, 262120, 1, 0, 262121, 1, 0, 262122, 1, 0, 262123, 1, 0, 262124, 1, 0, 262125, 1, 0, 262126, 1, 0, 262127, 1, 0, 262128, 1, 0, 262129, 1, 0, 262130, 1, 0, 262131, 1, 0, 262132, 1, 0, 262133, 1, 0, 262134, 1, 0, 262135, 1, 0, 262136, 1, 0, 262137, 1, 0, 262138, 1, 0, 262139, 1, 0, 262140, 1, 0, 262141, 1, 0, 262142, 1, 0, 262143, 1, 0, 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 196621, 1, 0, 196622, 1, 0, 196623, 1, 0, 196624, 1, 0, 196625, 1, 0, 196626, 1, 0, 196627, 1, 0, 196628, 1, 0, 196629, 1, 0, 196630, 1, 0, 196631, 1, 0, 196632, 1, 0, 196633, 1, 0, 196634, 1, 0, 196635, 1, 0, 327650, 1, 0, 327651, 1, 0, 327652, 1, 0, 327653, 1, 0, 327654, 1, 0, 327655, 1, 0, 327656, 1, 0, 327657, 1, 0, 327658, 1, 0, 327659, 1, 0, 327660, 1, 0, 327661, 1, 0, 327662, 1, 0, 327663, 1, 0, 327664, 1, 0, 327665, 1, 0, 327666, 1, 0, 327667, 1, 0, 327668, 1, 0, 327669, 1, 0, 327670, 1, 0, 327671, 1, 0, 327672, 1, 0, 327673, 1, 0, 327674, 1, 0, 327675, 1, 0, 327676, 1, 0, 327677, 1, 0, 327678, 1, 0, 327679, 1, 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, 1, 0, 262158, 1, 0, 262159, 1, 0, 262160, 1, 0, 262161, 1, 0, 262162, 1, 0, 262163, 1, 0, 262164, 1, 0, 262165, 1, 0, 262166, 1, 0, 262167, 1, 0, 262168, 1, 0, 393189, 1, 0, 393190, 1, 0, 393191, 1, 0, 393192, 1, 0, 393193, 1, 0, 393194, 1, 0, 393195, 1, 0, 393196, 1, 0, 393197, 1, 0, 393198, 1, 0, 393199, 1, 0, 393200, 1, 0, 393201, 1, 0, 393202, 1, 0, 393203, 1, 0, 393204, 1, 0, 393205, 1, 0, 393206, 1, 0, 393207, 1, 0, 393208, 1, 0, 393209, 1, 0, 393210, 1, 0, 393211, 1, 0, 393212, 1, 0, 393213, 1, 0, 393214, 1, 0, 393215, 1, 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, 1, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 1, 0, 458725, 1, 0, 458726, 1, 0, 458727, 1, 0, 458728, 1, 0, 458729, 1, 0, 458730, 1, 0, 458731, 1, 0, 458732, 1, 0, 458733, 1, 0, 458734, 1, 0, 458735, 1, 0, 458736, 1, 0, 458737, 1, 0, 458738, 1, 0, 458739, 1, 0, 458740, 1, 0, 458741, 1, 0, 458742, 1, 0, 458743, 1, 0, 458744, 1, 0, 458745, 1, 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, 1, 0, 524261, 1, 0, 524262, 1, 0, 524263, 1, 0, 524264, 1, 0, 524265, 1, 0, 524266, 1, 0, 524267, 1, 0, 524268, 1, 0, 524269, 1, 0, 524270, 1, 0, 524271, 1, 0, 524272, 1, 0, 524273, 1, 0, 524274, 1, 0, 524275, 1, 0, 524276, 1, 0, 524277, 1, 0, 524278, 1, 0, 524279, 1, 0, 524280, 1, 0, 524281, 1, 0, 524282, 1, 0, 524283, 1, 0, 524284, 1, 0, 524285, 1, 0, 524286, 1, 0, 524287, 1, 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, 1, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 589803, 1, 0, 589804, 1, 0, 589805, 1, 0, 589806, 1, 0, 589807, 1, 0, 589808, 1, 0, 589809, 1, 0, 589810, 1, 0, 589811, 1, 0, 589812, 1, 0, 589813, 1, 0, 589814, 1, 0, 589815, 1, 0, 589816, 1, 0, 589817, 1, 0, 589818, 1, 0, 589819, 1, 0, 589820, 1, 0, 589821, 1, 0, 589822, 1, 0, 589823, 1, 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, 655339, 1, 0, 655340, 1, 0, 655341, 1, 0, 655342, 1, 0, 655343, 1, 0, 655344, 1, 0, 655345, 1, 0, 655346, 1, 0, 655347, 1, 0, 655348, 1, 0, 655349, 1, 0, 655350, 1, 0, 655351, 1, 0, 655352, 1, 0, 655353, 1, 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 ) +tile_data = PoolIntArray( -655359, 1, 0, -655358, 1, 0, -655357, 1, 0, -655355, 1, 0, -655354, 1, 0, -655353, 1, 0, -524309, 1, 0, -524308, 1, 0, -524307, 1, 0, -524306, 1, 0, -524305, 1, 0, -524304, 1, 0, -524303, 1, 0, -524302, 1, 0, -524301, 1, 0, -524300, 1, 0, -524299, 1, 0, -524298, 1, 0, -524297, 1, 0, -524296, 1, 0, -524295, 1, 0, -524294, 1, 0, -524293, 1, 0, -524292, 1, 0, -524291, 1, 0, -524290, 1, 0, -524289, 1, 0, -589824, 1, 0, -589823, 1, 0, -589822, 1, 0, -589821, 1, 0, -589819, 1, 0, -589818, 1, 0, -589817, 1, 0, -458773, 1, 0, -458772, 1, 0, -458771, 1, 0, -458770, 1, 0, -458769, 1, 0, -458768, 1, 0, -458767, 1, 0, -458766, 1, 0, -458765, 1, 0, -458764, 1, 0, -458763, 1, 0, -458762, 1, 0, -458761, 1, 0, -458760, 1, 0, -458759, 1, 0, -458758, 1, 0, -458757, 1, 0, -458756, 1, 0, -458755, 1, 0, -458754, 1, 0, -458753, 1, 0, -524288, 1, 0, -524287, 1, 0, -524286, 1, 0, -524285, 1, 0, -524284, 1, 0, -524283, 1, 0, -524282, 1, 0, -524281, 1, 0, -393243, 1, 0, -393242, 1, 0, -393241, 1, 0, -393240, 1, 0, -393239, 1, 0, -393238, 1, 0, -393237, 1, 0, -393236, 1, 0, -393235, 1, 0, -393234, 1, 0, -393233, 1, 0, -393232, 1, 0, -393231, 1, 0, -393230, 1, 0, -393229, 1, 0, -393228, 1, 0, -393227, 1, 0, -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, -327707, 1, 0, -327706, 1, 0, -327705, 1, 0, -327704, 1, 0, -327703, 1, 0, -327702, 1, 0, -327701, 1, 0, -327700, 1, 0, -327699, 1, 0, -327698, 1, 0, -327697, 1, 0, -327696, 1, 0, -327695, 1, 0, -327694, 1, 0, -327693, 1, 0, -327692, 1, 0, -327691, 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, -262171, 1, 0, -262170, 1, 0, -262169, 1, 0, -262168, 1, 0, -262167, 1, 0, -262166, 1, 0, -262165, 1, 0, -262164, 1, 0, -262163, 1, 0, -262162, 1, 0, -262161, 1, 0, -262160, 1, 0, -262159, 1, 0, -262158, 1, 0, -262157, 1, 0, -262156, 1, 0, -262155, 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, -196638, 1, 0, -196637, 1, 0, -196636, 1, 0, -196635, 1, 0, -196634, 1, 0, -196633, 1, 0, -196632, 1, 0, -196631, 1, 0, -196630, 1, 0, -196629, 1, 0, -196628, 1, 0, -196627, 1, 0, -196626, 1, 0, -196625, 1, 0, -196624, 1, 0, -196623, 1, 0, -196622, 1, 0, -196621, 1, 0, -196620, 1, 0, -196619, 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, -131102, 1, 0, -131101, 1, 0, -131100, 1, 0, -131099, 1, 0, -131098, 1, 0, -131097, 1, 0, -131096, 1, 0, -131095, 1, 0, -131094, 1, 0, -131093, 1, 0, -131092, 1, 0, -131091, 1, 0, -131090, 1, 0, -131089, 1, 0, -131088, 1, 0, -131087, 1, 0, -131086, 1, 0, -131085, 1, 0, -131084, 1, 0, -131083, 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, -196583, 1, 0, -196582, 1, 0, -196581, 1, 0, -65566, 1, 0, -65565, 1, 0, -65564, 1, 0, -65563, 1, 0, -65562, 1, 0, -65561, 1, 0, -65560, 1, 0, -65559, 1, 0, -65558, 1, 0, -65557, 1, 0, -65556, 1, 0, -65555, 1, 0, -65554, 1, 0, -65553, 1, 0, -65552, 1, 0, -65551, 1, 0, -65550, 1, 0, -65549, 1, 0, -65548, 1, 0, -65547, 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, -131047, 1, 0, -131046, 1, 0, -131045, 1, 0, -131044, 1, 0, -30, 1, 0, -29, 1, 0, -28, 1, 0, -27, 1, 0, -26, 1, 0, -25, 1, 0, -24, 1, 0, -23, 1, 0, -22, 1, 0, -21, 1, 0, -20, 1, 0, -19, 1, 0, -18, 1, 0, -17, 1, 0, -16, 1, 0, -15, 1, 0, -14, 1, 0, -13, 1, 0, -12, 1, 0, -11, 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, -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, -65511, 1, 0, -65510, 1, 0, -65509, 1, 0, -65508, 1, 0, 65506, 1, 0, 65507, 1, 0, 65508, 1, 0, 65509, 1, 0, 65510, 1, 0, 65511, 1, 0, 65512, 1, 0, 65513, 1, 0, 65514, 1, 0, 65515, 1, 0, 65516, 1, 0, 65517, 1, 0, 65518, 1, 0, 65519, 1, 0, 65520, 1, 0, 65521, 1, 0, 65522, 1, 0, 65523, 1, 0, 65524, 1, 0, 65525, 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, 25, 1, 0, 26, 1, 0, 27, 1, 0, 28, 1, 0, 131042, 1, 0, 131043, 1, 0, 131044, 1, 0, 131045, 1, 0, 131046, 1, 0, 131047, 1, 0, 131048, 1, 0, 131049, 1, 0, 131050, 1, 0, 131051, 1, 0, 131052, 1, 0, 131053, 1, 0, 131054, 1, 0, 131055, 1, 0, 131056, 1, 0, 131057, 1, 0, 131058, 1, 0, 131059, 1, 0, 131060, 1, 0, 131061, 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, 65561, 1, 0, 65562, 1, 0, 65563, 1, 0, 65564, 1, 0, 196578, 1, 0, 196579, 1, 0, 196580, 1, 0, 196581, 1, 0, 196582, 1, 0, 196583, 1, 0, 196584, 1, 0, 196585, 1, 0, 196586, 1, 0, 196587, 1, 0, 196588, 1, 0, 196589, 1, 0, 196590, 1, 0, 196591, 1, 0, 196592, 1, 0, 196593, 1, 0, 196594, 1, 0, 196595, 1, 0, 196596, 1, 0, 196597, 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, 131097, 1, 0, 131098, 1, 0, 131099, 1, 0, 131100, 1, 0, 262114, 1, 0, 262115, 1, 0, 262116, 1, 0, 262117, 1, 0, 262118, 1, 0, 262119, 1, 0, 262120, 1, 0, 262121, 1, 0, 262122, 1, 0, 262123, 1, 0, 262124, 1, 0, 262125, 1, 0, 262126, 1, 0, 262127, 1, 0, 262128, 1, 0, 262129, 1, 0, 262130, 1, 0, 262131, 1, 0, 262132, 1, 0, 262133, 1, 0, 262134, 1, 0, 262135, 1, 0, 262136, 1, 0, 262137, 1, 0, 262138, 1, 0, 262139, 1, 0, 262140, 1, 0, 262141, 1, 0, 262142, 1, 0, 262143, 1, 0, 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196611, 1, 0, 196612, 1, 0, 196613, 1, 0, 196614, 1, 0, 196615, 1, 0, 196616, 1, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 1, 0, 196621, 1, 0, 196622, 1, 0, 196623, 1, 0, 196624, 1, 0, 196625, 1, 0, 196626, 1, 0, 196627, 1, 0, 196628, 1, 0, 196629, 1, 0, 196630, 1, 0, 196631, 1, 0, 196632, 1, 0, 196633, 1, 0, 196634, 1, 0, 196635, 1, 0, 327650, 1, 0, 327651, 1, 0, 327652, 1, 0, 327653, 1, 0, 327654, 1, 0, 327655, 1, 0, 327656, 1, 0, 327657, 1, 0, 327658, 1, 0, 327659, 1, 0, 327660, 1, 0, 327661, 1, 0, 327662, 1, 0, 327663, 1, 0, 327664, 1, 0, 327665, 1, 0, 327666, 1, 0, 327667, 1, 0, 327668, 1, 0, 327669, 1, 0, 327670, 1, 0, 327671, 1, 0, 327672, 1, 0, 327673, 1, 0, 327674, 1, 0, 327675, 1, 0, 327676, 1, 0, 327677, 1, 0, 327678, 1, 0, 327679, 1, 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, 1, 0, 262158, 1, 0, 262159, 1, 0, 262160, 1, 0, 262161, 1, 0, 262162, 1, 0, 262163, 1, 0, 262164, 1, 0, 262165, 1, 0, 262166, 1, 0, 262167, 1, 0, 262168, 1, 0, 393189, 1, 0, 393190, 1, 0, 393191, 1, 0, 393192, 1, 0, 393193, 1, 0, 393194, 1, 0, 393195, 1, 0, 393196, 1, 0, 393197, 1, 0, 393198, 1, 0, 393199, 1, 0, 393200, 1, 0, 393201, 1, 0, 393202, 1, 0, 393203, 1, 0, 393204, 1, 0, 393205, 1, 0, 393206, 1, 0, 393207, 1, 0, 393208, 1, 0, 393209, 1, 0, 393210, 1, 0, 393211, 1, 0, 393212, 1, 0, 393213, 1, 0, 393214, 1, 0, 393215, 1, 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, 1, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 1, 0, 458725, 1, 0, 458726, 1, 0, 458727, 1, 0, 458728, 1, 0, 458729, 1, 0, 458730, 1, 0, 458731, 1, 0, 458732, 1, 0, 458733, 1, 0, 458734, 1, 0, 458735, 1, 0, 458736, 1, 0, 458737, 1, 0, 458738, 1, 0, 458739, 1, 0, 458740, 1, 0, 458741, 1, 0, 458742, 1, 0, 458743, 1, 0, 458744, 1, 0, 458745, 1, 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, 1, 0, 524261, 1, 0, 524262, 1, 0, 524263, 1, 0, 524264, 1, 0, 524265, 1, 0, 524266, 1, 0, 524267, 1, 0, 524268, 1, 0, 524269, 1, 0, 524270, 1, 0, 524271, 1, 0, 524272, 1, 0, 524273, 1, 0, 524274, 1, 0, 524275, 1, 0, 524276, 1, 0, 524277, 1, 0, 524278, 1, 0, 524279, 1, 0, 524280, 1, 0, 524281, 1, 0, 524282, 1, 0, 524283, 1, 0, 524284, 1, 0, 524285, 1, 0, 524286, 1, 0, 524287, 1, 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, 1, 0, 458766, 1, 0, 458767, 1, 0, 458768, 1, 0, 458769, 1, 0, 458770, 1, 0, 458771, 1, 0, 589803, 1, 0, 589804, 1, 0, 589805, 1, 0, 589806, 1, 0, 589807, 1, 0, 589808, 1, 0, 589809, 1, 0, 589810, 1, 0, 589811, 1, 0, 589812, 1, 0, 589813, 1, 0, 589814, 1, 0, 589815, 1, 0, 589816, 1, 0, 589817, 1, 0, 589818, 1, 0, 589819, 1, 0, 589820, 1, 0, 589821, 1, 0, 589822, 1, 0, 589823, 1, 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, 655339, 1, 0, 655340, 1, 0, 655341, 1, 0, 655342, 1, 0, 655343, 1, 0, 655344, 1, 0, 655345, 1, 0, 655346, 1, 0, 655347, 1, 0, 655348, 1, 0, 655349, 1, 0, 655350, 1, 0, 655351, 1, 0, 655352, 1, 0, 655353, 1, 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 ) [node name="cables" type="TileMap" parent="."] z_index = 2 @@ -416,4 +417,64 @@ __meta__ = { z_index = 999 [node name="SpawnpointPlayer" parent="pois" instance=ExtResource( 15 )] -position = Vector2( -592, 240 ) +position = Vector2( 720, 16 ) + +[node name="areas" type="Node2D" parent="."] + +[node name="Bridge" parent="areas" instance=ExtResource( 8 )] +position = Vector2( 752, 16 ) +z_index = 100 +area_name = "Bridge" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Docking" parent="areas" instance=ExtResource( 8 )] +position = Vector2( 128, -176 ) +z_index = 100 +area_name = "Docking" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Port1" type="Node2D" parent="areas/Docking"] +position = Vector2( -48, -96 ) + +[node name="Port2" type="Node2D" parent="areas/Docking"] +position = Vector2( 80, -96 ) + +[node name="Medbay" parent="areas" instance=ExtResource( 8 )] +position = Vector2( 464, 144 ) +z_index = 100 +area_name = "Medical" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Bar" parent="areas" instance=ExtResource( 8 )] +position = Vector2( -208, 176 ) +z_index = 100 +area_name = "Bar" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Kitchen" type="Node2D" parent="areas/Bar"] +position = Vector2( 192, 0 ) + +[node name="Engine" parent="areas" instance=ExtResource( 8 )] +position = Vector2( -784, 16 ) +z_index = 100 +area_name = "Engine room" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Lounge" parent="areas" instance=ExtResource( 8 )] +position = Vector2( -432, 176 ) +z_index = 100 +area_name = "Lounge" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") + +[node name="Cryostorage" parent="areas" instance=ExtResource( 8 )] +position = Vector2( -592, 176 ) +z_index = 100 +area_name = "Cryo-storage" +wall_tilemap = NodePath("../../walls") +base_tilemap = NodePath("../../base") diff --git a/Scenes/UI.gd b/Scenes/UI.gd index bc33c64..58c9949 100644 --- a/Scenes/UI.gd +++ b/Scenes/UI.gd @@ -1,24 +1,39 @@ extends Control +class_name GameUI + signal command(command) enum ServerMenuItem { - SERVER_INFO + ServerInfo +} + +enum PopupName { + SpaceMap, + EnergyUsage } func _ready() -> void: # Add options to menu buttons var serverMenu = $Menu/Margins/Grid/Server.get_popup() serverMenu.connect("id_pressed", self, "_server_option_chosen") - serverMenu.add_item("Server info", ServerMenuItem.SERVER_INFO) + serverMenu.add_item("Server info", ServerMenuItem.ServerInfo) func _server_option_chosen(id) -> void: match id: - ServerMenuItem.SERVER_INFO: + ServerMenuItem.ServerInfo: $ServerInfoPopup.popup_centered() -func open_map_popup() -> void: - $MapPopup.popup_centered_ratio() +func open_popup(map_name) -> void: + match map_name: + PopupName.SpaceMap: + $MapPopup.popup_centered_ratio() + PopupName.EnergyUsage: + pass -func close_map_popup() -> void: - $MapPopup.visible = false +func close_popup(map_name) -> void: + match map_name: + PopupName.SpaceMap: + $MapPopup.visible = false + PopupName.EnergyUsage: + pass diff --git a/Scenes/UI.tscn b/Scenes/UI.tscn index f2a42c5..328f009 100644 --- a/Scenes/UI.tscn +++ b/Scenes/UI.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://Scenes/UI/SpaceMap.tscn" type="PackedScene" id=1] [ext_resource path="res://Scenes/UI.gd" type="Script" id=2] [ext_resource path="res://Scenes/UI/Widgets/ResizablePanel.tscn" type="PackedScene" id=3] +[ext_resource path="res://Scenes/UI/ServerInfo.tscn" type="PackedScene" id=4] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.133333, 0.12549, 0.203922, 0.705882 ) @@ -31,8 +32,10 @@ __meta__ = { [node name="MapPopup" parent="." instance=ExtResource( 1 )] [node name="Logs" parent="." instance=ExtResource( 3 )] -margin_right = 392.0 -margin_bottom = 256.0 +margin_left = 10.0 +margin_top = 10.0 +margin_right = -857.0 +margin_bottom = -566.0 title = "Log" [node name="Menu" type="PanelContainer" parent="."] @@ -83,13 +86,8 @@ margin_right = 144.0 margin_bottom = 20.0 text = "Preferences" -[node name="ServerInfoPopup" type="WindowDialog" parent="."] -margin_left = -278.587 -margin_top = 58.4538 -margin_right = -22.587 -margin_bottom = 226.454 -window_title = "Server info" -resizable = true -__meta__ = { -"_edit_use_anchors_": false -} +[node name="ServerInfoPopup" parent="." instance=ExtResource( 4 )] +margin_left = 31.2773 +margin_top = 46.9222 +margin_right = 287.277 +margin_bottom = 214.923 diff --git a/Scenes/UI/ServerInfo.gd b/Scenes/UI/ServerInfo.gd new file mode 100644 index 0000000..ec424ea --- /dev/null +++ b/Scenes/UI/ServerInfo.gd @@ -0,0 +1,6 @@ +extends WindowDialog + +func _physics_process(delta): + if not visible: + return + multiplayer diff --git a/Scenes/UI/ServerInfo.tscn b/Scenes/UI/ServerInfo.tscn new file mode 100644 index 0000000..60457bf --- /dev/null +++ b/Scenes/UI/ServerInfo.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://Scenes/UI/ServerInfo.gd" type="Script" id=1] + +[node name="ServerInfoPopup" type="WindowDialog"] +visible = true +margin_left = 19.9312 +margin_top = 34.9087 +margin_right = 275.931 +margin_bottom = 202.909 +window_title = "Server info" +resizable = true +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ItemList" type="ItemList" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 diff --git a/Scenes/UI/Widgets/ResizablePanel.gd b/Scenes/UI/Widgets/ResizablePanel.gd index 3fcfe8c..3113d6c 100644 --- a/Scenes/UI/Widgets/ResizablePanel.gd +++ b/Scenes/UI/Widgets/ResizablePanel.gd @@ -26,11 +26,22 @@ func _handle_resize(event): rect_size = last_origin + (event.global_position - last_mouse) func _input(event): - if dragging and event is InputEventMouseButton and not event.pressed: - dragging = false - if resizing and event is InputEventMouseButton and not event.pressed: - resizing = false + if event is InputEventMouseButton: + if dragging and not event.pressed: + dragging = false + if resizing and not event.pressed: + resizing = false + if not chat_bar_focus: + $LineEdit.release_focus() func set_title(val): title = val $DragHandle/Label.text = title + +var chat_bar_focus = false + +func _chat_bar_status(editing): + $"/root/scene".writing = editing + +func _chat_bar_focus(entered): + chat_bar_focus = entered diff --git a/Scenes/UI/Widgets/ResizablePanel.tscn b/Scenes/UI/Widgets/ResizablePanel.tscn index 433a991..e8c8fc0 100644 --- a/Scenes/UI/Widgets/ResizablePanel.tscn +++ b/Scenes/UI/Widgets/ResizablePanel.tscn @@ -1,6 +1,10 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://Scenes/UI/Widgets/ResizablePanel.gd" type="Script" id=1] +[ext_resource path="res://Graphics/UI/iosevka-aile-regular.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://Graphics/UI/iosevka-aile-bold.ttf" type="DynamicFontData" id=3] +[ext_resource path="res://Graphics/UI/iosevka-aile-italic.ttf" type="DynamicFontData" id=4] +[ext_resource path="res://Graphics/UI/iosevka-aile-bolditalic.ttf" type="DynamicFontData" id=5] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 0.133333, 0.12549, 0.203922, 0.705882 ) @@ -15,11 +19,29 @@ corner_radius_top_right = 4 corner_radius_bottom_right = 4 corner_radius_bottom_left = 4 +[sub_resource type="DynamicFont" id=2] +size = 14 +use_mipmaps = true +font_data = ExtResource( 5 ) + +[sub_resource type="DynamicFont" id=3] +size = 14 +use_mipmaps = true +font_data = ExtResource( 4 ) + +[sub_resource type="DynamicFont" id=4] +size = 14 +use_mipmaps = true +font_data = ExtResource( 3 ) + +[sub_resource type="DynamicFont" id=5] +size = 14 +use_mipmaps = true +font_data = ExtResource( 2 ) + [node name="ResizablePanel" type="Panel"] -margin_left = 10.0 -margin_top = 10.0 -margin_right = 376.0 -margin_bottom = 336.0 +anchor_right = 1.0 +anchor_bottom = 1.0 custom_styles/panel = SubResource( 1 ) script = ExtResource( 1 ) __meta__ = { @@ -65,5 +87,38 @@ size_flags_vertical = 0 __meta__ = { "_edit_use_anchors_": false } + +[node name="RichTextLabel" type="RichTextLabel" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 10.0 +margin_top = 40.0 +margin_right = -10.0 +margin_bottom = -10.0 +focus_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 3 +custom_fonts/bold_italics_font = SubResource( 2 ) +custom_fonts/italics_font = SubResource( 3 ) +custom_fonts/bold_font = SubResource( 4 ) +custom_fonts/normal_font = SubResource( 5 ) +selection_enabled = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="LineEdit" type="LineEdit" parent="."] +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_bottom = 24.0 +focus_mode = 1 +__meta__ = { +"_edit_use_anchors_": false +} [connection signal="gui_input" from="DragHandle" to="." method="_handle_drag"] [connection signal="gui_input" from="ResizeHandle" to="." method="_handle_resize"] +[connection signal="focus_entered" from="LineEdit" to="." method="_chat_bar_status" binds= [ true ]] +[connection signal="focus_exited" from="LineEdit" to="." method="_chat_bar_status" binds= [ false ]] +[connection signal="mouse_entered" from="LineEdit" to="." method="_chat_bar_focus" binds= [ true ]] +[connection signal="mouse_exited" from="LineEdit" to="." method="_chat_bar_focus" binds= [ false ]] diff --git a/addons/pnhelper/pngui.gd b/addons/pnhelper/pngui.gd index 3bee6f7..94026fb 100644 --- a/addons/pnhelper/pngui.gd +++ b/addons/pnhelper/pngui.gd @@ -49,3 +49,7 @@ func _make_socket(direction: String) -> void: socket.owner = map socket.global_position = node.global_position + offset socket.connectionPaths = [socket.get_path_to(node)] + +func _area_debug_modified(button_pressed): + var map = api.get_editor_interface().get_edited_scene_root() as GameMap + map.debug_areas = button_pressed diff --git a/addons/pnhelper/pngui.tscn b/addons/pnhelper/pngui.tscn index 1e23073..9a32817 100644 --- a/addons/pnhelper/pngui.tscn +++ b/addons/pnhelper/pngui.tscn @@ -31,33 +31,43 @@ text = "Make socket " [node name="Type" type="OptionButton" parent="Commands/MakeSocket"] margin_left = 88.0 -margin_right = 117.0 +margin_right = 142.0 margin_bottom = 20.0 +text = "SNK" +items = [ "SNK", null, false, 0, null, "SRC", null, false, 1, null, "BID", null, false, 2, null ] +selected = 0 [node name="Left" type="Button" parent="Commands/MakeSocket"] -margin_left = 121.0 -margin_right = 141.0 +margin_left = 146.0 +margin_right = 166.0 margin_bottom = 20.0 text = "<" [node name="Up" type="Button" parent="Commands/MakeSocket"] -margin_left = 145.0 -margin_right = 164.0 +margin_left = 170.0 +margin_right = 189.0 margin_bottom = 20.0 text = "^" [node name="Down" type="Button" parent="Commands/MakeSocket"] -margin_left = 168.0 -margin_right = 187.0 +margin_left = 193.0 +margin_right = 212.0 margin_bottom = 20.0 text = "v" [node name="Right" type="Button" parent="Commands/MakeSocket"] -margin_left = 191.0 -margin_right = 211.0 +margin_left = 216.0 +margin_right = 236.0 margin_bottom = 20.0 text = ">" + +[node name="DebugAreas" type="CheckBox" parent="Commands"] +margin_top = 24.0 +margin_right = 1280.0 +margin_bottom = 48.0 +text = "Show areas" [connection signal="pressed" from="Commands/MakeSocket/Left" to="." method="_make_socket" binds= [ "left" ]] [connection signal="pressed" from="Commands/MakeSocket/Up" to="." method="_make_socket" binds= [ "up" ]] [connection signal="pressed" from="Commands/MakeSocket/Down" to="." method="_make_socket" binds= [ "down" ]] [connection signal="pressed" from="Commands/MakeSocket/Right" to="." method="_make_socket" binds= [ "right" ]] +[connection signal="toggled" from="Commands/DebugAreas" to="." method="_area_debug_modified"] diff --git a/project.godot b/project.godot index 6a5f8c6..4d958d1 100644 --- a/project.godot +++ b/project.godot @@ -64,6 +64,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://Actors/Objects/Scanner/Scanner.gd" }, { +"base": "Control", +"class": "GameUI", +"language": "GDScript", +"path": "res://Scenes/UI.gd" +}, { "base": "Node2D", "class": "GameWorld", "language": "GDScript", @@ -119,6 +124,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://Actors/Systems/Electricity/PowerNetwork.gd" }, { +"base": "Node2D", +"class": "ProbeArea", +"language": "GDScript", +"path": "res://Actors/Systems/Area/AreaProbe.gd" +}, { "base": "Area2D", "class": "ProbeElectric", "language": "GDScript", @@ -161,6 +171,7 @@ _global_script_class_icons={ "GameObjectLightbulb": "", "GameObjectPowerStorage": "", "GameObjectScanner": "", +"GameUI": "", "GameWorld": "", "GotmDebug": "", "GotmFile": "", @@ -172,6 +183,7 @@ _global_script_class_icons={ "POI": "", "PowerManager": "", "PowerNetwork": "", +"ProbeArea": "", "ProbeElectric": "", "ResourceQueue": "", "UICommand": "", @@ -259,6 +271,7 @@ sprint={ 2d_physics/layer_2="Projectile" 2d_physics/layer_3="Electric" 2d_physics/layer_4="Actors" +2d_physics/layer_5="AreaBound" [rendering]