Add runtime map, Add current speed/dir to controlcomp

This commit is contained in:
Hamcha 2020-07-07 18:08:56 +02:00
parent dee8e3d29d
commit c5b48c1a8a
19 changed files with 325 additions and 36 deletions

View file

@ -5,7 +5,7 @@ extends StaticBody2D
class_name GameObjectComputer class_name GameObjectComputer
enum Direction { LEFT, RIGHT, UP, DOWN } enum Direction { LEFT, RIGHT, UP, DOWN }
enum ComputerType { ShipCommand, Comms, Medical, Research, ShipEngine, Atmos } enum ComputerType { ShipCommand, Comms, Medical, Research, Energy, ShipEngine, Atmos }
export(Direction) var direction = Direction.DOWN setget set_direction export(Direction) var direction = Direction.DOWN setget set_direction
export(ComputerType) var computer_type = ComputerType.ShipCommand setget set_type export(ComputerType) var computer_type = ComputerType.ShipCommand setget set_type
@ -30,10 +30,13 @@ func set_type(val):
screen_region_offset = Vector2(0, 64) screen_region_offset = Vector2(0, 64)
ComputerType.Research: ComputerType.Research:
screen_region_offset = Vector2(128, 0) screen_region_offset = Vector2(128, 0)
ComputerType.ShipEngine: ComputerType.Energy:
screen_region_offset = Vector2(128, 224) screen_region_offset = Vector2(128, 224)
ComputerType.Atmos: ComputerType.Atmos:
screen_region_offset = Vector2(128, 192)
ComputerType.ShipEngine:
screen_region_offset = Vector2(0, 256) screen_region_offset = Vector2(0, 256)
refresh_sprite() refresh_sprite()
func set_direction(dir): func set_direction(dir):
@ -45,15 +48,19 @@ func refresh_sprite():
Direction.DOWN: Direction.DOWN:
$computer.region_rect.position = Vector2(0, 0) $computer.region_rect.position = Vector2(0, 0)
$computer/screen.region_rect.position = screen_region_offset + Vector2(0, 0) $computer/screen.region_rect.position = screen_region_offset + Vector2(0, 0)
$computer/screen/Light2D.rotation = 0
Direction.UP: Direction.UP:
$computer.region_rect.position = Vector2(0, 32) $computer.region_rect.position = Vector2(0, 32)
$computer/screen.region_rect.position = screen_region_offset + Vector2(32, 0) $computer/screen.region_rect.position = screen_region_offset + Vector2(32, 0)
$computer/screen/Light2D.rotation = PI
Direction.LEFT: Direction.LEFT:
$computer.region_rect.position = Vector2(32, 32) $computer.region_rect.position = Vector2(32, 32)
$computer/screen.region_rect.position = screen_region_offset + Vector2(96, 0) $computer/screen.region_rect.position = screen_region_offset + Vector2(96, 0)
$computer/screen/Light2D.rotation = PI/2
Direction.RIGHT: Direction.RIGHT:
$computer.region_rect.position = Vector2(32, 0) $computer.region_rect.position = Vector2(32, 0)
$computer/screen.region_rect.position = screen_region_offset + Vector2(64, 0) $computer/screen.region_rect.position = screen_region_offset + Vector2(64, 0)
$computer/screen/Light2D.rotation = -PI/2
func manage_controls(show: bool): func manage_controls(show: bool):
match computer_type: match computer_type:
@ -65,7 +72,7 @@ func _input(event):
open = false open = false
$UIAnimation.play("fadeout") $UIAnimation.play("fadeout")
func _input_event(viewport, event, shape_idx): func _input_event(_viewport, event, _shape_idx):
if Engine.editor_hint: if Engine.editor_hint:
return return
if event is InputEventMouseButton and event.pressed and not open: if event is InputEventMouseButton and event.pressed and not open:

View file

@ -119,7 +119,7 @@ region_rect = Rect2( 0, 0, 32, 32 )
position = Vector2( 16, 16 ) position = Vector2( 16, 16 )
texture = ExtResource( 5 ) texture = ExtResource( 5 )
texture_scale = 0.5 texture_scale = 0.5
energy = 0.4 energy = 0.5
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 16, 16 ) position = Vector2( 16, 16 )

View file

@ -5,6 +5,12 @@ onready var scene = $"/root/scene" as GameInstance
func _ready(): func _ready():
pass pass
func _physics_process(delta):
var speed_str = "(" + str(round(scene.world.map.current_ship_speed)) + " u/s)"
$Container/VelocityBox/HBoxContainer/CurrentSpeed.text = speed_str
var dir_str = "(" + str(round(rad2deg(scene.world.map.current_ship_direction))) + " deg)"
$Container/DirectionBox/HBoxContainer/CurrentDirection.text = dir_str
func _ship_velocity_changed(value): func _ship_velocity_changed(value):
scene.process_command(UICommand.new(UICommand.CommandType.SetShipSpeed, [value])) scene.process_command(UICommand.new(UICommand.CommandType.SetShipSpeed, [value]))

View file

@ -64,7 +64,7 @@ __meta__ = {
[node name="VelocityBox" type="VBoxContainer" parent="Container"] [node name="VelocityBox" type="VBoxContainer" parent="Container"]
material = ExtResource( 4 ) material = ExtResource( 4 )
margin_right = 180.0 margin_right = 180.0
margin_bottom = 45.0 margin_bottom = 51.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
alignment = 1 alignment = 1
@ -72,20 +72,37 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="ShipVelocityLabel" type="Label" parent="Container/VelocityBox"] [node name="HBoxContainer" type="HBoxContainer" parent="Container/VelocityBox"]
material = ExtResource( 4 ) margin_top = 6.0
margin_top = 3.0
margin_right = 180.0 margin_right = 180.0
margin_bottom = 21.0 margin_bottom = 24.0
custom_constants/separation = 10
__meta__ = {
"_edit_use_anchors_": false
}
[node name="ShipVelocityLabel" type="Label" parent="Container/VelocityBox/HBoxContainer"]
material = ExtResource( 4 )
margin_right = 88.0
margin_bottom = 18.0
mouse_filter = 1 mouse_filter = 1
theme = ExtResource( 3 ) theme = ExtResource( 3 )
text = "Ship velocity" text = "Ship velocity"
[node name="CurrentSpeed" type="Label" parent="Container/VelocityBox/HBoxContainer"]
material = ExtResource( 4 )
margin_left = 98.0
margin_right = 98.0
margin_bottom = 18.0
mouse_filter = 1
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 )
[node name="HSlider" type="HSlider" parent="Container/VelocityBox"] [node name="HSlider" type="HSlider" parent="Container/VelocityBox"]
material = ExtResource( 4 ) material = ExtResource( 4 )
margin_top = 25.0 margin_top = 28.0
margin_right = 180.0 margin_right = 180.0
margin_bottom = 41.0 margin_bottom = 44.0
mouse_filter = 1 mouse_filter = 1
max_value = 1000.0 max_value = 1000.0
value = 1000.0 value = 1000.0
@ -94,9 +111,9 @@ ticks_on_borders = true
[node name="DirectionBox" type="VBoxContainer" parent="Container"] [node name="DirectionBox" type="VBoxContainer" parent="Container"]
material = ExtResource( 4 ) material = ExtResource( 4 )
margin_top = 65.0 margin_top = 71.0
margin_right = 180.0 margin_right = 180.0
margin_bottom = 110.0 margin_bottom = 122.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
alignment = 1 alignment = 1
@ -104,20 +121,33 @@ __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="ShipDirectionLabel" type="Label" parent="Container/DirectionBox"] [node name="HBoxContainer" type="HBoxContainer" parent="Container/DirectionBox"]
material = ExtResource( 4 ) margin_top = 6.0
margin_top = 3.0
margin_right = 180.0 margin_right = 180.0
margin_bottom = 21.0 margin_bottom = 24.0
[node name="ShipDirectionLabel" type="Label" parent="Container/DirectionBox/HBoxContainer"]
material = ExtResource( 4 )
margin_right = 94.0
margin_bottom = 18.0
mouse_filter = 1 mouse_filter = 1
theme = ExtResource( 3 ) theme = ExtResource( 3 )
text = "Ship direction" text = "Ship direction"
[node name="CurrentDirection" type="Label" parent="Container/DirectionBox/HBoxContainer"]
material = ExtResource( 4 )
margin_left = 98.0
margin_right = 98.0
margin_bottom = 18.0
mouse_filter = 1
theme = ExtResource( 3 )
custom_colors/font_color = Color( 0.494118, 0.52549, 0.737255, 1 )
[node name="HSlider" type="HSlider" parent="Container/DirectionBox"] [node name="HSlider" type="HSlider" parent="Container/DirectionBox"]
material = ExtResource( 4 ) material = ExtResource( 4 )
margin_top = 25.0 margin_top = 28.0
margin_right = 180.0 margin_right = 180.0
margin_bottom = 41.0 margin_bottom = 44.0
mouse_filter = 1 mouse_filter = 1
max_value = 360.0 max_value = 360.0
tick_count = 18 tick_count = 18

View file

@ -28,14 +28,16 @@ func _animation_finished():
# Disable collider # Disable collider
collision_layer = 16 collision_layer = 16
collision_mask = 16 collision_mask = 16
emit_signal("changed", true)
# Start timer for auto-close # Start timer for auto-close
$Timer.start() $Timer.start()
else: else:
# Enable collider # Enable collider
collision_mask = 1 collision_mask = 1
collision_layer = 1 collision_layer = 1
emit_signal("changed", false)
func _input_event(viewport, event, shape_idx): func _input_event(_viewport, event, _shape_idx):
# Check if we clicked the item # Check if we clicked the item
if event is InputEventMouseButton and event.pressed: if event is InputEventMouseButton and event.pressed:
# Must be in activation range # Must be in activation range

View file

@ -47,7 +47,7 @@ func refresh_sprite():
$ActivationRange.rotation = rot $ActivationRange.rotation = rot
func _input_event(viewport, event, shape_idx): func _input_event(_viewport, event, _shape_idx):
if Engine.editor_hint: if Engine.editor_hint:
return return
if event is InputEventMouseButton and event.pressed: if event is InputEventMouseButton and event.pressed:

View file

@ -46,7 +46,7 @@ func refresh_sprite():
$ActivationRange.rotation = rot $ActivationRange.rotation = rot
func _input_event(viewport, event, shape_idx): func _input_event(_viewport, event, _shape_idx):
if Engine.editor_hint: if Engine.editor_hint:
return return
if event is InputEventMouseButton and event.pressed: if event is InputEventMouseButton and event.pressed:

View file

@ -0,0 +1,3 @@
extends StaticBody2D
class_name GameObjectPowerStorage

View file

@ -0,0 +1,18 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://Actors/Objects/PowerStorage/PowerStorage.gd" type="Script" id=1]
[ext_resource path="res://Graphics/tgstation/smes.png" type="Texture" id=2]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 16, 16 )
[node name="StaticBody2D" type="StaticBody2D"]
script = ExtResource( 1 )
[node name="smes" type="Sprite" parent="."]
texture = ExtResource( 2 )
centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 16, 16 )
shape = SubResource( 1 )

View file

@ -11,8 +11,7 @@ var grip = 1.0
var stamina = MAX_STAMINA var stamina = MAX_STAMINA
var speed_boost = 0 var speed_boost = 0
export(NodePath) var mapNode onready var world = $"/root/scene/world" as GameWorld
onready var map = get_node(mapNode) as GameMap
export var is_controlled = false setget set_is_controlled export var is_controlled = false setget set_is_controlled
@ -50,8 +49,9 @@ func _physics_process(delta):
velocity = move_and_slide(velocity) velocity = move_and_slide(velocity)
# Check what tile I'm on # Check what tile I'm on
if world.map != null:
grip = 0.0 grip = 0.0
for tilemap in map.tilemaps: for tilemap in world.map.tilemaps:
var cell = tilemap.get_cellv(tilemap.world_to_map(transform.origin)) var cell = tilemap.get_cellv(tilemap.world_to_map(transform.origin))
if cell >= 0: if cell >= 0:
grip = 1.0 grip = 1.0

BIN
Graphics/tgstation/smes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/smes.png-984115b5d17ebe6f1b134f5f7587ddf0.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Graphics/tgstation/smes.png"
dest_files=[ "res://.import/smes.png-984115b5d17ebe6f1b134f5f7587ddf0.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

View file

@ -1,11 +1,11 @@
[gd_scene load_steps=7 format=2] [gd_scene load_steps=7 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]
[ext_resource path="res://Scenes/Game.gd" type="Script" id=5] [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/UI.gd" type="Script" id=6]
[ext_resource path="res://Scenes/Maps/runtime.tscn" type="PackedScene" id=7]
[node name="scene" type="Node"] [node name="scene" type="Node"]
script = ExtResource( 5 ) script = ExtResource( 5 )
@ -14,14 +14,13 @@ script = ExtResource( 5 )
scale = Vector2( 2, 2 ) scale = Vector2( 2, 2 )
script = ExtResource( 4 ) script = ExtResource( 4 )
player_path = NodePath("player") player_path = NodePath("player")
map_path = NodePath("map") map_path = NodePath("runtime")
[node name="map" parent="world" instance=ExtResource( 1 )] [node name="runtime" parent="world" instance=ExtResource( 7 )]
[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
mapNode = NodePath("../map")
is_controlled = true is_controlled = true
[node name="CanvasLayer" type="CanvasLayer" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."]

View file

@ -50,4 +50,4 @@ func set_engine_strength(val: float):
for child in $engines.get_children(): for child in $engines.get_children():
if child is GameObjectEngine: if child is GameObjectEngine:
var engine = child as GameObjectEngine var engine = child as GameObjectEngine
engine.strength = current_ship_speed engine.strength = val

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=2] [gd_scene load_steps=14 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]
@ -11,6 +11,7 @@
[ext_resource path="res://Graphics/tgstation/floor.tres" type="TileSet" id=9] [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://Actors/Objects/Engine/Engine.tscn" type="PackedScene" id=10]
[ext_resource path="res://Graphics/tgstation/base.tres" type="TileSet" id=11] [ext_resource path="res://Graphics/tgstation/base.tres" type="TileSet" id=11]
[ext_resource path="res://Actors/Objects/PowerStorage/PowerStorage.tscn" type="PackedScene" id=12]
[sub_resource type="CanvasItemMaterial" id=1] [sub_resource type="CanvasItemMaterial" id=1]
light_mode = 1 light_mode = 1
@ -153,6 +154,38 @@ position = Vector2( 576, 224 )
direction = 0 direction = 0
computer_type = 1 computer_type = 1
[node name="Computer2" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -192, 288 )
direction = 1
computer_type = 5
[node name="Computer4" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -192, 192 )
direction = 1
computer_type = 4
[node name="Computer" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -256, -160 )
direction = 1
computer_type = 4
[node name="Computer3" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -256, -128 )
direction = 1
computer_type = 5
[node name="SMES1" parent="objects" instance=ExtResource( 12 )]
position = Vector2( -320, -160 )
[node name="SMES2" parent="objects" instance=ExtResource( 12 )]
position = Vector2( -320, -128 )
[node name="SMES3" parent="objects" instance=ExtResource( 12 )]
position = Vector2( -320, -192 )
[node name="SMES4" parent="objects" instance=ExtResource( 12 )]
position = Vector2( -320, -96 )
[node name="lights" type="Node2D" parent="."] [node name="lights" type="Node2D" parent="."]
modulate = Color( 0.980392, 0.980392, 0.980392, 1 ) modulate = Color( 0.980392, 0.980392, 0.980392, 1 )
__meta__ = { __meta__ = {

10
Scenes/Maps/runtime.gd Normal file
View file

@ -0,0 +1,10 @@
extends GameMap
func _ready():
tilemaps = [
$base,
$cables,
$floor,
$walls
]
set_unlit(true)

142
Scenes/Maps/runtime.tscn Normal file
View file

@ -0,0 +1,142 @@
[gd_scene load_steps=12 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://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]
[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]
[ext_resource path="res://Actors/Objects/PowerStorage/PowerStorage.tscn" type="PackedScene" id=12]
[sub_resource type="CanvasItemMaterial" id=1]
light_mode = 1
[node name="map" type="Node2D"]
script = ExtResource( 5 )
[node name="darkness" type="CanvasModulate" parent="."]
visible = false
color = Color( 0, 0, 0, 1 )
[node name="editor" type="Node2D" parent="."]
[node name="deepspace" type="Sprite" parent="."]
material = SubResource( 1 )
texture = ExtResource( 7 )
region_enabled = true
region_rect = Rect2( 0, 0, 10000, 10000 )
__meta__ = {
"_edit_group_": true,
"_edit_lock_": true
}
[node name="base" type="TileMap" parent="."]
tile_set = ExtResource( 11 )
cell_size = Vector2( 32, 32 )
cell_quadrant_size = 32
occluder_light_mask = -2147483647
format = 1
tile_data = PoolIntArray( 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 0, 196609, 0, 0, 196610, 0, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0, 196617, 0, 0, 196618, 0, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 327677, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 0, 393214, 0, 0, 393215, 0, 0, 327680, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 0, 0, 327687, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 393223, 0, 0, 393224, 0, 0, 393225, 0, 0, 393226, 0, 0, 393227, 0, 0, 393228, 0, 0, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 0, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 0, 0, 524297, 0, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0 )
script = ExtResource( 3 )
extended_tilemap_node = NodePath("../1x1")
[node name="cables" type="TileMap" parent="."]
visible = false
tile_set = ExtResource( 1 )
cell_size = Vector2( 32, 32 )
cell_quadrant_size = 32
occluder_light_mask = -2147483647
format = 1
script = ExtResource( 3 )
extended_tilemap_node = NodePath("../1x1")
[node name="floor" type="TileMap" parent="."]
tile_set = ExtResource( 9 )
cell_size = Vector2( 32, 32 )
cell_quadrant_size = 32
occluder_light_mask = -2147483647
format = 1
script = ExtResource( 3 )
extended_tilemap_node = NodePath("../1x1")
[node name="walls" 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( 196601, 3, 0, 196602, 3, 0, 196603, 3, 0, 196604, 3, 0, 196605, 3, 0, 196606, 3, 0, 196607, 3, 0, 131072, 3, 0, 131073, 3, 0, 131074, 3, 0, 131075, 3, 0, 131076, 3, 0, 131077, 3, 0, 131078, 3, 0, 131079, 3, 0, 131080, 3, 0, 131081, 3, 0, 131082, 3, 0, 131083, 3, 0, 131084, 3, 0, 131085, 3, 0, 131086, 3, 0, 131087, 3, 0, 131088, 3, 0, 131089, 3, 0, 131090, 3, 0, 131091, 3, 0, 196628, 3, 0, 262164, 3, 0, 327700, 3, 0, 393236, 3, 0, 458772, 3, 0, 524308, 3, 0, 589844, 3, 0, 655380, 3, 0, 720916, 3, 0, 786452, 3, 0, 917497, 3, 0, 917498, 3, 0, 917499, 3, 0, 917500, 3, 0, 917501, 3, 0, 917502, 3, 0, 917503, 3, 0, 851968, 3, 0, 851969, 3, 0, 851970, 3, 0, 851971, 3, 0, 851972, 3, 0, 851973, 3, 0, 851974, 3, 0, 851975, 3, 0, 851976, 3, 0, 851977, 3, 0, 851978, 3, 0, 851979, 3, 0, 851980, 3, 0, 851981, 3, 0, 851982, 3, 0, 851983, 3, 0, 851984, 3, 0, 851985, 3, 0, 851986, 3, 0, 851987, 3, 0 )
script = ExtResource( 3 )
extended_tilemap_node = NodePath("../1x1")
[node name="1x1" type="TileMap" parent="."]
tile_set = ExtResource( 2 )
cell_size = Vector2( 16, 16 )
format = 1
[node name="engines" type="Node2D" parent="."]
modulate = Color( 0.980392, 0.980392, 0.980392, 1 )
__meta__ = {
"_edit_group_": true,
"_edit_lock_": true
}
[node name="Engine" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 321 )
direction = 0
[node name="Engine2" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 208 )
direction = 0
[node name="Engine3" parent="engines" instance=ExtResource( 10 )]
position = Vector2( -320, 96 )
direction = 0
[node name="objects" type="Node2D" parent="."]
__meta__ = {
"_editor_description_": ""
}
[node name="Computer" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -32, 224 )
[node name="Computer2" parent="objects" instance=ExtResource( 6 )]
position = Vector2( 0, 224 )
computer_type = 1
[node name="Computer3" parent="objects" instance=ExtResource( 6 )]
position = Vector2( 32, 224 )
computer_type = 2
[node name="Computer4" parent="objects" instance=ExtResource( 6 )]
position = Vector2( 64, 224 )
computer_type = 3
[node name="Computer5" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -64, 224 )
computer_type = 4
[node name="Computer6" parent="objects" instance=ExtResource( 6 )]
position = Vector2( -96, 224 )
computer_type = 5
[node name="Computer7" parent="objects" instance=ExtResource( 6 )]
position = Vector2( 96, 224 )
computer_type = 6
[node name="StaticBody2D" parent="objects/Computer7" instance=ExtResource( 12 )]
position = Vector2( -256, 96 )
[node name="StaticBody2D2" parent="objects/Computer7" instance=ExtResource( 12 )]
position = Vector2( -64, 96 )
[node name="lights" type="Node2D" parent="."]
modulate = Color( 0.980392, 0.980392, 0.980392, 1 )
__meta__ = {
"_edit_group_": true,
"_edit_lock_": true
}

View file

@ -30,7 +30,6 @@ func _draw():
for current in range(0, polygon.size()): for current in range(0, polygon.size()):
var next = (current + 1) % polygon.size() var next = (current + 1) % polygon.size()
var previous = (current - 1) % polygon.size()
if not ignore_sides[current] and not edges[current]: if not ignore_sides[current] and not edges[current]:
var points = [ var points = [

View file

@ -44,6 +44,11 @@ _global_script_classes=[ {
"language": "GDScript", "language": "GDScript",
"path": "res://Actors/Objects/Lightbulb/Lightbulb.gd" "path": "res://Actors/Objects/Lightbulb/Lightbulb.gd"
}, { }, {
"base": "StaticBody2D",
"class": "GameObjectPowerStorage",
"language": "GDScript",
"path": "res://Actors/Objects/PowerStorage/PowerStorage.gd"
}, {
"base": "Control", "base": "Control",
"class": "GameUI", "class": "GameUI",
"language": "GDScript", "language": "GDScript",
@ -77,6 +82,7 @@ _global_script_class_icons={
"GameObjectDoor": "", "GameObjectDoor": "",
"GameObjectEngine": "", "GameObjectEngine": "",
"GameObjectLightbulb": "", "GameObjectLightbulb": "",
"GameObjectPowerStorage": "",
"GameUI": "", "GameUI": "",
"GameWorld": "", "GameWorld": "",
"MapTiles": "", "MapTiles": "",