Fixes materials in lathe recipes

This commit is contained in:
Vera Aguilera Puerto
2021-05-22 11:30:11 +02:00
parent 9779986bd8
commit bbfc0c320a
13 changed files with 94 additions and 88 deletions

View File

@@ -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<int, MaterialPrototype>))]
private Dictionary<string, int> _requiredMaterials = new();
/// <summary>

View File

@@ -0,0 +1,4 @@
author: Zumorica
changes:
- type: Fix # One of the following: Add, Remove, Tweak, Fix
message: Fixes lathes not printing any recipe.

View File

@@ -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

View File

@@ -6,5 +6,5 @@
result: ConveyorBeltAssembly
completetime: 1000
materials:
steel: 1000
glass: 50
Steel: 1000
Glass: 50

View File

@@ -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,8 +26,8 @@
result: Dropper
completetime: 500
materials:
glass: 200
plastic: 100
Glass: 200
Plastic: 100
- type: latheRecipe
id: Syringe
@@ -37,4 +37,4 @@
result: Syringe
completetime: 500
materials:
glass: 200
Glass: 200

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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