From bbfc0c320a80c674eeef38eccb640fa667282d23 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sat, 22 May 2021 11:30:11 +0200 Subject: [PATCH] Fixes materials in lathe recipes --- .../Research/LatheRecipePrototype.cs | 4 ++- Resources/Changelog/Parts/lathe.yml | 4 +++ .../Prototypes/Recipes/Lathes/botany.yml | 16 ++++----- Resources/Prototypes/Recipes/Lathes/cargo.yml | 4 +-- .../Prototypes/Recipes/Lathes/chemistry.yml | 12 +++---- .../Prototypes/Recipes/Lathes/cooking.yml | 10 +++--- .../Prototypes/Recipes/Lathes/electronics.yml | 12 +++---- .../Prototypes/Recipes/Lathes/janitorial.yml | 18 +++++----- .../Prototypes/Recipes/Lathes/medical.yml | 24 ++++++------- Resources/Prototypes/Recipes/Lathes/misc.yml | 26 +++++++------- .../Prototypes/Recipes/Lathes/security.yml | 12 +++---- Resources/Prototypes/Recipes/Lathes/sheet.yml | 4 +-- Resources/Prototypes/Recipes/Lathes/tools.yml | 36 +++++++++---------- 13 files changed, 94 insertions(+), 88 deletions(-) create mode 100644 Resources/Changelog/Parts/lathe.yml diff --git a/Content.Shared/Research/LatheRecipePrototype.cs b/Content.Shared/Research/LatheRecipePrototype.cs index 1320df41fb..f51b6fb902 100644 --- a/Content.Shared/Research/LatheRecipePrototype.cs +++ b/Content.Shared/Research/LatheRecipePrototype.cs @@ -1,10 +1,12 @@ #nullable enable using System; using System.Collections.Generic; +using Content.Shared.Materials; using Robust.Shared.IoC; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; @@ -32,7 +34,7 @@ namespace Content.Shared.Research [DataField("completetime")] private int _completeTime = 2500; - [DataField("materials")] + [DataField("materials", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] private Dictionary _requiredMaterials = new(); /// diff --git a/Resources/Changelog/Parts/lathe.yml b/Resources/Changelog/Parts/lathe.yml new file mode 100644 index 0000000000..c533d09fd9 --- /dev/null +++ b/Resources/Changelog/Parts/lathe.yml @@ -0,0 +1,4 @@ +author: Zumorica +changes: + - type: Fix # One of the following: Add, Remove, Tweak, Fix + message: Fixes lathes not printing any recipe. diff --git a/Resources/Prototypes/Recipes/Lathes/botany.yml b/Resources/Prototypes/Recipes/Lathes/botany.yml index 2460fea7d2..14109a8143 100644 --- a/Resources/Prototypes/Recipes/Lathes/botany.yml +++ b/Resources/Prototypes/Recipes/Lathes/botany.yml @@ -6,8 +6,8 @@ result: HydroponicsToolMiniHoe completetime: 500 materials: - steel: 200 - plastic: 100 + Steel: 200 + Plastic: 100 - type: latheRecipe id: Scythe @@ -17,8 +17,8 @@ result: HydroponicsToolScythe completetime: 500 materials: - steel: 300 - plastic: 200 + Steel: 300 + Plastic: 200 - type: latheRecipe id: Hatchet @@ -28,8 +28,8 @@ result: HydroponicsToolHatchet completetime: 500 materials: - steel: 200 - plastic: 100 + Steel: 200 + Plastic: 100 - type: latheRecipe id: Spade @@ -39,5 +39,5 @@ result: HydroponicsToolSpade completetime: 500 materials: - steel: 200 - plastic: 100 + Steel: 200 + Plastic: 100 diff --git a/Resources/Prototypes/Recipes/Lathes/cargo.yml b/Resources/Prototypes/Recipes/Lathes/cargo.yml index bdf99f14d3..8a31b89198 100644 --- a/Resources/Prototypes/Recipes/Lathes/cargo.yml +++ b/Resources/Prototypes/Recipes/Lathes/cargo.yml @@ -6,5 +6,5 @@ result: ConveyorBeltAssembly completetime: 1000 materials: - steel: 1000 - glass: 50 + Steel: 1000 + Glass: 50 diff --git a/Resources/Prototypes/Recipes/Lathes/chemistry.yml b/Resources/Prototypes/Recipes/Lathes/chemistry.yml index 3360590f62..e7c8c8d0b5 100644 --- a/Resources/Prototypes/Recipes/Lathes/chemistry.yml +++ b/Resources/Prototypes/Recipes/Lathes/chemistry.yml @@ -6,7 +6,7 @@ result: Beaker completetime: 500 materials: - glass: 100 + Glass: 100 - type: latheRecipe id: LargeBeaker @@ -16,7 +16,7 @@ result: LargeBeaker completetime: 500 materials: - glass: 200 + Glass: 200 - type: latheRecipe id: Dropper @@ -26,9 +26,9 @@ result: Dropper completetime: 500 materials: - glass: 200 - plastic: 100 - + Glass: 200 + Plastic: 100 + - type: latheRecipe id: Syringe icon: @@ -37,4 +37,4 @@ result: Syringe completetime: 500 materials: - glass: 200 + Glass: 200 diff --git a/Resources/Prototypes/Recipes/Lathes/cooking.yml b/Resources/Prototypes/Recipes/Lathes/cooking.yml index 705173ec81..0a13f1631d 100644 --- a/Resources/Prototypes/Recipes/Lathes/cooking.yml +++ b/Resources/Prototypes/Recipes/Lathes/cooking.yml @@ -4,7 +4,7 @@ result: ButchCleaver completetime: 500 materials: - steel: 300 + Steel: 300 - type: latheRecipe id: KitchenKnife @@ -12,7 +12,7 @@ result: KitchenKnife completetime: 400 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: DrinkMug @@ -20,7 +20,7 @@ result: DrinkMug completetime: 200 materials: - glass: 50 + Glass: 50 - type: latheRecipe id: DrinkMugMetal @@ -28,7 +28,7 @@ result: DrinkMugMetal completetime: 200 materials: - steel: 50 + Steel: 50 - type: latheRecipe id: DrinkGlass @@ -36,4 +36,4 @@ result: DrinkGlass completetime: 200 materials: - glass: 50 + Glass: 50 diff --git a/Resources/Prototypes/Recipes/Lathes/electronics.yml b/Resources/Prototypes/Recipes/Lathes/electronics.yml index d729dbf9c7..d5a2361a11 100644 --- a/Resources/Prototypes/Recipes/Lathes/electronics.yml +++ b/Resources/Prototypes/Recipes/Lathes/electronics.yml @@ -4,8 +4,8 @@ result: FirelockElectronics completetime: 500 materials: - steel: 50 - glass: 50 + Steel: 50 + Glass: 50 - type: latheRecipe id: DoorElectronics @@ -13,8 +13,8 @@ result: DoorElectronics completetime: 500 materials: - steel: 50 - glass: 50 + Steel: 50 + Glass: 50 - type: latheRecipe id: APCElectronics @@ -22,5 +22,5 @@ result: APCElectronics completetime: 500 materials: - steel: 50 - glass: 50 + Steel: 50 + Glass: 50 diff --git a/Resources/Prototypes/Recipes/Lathes/janitorial.yml b/Resources/Prototypes/Recipes/Lathes/janitorial.yml index ec40593cc0..115fdae4ee 100644 --- a/Resources/Prototypes/Recipes/Lathes/janitorial.yml +++ b/Resources/Prototypes/Recipes/Lathes/janitorial.yml @@ -4,7 +4,7 @@ result: MopItem completetime: 500 materials: - plastic: 100 + Plastic: 100 - type: latheRecipe id: MopBucket @@ -12,8 +12,8 @@ result: MopBucket completetime: 500 materials: - steel: 100 - plastic: 100 + Steel: 100 + Plastic: 100 - type: latheRecipe id: Bucket @@ -21,7 +21,7 @@ result: Bucket completetime: 500 materials: - steel: 100 + Steel: 100 - type: latheRecipe id: WetFloorSign @@ -29,7 +29,7 @@ result: WetFloorSign completetime: 500 materials: - plastic: 100 + Plastic: 100 - type: latheRecipe id: SprayBottle @@ -37,7 +37,7 @@ result: SprayBottle completetime: 500 materials: - plastic: 100 + Plastic: 100 - type: latheRecipe id: TrashBag @@ -45,7 +45,7 @@ result: TrashBag completetime: 300 materials: - plastic: 100 + Plastic: 100 - type: latheRecipe id: LightReplacer @@ -53,5 +53,5 @@ result: LightReplacer completetime: 600 materials: - steel: 100 - glass: 1000 + Steel: 100 + Glass: 1000 diff --git a/Resources/Prototypes/Recipes/Lathes/medical.yml b/Resources/Prototypes/Recipes/Lathes/medical.yml index 11455cda93..05d6931950 100644 --- a/Resources/Prototypes/Recipes/Lathes/medical.yml +++ b/Resources/Prototypes/Recipes/Lathes/medical.yml @@ -4,8 +4,8 @@ result: Brutepack completetime: 500 materials: - steel: 400 - glass: 100 + Steel: 400 + Glass: 100 - type: latheRecipe id: Ointment @@ -13,8 +13,8 @@ result: Ointment completetime: 500 materials: - steel: 400 - glass: 100 + Steel: 400 + Glass: 100 - type: latheRecipe id: Gauze @@ -22,7 +22,7 @@ result: Gauze completetime: 500 materials: - plastic: 100 + Plastic: 100 - type: latheRecipe id: Scalpel @@ -30,7 +30,7 @@ result: Scalpel completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Retractor @@ -38,7 +38,7 @@ result: Scalpel completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Cautery @@ -46,7 +46,7 @@ result: Cautery completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Drill @@ -54,7 +54,7 @@ result: Drill completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: BoneSaw @@ -62,7 +62,7 @@ result: Saw completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Hemostat @@ -70,7 +70,7 @@ result: Hemostat completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: BodyBag_Item @@ -78,4 +78,4 @@ result: BodyBag_Item completetime: 300 materials: - plastic: 200 + Plastic: 200 diff --git a/Resources/Prototypes/Recipes/Lathes/misc.yml b/Resources/Prototypes/Recipes/Lathes/misc.yml index a92d6c71f9..2085aee6de 100644 --- a/Resources/Prototypes/Recipes/Lathes/misc.yml +++ b/Resources/Prototypes/Recipes/Lathes/misc.yml @@ -4,8 +4,8 @@ result: LightTube completetime: 500 materials: - steel: 50 - glass: 50 + Steel: 50 + Glass: 50 - type: latheRecipe id: LightBulb @@ -13,8 +13,8 @@ result: LightBulb completetime: 500 materials: - steel: 50 - glass: 50 + Steel: 50 + Glass: 50 - type: latheRecipe id: PowerCellSmallHigh @@ -22,8 +22,8 @@ result: PowerCellSmallHigh completetime: 500 materials: - steel: 100 - glass: 100 + Steel: 100 + Glass: 100 - type: latheRecipe id: GlowStickRed @@ -31,7 +31,7 @@ result: GlowStickRed completetime: 500 materials: - plastic: 50 + Plastic: 50 - type: latheRecipe id: FlareBase @@ -39,7 +39,7 @@ result: FlareBase completetime: 500 materials: - plastic: 50 + Plastic: 50 - type: latheRecipe id: FlashLightLantern @@ -47,9 +47,9 @@ result: FlashLightLantern completetime: 500 materials: - steel: 100 - glass: 100 - plastic: 100 + Steel: 100 + Glass: 100 + Plastic: 100 - type: latheRecipe id: FireExtinguisher @@ -57,7 +57,7 @@ result: FireExtinguisher completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Matchbox @@ -65,4 +65,4 @@ result: Matchbox completetime: 10 materials: - wood: 100 + Wood: 100 diff --git a/Resources/Prototypes/Recipes/Lathes/security.yml b/Resources/Prototypes/Recipes/Lathes/security.yml index f893117ae7..1a222fed74 100644 --- a/Resources/Prototypes/Recipes/Lathes/security.yml +++ b/Resources/Prototypes/Recipes/Lathes/security.yml @@ -6,7 +6,7 @@ result: Handcuffs completetime: 500 materials: - steel: 300 + Steel: 300 - type: latheRecipe id: Stunbaton @@ -16,8 +16,8 @@ result: Stunbaton completetime: 500 materials: - steel: 300 - plastic: 300 + Steel: 300 + Plastic: 300 - type: latheRecipe id: Flash @@ -27,6 +27,6 @@ result: Flash completetime: 500 materials: - glass: 100 - plastic: 200 - steel: 100 + Glass: 100 + Plastic: 200 + Steel: 100 diff --git a/Resources/Prototypes/Recipes/Lathes/sheet.yml b/Resources/Prototypes/Recipes/Lathes/sheet.yml index b54f04d04c..d6695c82cd 100644 --- a/Resources/Prototypes/Recipes/Lathes/sheet.yml +++ b/Resources/Prototypes/Recipes/Lathes/sheet.yml @@ -6,7 +6,7 @@ result: SheetSteel1 completetime: 500 materials: - steel: 100 + Steel: 100 - type: latheRecipe id: GlassStack @@ -16,4 +16,4 @@ result: SheetGlass1 completetime: 500 materials: - glass: 100 + Glass: 100 diff --git a/Resources/Prototypes/Recipes/Lathes/tools.yml b/Resources/Prototypes/Recipes/Lathes/tools.yml index f95a2ed8ce..349f96ff1e 100644 --- a/Resources/Prototypes/Recipes/Lathes/tools.yml +++ b/Resources/Prototypes/Recipes/Lathes/tools.yml @@ -4,7 +4,7 @@ result: Wirecutter completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Screwdriver @@ -14,7 +14,7 @@ result: Screwdriver completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Welder @@ -24,7 +24,7 @@ result: Welder completetime: 500 materials: - steel: 400 + Steel: 400 - type: latheRecipe id: Wrench @@ -32,7 +32,7 @@ result: Wrench completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: CableStack @@ -41,7 +41,7 @@ result: ApcExtensionCableStack1 completetime: 500 materials: - steel: 100 + Steel: 100 - type: latheRecipe id: Crowbar @@ -49,7 +49,7 @@ result: Crowbar completetime: 500 materials: - steel: 200 + Steel: 200 - type: latheRecipe id: Pickaxe @@ -57,8 +57,8 @@ result: Pickaxe completetime: 500 materials: - steel: 200 - wood: 100 + Steel: 200 + Wood: 100 - type: latheRecipe id: Shovel @@ -68,8 +68,8 @@ result: Shovel completetime: 500 materials: - steel: 200 - wood: 100 + Steel: 200 + Wood: 100 - type: latheRecipe id: Multitool @@ -79,8 +79,8 @@ result: Multitool completetime: 500 materials: - steel: 200 - plastic: 200 + Steel: 200 + Plastic: 200 - type: latheRecipe id: PowerDrill @@ -90,8 +90,8 @@ result: PowerDrill completetime: 500 materials: - steel: 600 - plastic: 200 + Steel: 600 + Plastic: 200 - type: latheRecipe id: RCD @@ -101,8 +101,8 @@ result: RCD completetime: 1000 materials: - steel: 1000 - plastic: 300 + Steel: 1000 + Plastic: 300 - type: latheRecipe id: RCDAmmo @@ -112,5 +112,5 @@ result: RCDAmmo completetime: 600 materials: - steel: 500 - plastic: 250 + Steel: 500 + Plastic: 250