diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs index f6191c3a9f13..8bab772194d1 100644 --- a/Content.Server/Lathe/LatheSystem.cs +++ b/Content.Server/Lathe/LatheSystem.cs @@ -151,6 +151,8 @@ private void OnGetWhitelist(EntityUid uid, LatheComponent component, ref GetMate } } + AddDepartmentFabricatorMaterials(uid, materialWhitelist); // CorvaxGoob - dept-techfab-tools-materials + var combined = args.Whitelist.Union(materialWhitelist).ToList(); args.Whitelist = combined; } diff --git a/Content.Server/_CorvaxGoob/Lathe/LatheSystem.cs b/Content.Server/_CorvaxGoob/Lathe/LatheSystem.cs new file mode 100644 index 000000000000..64aaa9c95c5d --- /dev/null +++ b/Content.Server/_CorvaxGoob/Lathe/LatheSystem.cs @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +using Content.Shared.Materials; +using Robust.Shared.Prototypes; + +namespace Content.Server.Lathe; + +public sealed partial class LatheSystem +{ + private static readonly ProtoId[] EngineeringTechFabMaterials = + { + "Plasteel", + "ReinforcedGlass", + "ReinforcedPlasmaGlass", + "ReinforcedUraniumGlass", + "Wood", + }; + + private static readonly ProtoId[] CargoTechFabMaterials = + { + "Durathread", + "PlasmaGlass", + "Plasteel", + "ReinforcedGlass", + "ReinforcedPlasmaGlass", + "ReinforcedUraniumGlass", + "UraniumGlass", + "Wood", + }; + + /// + /// Adds department material ids that are not discovered from recipes. + /// + /// + /// Keeps extra engineering and cargo materials visible and insertable without disabling the + /// runtime material whitelist for every material. + /// + private void AddDepartmentFabricatorMaterials(EntityUid uid, List> materialWhitelist) + { + var additionalMaterials = MetaData(uid).EntityPrototype?.ID switch + { + "EngineeringTechFab" => EngineeringTechFabMaterials, + "CargoTechFab" => CargoTechFabMaterials, + _ => null, + }; + + if (additionalMaterials != null) + materialWhitelist.AddRange(additionalMaterials); + } +} diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml index e4a6d24ada00..042a13a9e1bd 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml @@ -162,6 +162,7 @@ - RawMaterial - ConstructionMaterial - DroneUsable # Goobstation + - SiloMaterialCloth # CorvaxGoob - dept-techfab-tools-materials - type: Construction graph: WebObjects # not sure if I should either keep this here or just make another prototype. Will keep it here just in case. node: cloth @@ -234,6 +235,7 @@ - RawMaterial - ConstructionMaterial - DroneUsable # Goobstation + - SiloMaterialCloth # CorvaxGoob - dept-techfab-tools-materials - type: Item heldPrefix: durathread @@ -283,6 +285,7 @@ - RawMaterial - ConstructionMaterial - DroneUsable # Goobstation + - SiloMaterialWood # CorvaxGoob - dept-techfab-tools-materials - type: Extractable grindableSolutionName: wood - type: SolutionContainerManager diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index f5bbab5d1472..818cd63615f6 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -488,6 +488,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - SecurityEquipmentStatic - SecurityPracticeStatic - SecurityAmmoStatic @@ -597,6 +598,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - TopicalsStatic - ChemistryStatic - MedicalStatic diff --git a/Resources/Prototypes/Entities/Structures/Machines/silo.yml b/Resources/Prototypes/Entities/Structures/Machines/silo.yml index a4666689615b..5a2242322eb0 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/silo.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/silo.yml @@ -23,6 +23,11 @@ tags: - Sheet - Ingot + # CorvaxGoob Start - dept-techfab-tools-materials + - SiloMaterialCloth + - SheetPlasma + - SiloMaterialWood + # CorvaxGoob End - type: ActivatableUI key: enum.OreSiloUiKey.Key - type: ActivatableUIRequiresPower diff --git a/Resources/Prototypes/_CorvaxGoob/Recipes/Lathes/Packs/basicTools.yml b/Resources/Prototypes/_CorvaxGoob/Recipes/Lathes/Packs/basicTools.yml new file mode 100644 index 000000000000..57bf5e44e16a --- /dev/null +++ b/Resources/Prototypes/_CorvaxGoob/Recipes/Lathes/Packs/basicTools.yml @@ -0,0 +1,18 @@ +# Shared maintenance/tools pack for department techfabs. #dept-techfab-tools-materials + +- type: latheRecipePack + id: DepartmentBasicToolsStatic + recipes: + - Wirecutter + - Screwdriver + - Welder + - Wrench + - CrowbarGreen + - Multitool + - ClothingHeadHatWelding + - TrashBag + - MopItem + - LightReplacer + - LightBulb + - LightTube + - Bucket diff --git a/Resources/Prototypes/_CorvaxGoob/tags.yml b/Resources/Prototypes/_CorvaxGoob/tags.yml index 57a98cb5e514..72d5d8b90cba 100644 --- a/Resources/Prototypes/_CorvaxGoob/tags.yml +++ b/Resources/Prototypes/_CorvaxGoob/tags.yml @@ -105,6 +105,12 @@ - type: Tag id: Skills +- type: Tag + id: SiloMaterialCloth + +- type: Tag + id: SiloMaterialWood + - type: Tag id: TelescopicBaton diff --git a/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/lathe.yml index 77e4dee25569..af363fc2aa68 100644 --- a/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/_Goobstation/Entities/Structures/Machines/lathe.yml @@ -25,6 +25,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - SharedBoardsStatic - EngineeringBoardsStatic - CircuitFloorsStatic @@ -109,6 +110,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - ToolsStatic - SharedBoardsStatic - CargoBoardsStatic @@ -179,6 +181,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - SharedBoardsStatic - EngineeringBoardsStatic - CircuitFloorsStatic @@ -274,6 +277,7 @@ idleState: icon runningState: icon staticPacks: + - DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials - ServiceBoardsStatic - ServiceBoardsStaticGoob - MaterialsStatic