Construction System. (#87)

* Construction WiP

* Construction kinda works!

* Lots more construction work.

* It mostly works!
This commit is contained in:
Pieter-Jan Briers
2018-08-02 08:29:55 +02:00
committed by GitHub
parent f051078c79
commit d7074bf74f
72 changed files with 1925 additions and 245 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,27 @@
- type: construction
name: Wall Light
id: wall_light
keywords: [fixture, lamp]
category: Machines
description: A simple wall-mounted light fixture.
placementmode: SnapgridBorder
icon:
sprite: Objects/lighting.rsi
state: on
result: poweredlight
steps:
- material: Metal
amount: 1
icon:
sprite: Objects/lighting.rsi
state: construct
- material: Cable
amount: 1
icon:
sprite: Objects/lighting.rsi
state: empty
- material: Glass
amount: 1

View File

@@ -0,0 +1,57 @@
- type: construction
name: SMES
id: smes
category: Machines/Power
keywords: [battery, cell, storage]
placementmode: SnapgridCenter
description: A SMES is a large battery capable of connecting directly to a power grid.
icon:
sprite: Buildings/smes.rsi
state: smes
result: SMES
steps:
- material: Metal
amount: 2
icon:
sprite: Buildings/smes.rsi
state: smes
- material: Cable
amount: 2
- type: construction
name: Generator
id: generator
category: Machines/Power
placementmode: SnapgridCenter
description: A portable generator capable of producing power from thin air.
icon: Objects/generator.png
result: Generator
steps:
- material: Metal
amount: 2
icon: Objects/generator.png
- material: Cable
amount: 2
- type: construction
name: APC
id: apc
category: Machines/Power
placementmode: SnapgridCenter
description: Provides power from the grid wirelessly to other machines in the area.
icon:
sprite: Buildings/apc.rsi
state: apc0
result: APC
steps:
- material: Metal
amount: 2
icon:
sprite: Buildings/apc.rsi
state: apcmaint
- material: Cable
amount: 2

View File

@@ -0,0 +1,31 @@
- type: construction
name: Wall
id: wall
category: Structures
description: Keeps the air in and the greytide out.
icon: Tiles/wall_texture.png
objecttype: Structure
result: __engine_wall
placementmode: SnapgridBorder
steps:
- material: Metal
amount: 2
icon: Buildings/wall_girder.png
reverse:
tool: Wrench
- material: Metal
amount: 2
reverse:
tool: Welder
- type: construction
name: Table
id: table
category: Structures
icon: Objects/worktop_single.png
result: __engine_worktop
placementmode: SnapgridCenter
steps:
- material: Metal
amount: 2

View File

@@ -0,0 +1,18 @@
- type: construction
name: Crude Spear
id: spear
category: Items/Weapons
keywords: [melee]
description: A crude spear for when you need to put holes in somebody.
icon: Objects/spear.png
objecttype: Item
steps:
- material: Metal
amount: 1
- material: Cable
amount: 3
# Should probably use a shard but y'know.
- material: Glass
amount: 1

View File

@@ -0,0 +1,22 @@
- type: entity
name: spooky ghost
id: constructionghost
components:
- type: Transform
- type: Sprite
color: '#3F38'
- type: ConstructionGhost
- type: BoundingBox
- type: Clickable
baseshader: unshaded
selectionshader: selection_outline_unshaded
- type: entity
name: somebody-messed-up frame
id: structureconstructionframe
components:
- type: Transform
- type: Sprite
- type: Construction
- type: BoundingBox
- type: Clickable

View File

@@ -0,0 +1,60 @@
- type: entity
name: Material Stack
id: MaterialStack
parent: BaseItem
components:
- type: Stack
- type: Material
- type: entity
name: Steel Sheet
id: MetalStack
parent: MaterialStack
components:
- type: Material
materials:
- key: enum.MaterialKeys.Stack
mat: steel
- type: Stack
stacktype: enum.StackType.Metal
- type: Sprite
texture: Objects/sheet_metal.png
- type: Icon
texture: Objects/sheet_metal.png
- type: entity
id: SteelSheet1
name: Steel Sheet 1
parent: MetalStack
components:
- type: Stack
count: 1
- type: entity
name: Glass Sheet
id: GlassStack
parent: MaterialStack
components:
- type: Material
materials:
- key: enum.MaterialKeys.Stack
mat: glass
- type: Stack
stacktype: enum.StackType.Glass
- type: Sprite
texture: Objects/sheet_glass.png
- type: Icon
texture: Objects/sheet_glass.png
- type: entity
name: Cable Coil
id: CableStack
parent: BaseItem
components:
- type: Stack
stacktype: enum.StackType.Cable
- type: Sprite
texture: Objects/cable_coil.png
color: red
- type: Icon
texture: Objects/cable_coil.png

View File

@@ -10,6 +10,7 @@
- left
- right
- type: Inventory
- type: Constructor
- type: entity
id: MobObserver

View File

@@ -114,6 +114,13 @@
visuals:
- type: SmesVisualizer2D
- type: entity
id: smes_dry
parent: SMES
components:
- type: PowerStorage
charge: 0
- type: entity
id: WiredMachine
name: WiredMachine

View File

@@ -26,3 +26,15 @@
- type: Item
Size: 24
- type: entity
name: Spear
parent: BaseItem
id: Spear
components:
- type: Sprite
texture: Objects/spear.png
- type: Icon
texture: Objects/spear.png
- type: MeleeWeapon
- type: Item
Size: 24

View File

@@ -0,0 +1,26 @@
[gd_scene format=2]
[node name="Control" type="Button"]
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -110.0
margin_top = -70.0
margin_right = -50.0
margin_bottom = -50.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Crafting"
flat = false
align = 1

View File

@@ -0,0 +1,273 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" index="0" instance=ExtResource( 1 )]
margin_left = 99.0
margin_right = 583.0
margin_bottom = 357.0
rect_clip_content = false
[node name="Contents" parent="." index="0"]
rect_clip_content = false
[node name="HSplitContainer" type="HSplitContainer" parent="Contents" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 0
split_offset = 15
collapsed = false
dragger_visibility = 0
[node name="Recipes" type="VBoxContainer" parent="Contents/HSplitContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 163.0
margin_bottom = 269.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
size_flags_stretch_ratio = 0.5
alignment = 0
_sections_unfolded = [ "Grow Direction", "Size Flags" ]
[node name="Search" type="LineEdit" parent="Contents/HSplitContainer/Recipes" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 163.0
margin_bottom = 24.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 1
size_flags_horizontal = 1
size_flags_vertical = 1
secret_character = "*"
focus_mode = 2
context_menu_enabled = true
placeholder_text = "Search"
placeholder_alpha = 0.6
caret_blink = false
caret_blink_speed = 0.65
caret_position = 0
[node name="Tree" type="Tree" parent="Contents/HSplitContainer/Recipes" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 28.0
margin_right = 163.0
margin_bottom = 269.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 3
columns = 1
allow_reselect = false
allow_rmb_select = false
hide_folding = false
hide_root = true
drop_mode_flags = 0
select_mode = 0
_sections_unfolded = [ "Mouse" ]
[node name="Guide" type="VBoxContainer" parent="Contents/HSplitContainer" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 175.0
margin_right = 464.0
margin_bottom = 269.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 3
alignment = 0
[node name="Info" type="HBoxContainer" parent="Contents/HSplitContainer/Guide" index="0"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 289.0
margin_bottom = 14.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
[node name="TextureRect" type="TextureRect" parent="Contents/HSplitContainer/Guide/Info" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_bottom = 14.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
stretch_mode = 0
[node name="Label" type="Label" parent="Contents/HSplitContainer/Guide/Info" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 4.0
margin_right = 289.0
margin_bottom = 14.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 4
autowrap = true
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Size Flags" ]
[node name="Label" type="Label" parent="Contents/HSplitContainer/Guide" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 127.0
margin_top = 18.0
margin_right = 162.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 4
size_flags_vertical = 4
custom_colors/font_color = Color( 0.505882, 0.505882, 0.505882, 1 )
text = "Steps"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="StepsList" type="ItemList" parent="Contents/HSplitContainer/Guide" index="2"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 36.0
margin_right = 289.0
margin_bottom = 245.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 3
items = [ ]
select_mode = 0
allow_reselect = false
icon_mode = 1
fixed_icon_size = Vector2( 0, 0 )
_sections_unfolded = [ "Icon", "Size Flags" ]
[node name="Buttons" type="HBoxContainer" parent="Contents/HSplitContainer/Guide" index="3"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 249.0
margin_right = 289.0
margin_bottom = 269.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
[node name="BuildButton" type="Button" parent="Contents/HSplitContainer/Guide/Buttons" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 192.0
margin_bottom = 20.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
disabled = true
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Build!"
flat = false
align = 1
_sections_unfolded = [ "Size Flags" ]
[node name="EraseButton" type="Button" parent="Contents/HSplitContainer/Guide/Buttons" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 196.0
margin_right = 289.0
margin_bottom = 20.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
text = "Clear Ghosts"
flat = false
align = 1
[node name="Header" parent="." index="1"]
rect_clip_content = false
[node name="Header Text" parent="Header" index="0"]
rect_clip_content = false
[node name="CloseButton" parent="Header" index="1"]
rect_clip_content = false

View File

@@ -1,170 +1 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d1e0161af146835f4fb79d21a6200caa9cc842d0/icons/obj/power.dmi and modified.",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "smes",
"select": [],
"flags": {},
"directions": 1
},
{
"name": "smes-display",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
0.2,
0.2,
0.2,
0.2,
0.2
]
]
},
{
"name": "smes-crit",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
0.2,
0.2,
0.2,
0.2
]
]
},
{
"name": "smes-oc0",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-oc1",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
0.5,
0.5
]
]
},
{
"name": "smes-oc2",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
0.5,
0.5
]
]
},
{
"name": "smes-og1",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-og2",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-og3",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-og4",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-og5",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-op0",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
},
{
"name": "smes-op1",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0,
1.0
]
]
},
{
"name": "smes-op2",
"select": [],
"flags": {},
"directions": 1,
"delays": [
[
1.0
]
]
}
]
}
{"version":1,"license":"CC-BY-SA-3.0","copyright":"Taken from https://github.com/discordia-space/CEV-Eris/blob/d1e0161af146835f4fb79d21a6200caa9cc842d0/icons/obj/power.dmi and modified.","size":{"x":32,"y":32},"states":[{"name":"smes","select":[],"flags":{},"directions":1},{"name":"smes-display","select":[],"flags":{},"directions":1,"delays":[[0.2,0.2,0.2,0.2,0.2]]},{"name":"smes-crit","select":[],"flags":{},"directions":1,"delays":[[0.2,0.2,0.2,0.2]]},{"name":"smes-oc0","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-oc1","select":[],"flags":{},"directions":1,"delays":[[0.5,0.5]]},{"name":"smes-oc2","select":[],"flags":{},"directions":1,"delays":[[0.5,0.5]]},{"name":"smes-og1","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-og2","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-og3","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-og4","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-og5","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-op0","select":[],"flags":{},"directions":1,"delays":[[1]]},{"name":"smes-op1","select":[],"flags":{},"directions":1,"delays":[[1,1]]},{"name":"smes-op2","select":[],"flags":{},"directions":1,"delays":[[1]]}]}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

View File

@@ -1,21 +1 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "on",
"select": [],
"flags": {},
"directions": 4
},
{
"name": "off",
"select": [],
"flags": {},
"directions": 4
}
]
}
{"version":1,"size":{"x":32,"y":32},"states":[{"name":"on","select":[],"flags":{},"directions":4},{"name":"off","select":[],"flags":{},"directions":4},{"name":"construct","select":[],"flags":{},"directions":4},{"name":"empty","select":[],"flags":{},"directions":4}]}

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B