Upgradeable machines. (#2675)

* Start work on upgradeable machines.

* Upgradeable machines work

* Component requirements for upgradeable machines

* Better container handling

* Remember to not push submodule updates in your PRs, kids!

* Refresh parts after building a machine.

* NetSync false

* Address some reviews, fix some bugs

* Nullable stackhelpers dependencies

* Use container helper method to delete all entities in containers

* Nullable string in AddContainer

* Better examine for machine frame and construction in general

* Machine breakage

* Nullable node

* nullable GraphPrototype

* Re-save saltern for autolathe parts

* Fix SaveLoadSave
This commit is contained in:
Vera Aguilera Puerto
2020-12-03 22:49:00 +01:00
committed by GitHub
parent ba2bdec13b
commit c3341132c5
36 changed files with 5270 additions and 3703 deletions

View File

@@ -24,7 +24,7 @@
steps:
- component: ComputerBoard
store: board
name: a computer circuit board
name: any computer circuit board
icon:
sprite: "Constructible/Misc/module.rsi"
state: "id_mod"
@@ -57,8 +57,7 @@
conditions:
- !type:EntityAnchored { }
completed:
- !type:EmptyContainer
container: board
- !type:EmptyAllContainers {}
- !type:SpriteStateChange
state: 0
steps:
@@ -99,6 +98,10 @@
- to: missingWires
conditions:
- !type:EntityAnchored { }
completed:
- !type:SpawnPrototype
prototype: ApcExtensionCableStack1
amount: 5
steps:
- tool: Cutting

View File

@@ -0,0 +1,89 @@
- type: constructionGraph
id: machine
start: start
graph:
- node: start
actions:
- !type:SpawnPrototype
prototype: SteelSheet1
- !type:DeleteEntity {}
edges:
- to: missingWires
completed:
- !type:SetAnchor
value: false
steps:
- material: Metal
amount: 5
doAfter: 2.5
- node: missingWires
entity: UnfinishedMachineFrame
actions:
- !type:SpriteStateChange
state: "box_0"
- !type:EmptyAllContainers {}
edges:
- to: machineFrame
conditions:
- !type:EntityAnchored {}
steps:
- material: Cable
- to: start
conditions:
- !type:EntityAnchored
anchored: false
completed:
- !type:SpawnPrototype
prototype: SteelSheet1
amount: 5
- !type:DeleteEntity {}
steps:
- tool: Screwing
doAfter: 2
- node: machineFrame
entity: MachineFrame
actions:
- !type:MachineFrameRegenerateProgress {}
edges:
- to: machine
conditions:
- !type:EntityAnchored {}
- !type:MachineFrameComplete {}
completed:
# Yes, this is snowflaked so we don't have to make an unique graph per machine. You're welcome.
- !type:BuildMachine {}
steps:
- tool: Screwing
doAfter: 0.5
- to: missingWires
conditions:
- !type:EntityAnchored {}
completed:
- !type:SpawnPrototype
prototype: ApcExtensionCableStack1
steps:
- tool: Prying
doAfter: 2
completed:
- !type:EmptyAllContainers {}
- !type:MachineFrameRegenerateProgress {}
- tool: Cutting
doAfter: 0.25
- node: machine
actions:
- !type:AddContainer
container: machine_parts
- !type:AddContainer
container: machine_board
edges:
- to: machineFrame
conditions:
- !type:EntityAnchored {}
- !type:WirePanel {}
steps:
- tool: Prying
doAfter: 0.25

View File

@@ -10,3 +10,16 @@
icon:
sprite: Constructible/Misc/stock_parts.rsi
state: 4
- type: construction
name: machine frame
id: MachineFrame
graph: machine
startNode: start
targetNode: machine
category: Machines
placementMode: SnapgridCenter
canBuildInImpassable: false
icon:
sprite: Constructible/Misc/stock_parts.rsi
state: "box_0"