From c5e7457206c433c443fd169ff02b754c3f476292 Mon Sep 17 00:00:00 2001 From: 20kdc Date: Mon, 18 Oct 2021 07:12:50 +0100 Subject: [PATCH] Hydroponics tray machine board (#4889) * Frame/soil anchored fix * Ability to build and deconstruct hydroponics trays * Undo pointless adding of anchoring to soil --- .../Catalog/Research/technologies.yml | 1 + .../Circuitboards/Machine/production.yml | 22 +++++++++++++++++++ .../Entities/Structures/Machines/frame.yml | 4 ++++ .../Entities/Structures/Machines/lathe.yml | 1 + .../Entities/Structures/hydro_tray.yml | 20 +++++++++++++++++ .../Prototypes/Recipes/Lathes/electronics.yml | 9 ++++++++ 6 files changed, 57 insertions(+) diff --git a/Resources/Prototypes/Catalog/Research/technologies.yml b/Resources/Prototypes/Catalog/Research/technologies.yml index da006959ed..20d5242a46 100644 --- a/Resources/Prototypes/Catalog/Research/technologies.yml +++ b/Resources/Prototypes/Catalog/Research/technologies.yml @@ -243,6 +243,7 @@ - APCElectronics - CloningPodMachineCircuitboard - MedicalScannerMachineCircuitboard + - HydroponicsTrayMachineCircuitboard - SolarControlComputerCircuitboard # Basic Parts Technology Tree diff --git a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml index 1871429c56..86a0dc0916 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml @@ -57,3 +57,25 @@ materialRequirements: Glass: 1 Cable: 1 + +- type: entity + id: HydroponicsTrayMachineCircuitboard + parent: BaseMachineCircuitboard + name: Hydroponics Tray (Machine Board) + components: + - type: MachineBoard + prototype: hydroponicsTray + # See: https://github.com/vgstation-coders/vgstation13/blob/e9a806f30b4db0efa2a68b9eb42e3120d2321b6a/code/modules/hydroponics/hydro_tray.dm#L57 + requirements: + MatterBin: 2 + ScanningModule: 1 + Capacitor: 1 + materialRequirements: + # replacing the console screen + Glass: 1 + tagRequirements: + GlassBeaker: + Amount: 2 + DefaultPrototype: Beaker + ExamineName: Glass Beaker + diff --git a/Resources/Prototypes/Entities/Structures/Machines/frame.yml b/Resources/Prototypes/Entities/Structures/Machines/frame.yml index dd967e0cab..219dfdb447 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/frame.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/frame.yml @@ -6,6 +6,8 @@ placement: mode: SnapgridCenter components: + - type: Transform + anchored: true - type: Physics bodyType: Static fixtures: @@ -54,6 +56,8 @@ placement: mode: SnapgridCenter components: + - type: Transform + anchored: true - type: Physics bodyType: Static fixtures: diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index ce7dab3cef..76782d1648 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -174,6 +174,7 @@ - APCElectronics - CloningPodMachineCircuitboard - MedicalScannerMachineCircuitboard + - HydroponicsTrayMachineCircuitboard - SolarControlComputerCircuitboard - Bucket - MopItem diff --git a/Resources/Prototypes/Entities/Structures/hydro_tray.yml b/Resources/Prototypes/Entities/Structures/hydro_tray.yml index 35972093ed..fbbb64be0d 100644 --- a/Resources/Prototypes/Entities/Structures/hydro_tray.yml +++ b/Resources/Prototypes/Entities/Structures/hydro_tray.yml @@ -20,3 +20,23 @@ drawdepth: FloorObjects - type: PlantHolder drawWarnings: true + - type: Construction + graph: machine + node: machine + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 100 + behaviors: + - !type:ChangeConstructionNodeBehavior + node: machineFrame + - !type:DoActsBehavior + acts: ["Destruction"] + - type: Machine + board: HydroponicsTrayMachineCircuitboard + - type: MaterialStorage + - type: Wires + BoardName: "HydroponicsTray" + LayoutId: HydroponicsTray + diff --git a/Resources/Prototypes/Recipes/Lathes/electronics.yml b/Resources/Prototypes/Recipes/Lathes/electronics.yml index 064b075c12..9a1c12f36c 100644 --- a/Resources/Prototypes/Recipes/Lathes/electronics.yml +++ b/Resources/Prototypes/Recipes/Lathes/electronics.yml @@ -52,3 +52,12 @@ Steel: 100 Glass: 100 +- type: latheRecipe + id: HydroponicsTrayMachineCircuitboard + icon: Objects/Misc/module.rsi/id_mod.png + result: HydroponicsTrayMachineCircuitboard + completetime: 1000 + materials: + Steel: 100 + Glass: 100 +