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

@@ -49,6 +49,18 @@
- state: autolathe_unlit
shader: unshaded
map: ["enum.AutolatheVisualLayers.BaseUnlit"]
- state: autolathe_panel
map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
- type: Construction
graph: machine
node: machine
- type: BreakableConstruction
node: machineFrame
- type: Machine
board: AutolatheMachineCircuitboard
- type: Wires
BoardName: "Autolathe"
LayoutId: Autolathe
- type: LatheDatabase
static: true
recipes:
@@ -68,6 +80,7 @@
- type: Appearance
visuals:
- type: AutolatheVisualizer
- type: WiresVisualizer
- type: entity
parent: BaseLathe
@@ -85,7 +98,12 @@
map: ["enum.ProtolatheVisualLayers.BaseUnlit"]
- state: protolathe
map: ["enum.ProtolatheVisualLayers.AnimationLayer"]
- state: protolathe_panel
map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
- type: ResearchClient
- type: Wires
BoardName: "Protolathe"
LayoutId: Protolathe
- type: TechnologyDatabase
- type: ProtolatheDatabase
protolatherecipes:
@@ -112,3 +130,4 @@
- type: Appearance
visuals:
- type: ProtolatheVisualizer
- type: WiresVisualizer

View File

@@ -0,0 +1,76 @@
- type: entity
id: UnfinishedMachineFrame
name: machine frame
suffix: Unfinished
placement:
mode: SnapgridCenter
components:
- type: Physics
mass: 25
anchored: true
shapes:
- !type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- type: InteractionOutline
- type: Anchorable
- type: Rotatable
- type: Pullable
- type: Construction
graph: machine
node: missingWires
- type: BreakableConstruction
node: start
- type: Sprite
sprite: "Constructible/Misc/stock_parts.rsi"
state: "box_0"
- type: entity
id: MachineFrame
name: machine frame
suffix: Ready
placement:
mode: SnapgridCenter
components:
- type: Physics
mass: 25
anchored: true
shapes:
- !type:PhysShapeAabb
bounds: "-0.5,-0.25,0.5,0.25"
layer:
- Impassable
- MobImpassable
- VaultImpassable
- Opaque
mask:
- Impassable
- MobImpassable
- VaultImpassable
- type: Clickable
- type: InteractionOutline
- type: Anchorable
- type: Rotatable
- type: Pullable
- type: Construction
graph: machine
node: machineFrame
- type: BreakableConstruction
node: missingWires
- type: MachineFrame
- type: Sprite
netsync: false
sprite: "Constructible/Misc/stock_parts.rsi"
state: "box_1"
- type: Appearance
visuals:
- type: MachineFrameVisualizer

View File

@@ -0,0 +1,324 @@
- type: entity
id: BaseStockPart
name: stock part
parent: BaseItem
description: What?
abstract: true
components:
- type: Sprite
netsync: false
sprite: Constructible/Misc/stock_parts.rsi
- type: MachinePart
rating: 1
# Rating 1
- type: entity
id: CapacitorStockPart
name: capacitor
parent: BaseStockPart
description: A basic capacitor used in the construction of a variety of devices.
components:
- type: Sprite
state: capacitor
- type: MachinePart
part: Capacitor
rating: 1
- type: entity
id: ScanningModuleStockPart
name: scanning module
parent: BaseStockPart
description: A compact, high resolution scanning module used in the construction of certain devices.
components:
- type: Sprite
state: scan_module
- type: MachinePart
part: ScanningModule
rating: 1
- type: entity
id: MicroManipulatorStockPart
name: micro-manipulator
parent: BaseStockPart
description: A tiny little manipulator used in the construction of certain devices.
components:
- type: Sprite
state: micro_mani
- type: MachinePart
part: Manipulator
rating: 1
- type: entity
id: MicroLaserStockPart
name: micro-laser
parent: BaseStockPart
description: A tiny laser used in certain devices.
components:
- type: Sprite
state: micro_laser
- type: MachinePart
part: Laser
rating: 1
- type: entity
id: MatterBinStockPart
name: matter bin
parent: BaseStockPart
description: A container designed to hold compressed matter awaiting reconstruction.
components:
- type: Sprite
state: matter_bin
- type: MachinePart
part: MatterBin
rating: 1
# Rating 2
- type: entity
id: AdvancedCapacitorStockPart
name: advanced capacitor
parent: CapacitorStockPart
description: An advanced capacitor used in the construction of a variety of devices.
components:
- type: Sprite
state: adv_capacitor
- type: MachinePart
rating: 2
- type: entity
id: AdvancedScanningModuleStockPart
name: advanced scanning module
parent: ScanningModuleStockPart
description: A compact, high resolution scanning module used in the construction of certain devices.
components:
- type: Sprite
state: adv_scan_module
- type: MachinePart
rating: 2
- type: entity
id: NanoManipulatorStockPart
name: nano-manipulator
parent: MicroManipulatorStockPart
description: A tiny little manipulator used in the construction of certain devices.
components:
- type: Sprite
state: nano_mani
- type: MachinePart
rating: 2
- type: entity
id: HighPowerMicroLaserStockPart
name: high-power micro-laser
parent: MicroLaserStockPart
description: A tiny laser used in certain devices.
components:
- type: Sprite
state: high_micro_laser
- type: MachinePart
rating: 2
- type: entity
id: AdvancedMatterBinStockPart
name: advanced matter bin
parent: MatterBinStockPart
description: A container designed to hold compressed matter awaiting reconstruction.
components:
- type: Sprite
state: advanced_matter_bin
- type: MachinePart
rating: 2
# Rating 3
- type: entity
id: SuperCapacitorStockPart
name: super capacitor
parent: CapacitorStockPart
description: A super-high capacity capacitor used in the construction of a variety of devices.
components:
- type: Sprite
state: super_capacitor
- type: MachinePart
rating: 3
- type: entity
id: PhasicScanningModuleStockPart
name: phasic scanning module
parent: ScanningModuleStockPart
description: A compact, high resolution phasic scanning module used in the construction of certain devices.
components:
- type: Sprite
state: super_scan_module
- type: MachinePart
rating: 3
- type: entity
id: PicoManipulatorStockPart
name: pico-manipulator
parent: MicroManipulatorStockPart
description: A tiny little manipulator used in the construction of certain devices.
components:
- type: Sprite
state: pico_mani
- type: MachinePart
rating: 3
- type: entity
id: UltraHighPowerMicroLaserStockPart
name: ultra-high-power micro-laser
parent: MicroLaserStockPart
description: A tiny laser used in certain devices.
components:
- type: Sprite
state: ultra_high_micro_laser
- type: MachinePart
rating: 3
- type: entity
id: SuperMatterBinStockPart
name: super matter bin
parent: MatterBinStockPart
description: A container designed to hold compressed matter awaiting reconstruction.
components:
- type: Sprite
state: super_matter_bin
- type: MachinePart
rating: 3
# Rating 4
- type: entity
id: QuadraticCapacitorStockPart
name: quadratic capacitor
parent: CapacitorStockPart
description: A quadratic capacity capacitor used in the construction of a variety of devices.
components:
- type: Sprite
state: quadratic_capacitor
- type: MachinePart
rating: 4
- type: entity
id: TriphasicScanningModuleStockPart
name: triphasic scanning module
parent: ScanningModuleStockPart
description: A compact, ultra resolution triphasic scanning module used in the construction of certain devices.
components:
- type: Sprite
state: triphasic_scan_module
- type: MachinePart
rating: 4
- type: entity
id: FemtoManipulatorStockPart
name: femto-manipulator
parent: MicroManipulatorStockPart
description: A tiny little manipulator used in the construction of certain devices.
components:
- type: Sprite
state: femto_mani
- type: MachinePart
rating: 4
- type: entity
id: QuadUltraMicroLaserStockPart
name: quad-ultra micro-laser
parent: MicroLaserStockPart
description: A tiny laser used in certain devices.
components:
- type: Sprite
state: quadultra_micro_laser
- type: MachinePart
rating: 4
- type: entity
id: BluespaceMatterBinStockPart
name: bluespace matter bin
parent: MatterBinStockPart
description: A container designed to hold compressed matter in bluespace awaiting reconstruction.
components:
- type: Sprite
state: bluespace_matter_bin
- type: MachinePart
rating: 4
# Subspace stock parts
- type: entity
id: AnsibleSubspaceStockPart
name: subspace ansible
parent: BaseStockPart
description: A compact module capable of sensing extradimensional activity.
components:
- type: Sprite
state: subspace_ansible
- type: MachinePart
part: Ansible
- type: entity
id: FilterSubspaceStockPart
name: hyperwave filter
parent: BaseStockPart
description: A tiny device capable of filtering and converting super-intense radiowaves.
components:
- type: Sprite
state: hyperwave_filter
- type: MachinePart
part: Filter
- type: entity
id: AmplifierSubspaceStockPart
name: subspace amplifier
parent: BaseStockPart
description: A compact micro-machine capable of amplifying weak subspace transmissions.
components:
- type: Sprite
state: subspace_amplifier
- type: MachinePart
part: Amplifier
- type: entity
id: TreatmentSubspaceStockPart
name: subspace treatment disk
parent: BaseStockPart
description: A compact micro-machine capable of stretching out hyper-compressed radio waves.
components:
- type: Sprite
state: treatment_disk
- type: MachinePart
part: Treatment
- type: entity
id: AnalyzerSubspaceStockPart
name: subspace wavelength analyzer
parent: BaseStockPart
description: A sophisticated analyzer capable of analyzing cryptic subspace wavelengths.
components:
- type: Sprite
state: wavelength_analyzer
- type: MachinePart
part: Analyzer
- type: entity
id: CrystalSubspaceStockPart
name: ansible crystal
parent: BaseStockPart
description: A crystal made from pure glass used to transmit laser databursts to subspace.
components:
- type: Sprite
state: ansible_crystal
- type: MachinePart
part: Crystal
- type: entity
id: TransmitterSubspaceStockPart
name: subspace transmitter
parent: BaseStockPart
description: A large piece of equipment used to open a window into the subspace dimension.
components:
- type: Sprite
state: subspace_transmitter
- type: MachinePart
part: Transmitter

View File

@@ -0,0 +1,23 @@
- type: entity
id: BaseMachineCircuitboard
parent: BaseItem
name: machine board
abstract: true
components:
- type: MachineBoard
- type: Sprite
sprite: Constructible/Misc/module.rsi
state: id_mod
- type: entity
id: AutolatheMachineCircuitboard
parent: BaseMachineCircuitboard
name: Autolathe (Machine Board)
components:
- type: MachineBoard
prototype: Autolathe
requirements:
MatterBin: 3
Manipulator: 1
materialRequirements:
Glass: 1