Skip to content
2 changes: 2 additions & 0 deletions Content.Server/Lathe/LatheSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
50 changes: 50 additions & 0 deletions Content.Server/_CorvaxGoob/Lathe/LatheSystem.cs
Original file line number Diff line number Diff line change
@@ -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<MaterialPrototype>[] EngineeringTechFabMaterials =
{
"Plasteel",
"ReinforcedGlass",
"ReinforcedPlasmaGlass",
"ReinforcedUraniumGlass",
"Wood",
};

private static readonly ProtoId<MaterialPrototype>[] CargoTechFabMaterials =
{
"Durathread",
"PlasmaGlass",
"Plasteel",
"ReinforcedGlass",
"ReinforcedPlasmaGlass",
"ReinforcedUraniumGlass",
"UraniumGlass",
"Wood",
};

/// <summary>
/// Adds department material ids that are not discovered from recipes.
/// </summary>
/// <remarks>
/// Keeps extra engineering and cargo materials visible and insertable without disabling the
/// runtime material whitelist for every material.
/// </remarks>
private void AddDepartmentFabricatorMaterials(EntityUid uid, List<ProtoId<MaterialPrototype>> materialWhitelist)
{
var additionalMaterials = MetaData(uid).EntityPrototype?.ID switch
{
"EngineeringTechFab" => EngineeringTechFabMaterials,
"CargoTechFab" => CargoTechFabMaterials,
_ => null,
};

if (additionalMaterials != null)
materialWhitelist.AddRange(additionalMaterials);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -234,6 +235,7 @@
- RawMaterial
- ConstructionMaterial
- DroneUsable # Goobstation
- SiloMaterialCloth # CorvaxGoob - dept-techfab-tools-materials
- type: Item
heldPrefix: durathread

Expand Down Expand Up @@ -283,6 +285,7 @@
- RawMaterial
- ConstructionMaterial
- DroneUsable # Goobstation
- SiloMaterialWood # CorvaxGoob - dept-techfab-tools-materials
- type: Extractable
grindableSolutionName: wood
- type: SolutionContainerManager
Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- SecurityEquipmentStatic
- SecurityPracticeStatic
- SecurityAmmoStatic
Expand Down Expand Up @@ -597,6 +598,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- TopicalsStatic
- ChemistryStatic
- MedicalStatic
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Entities/Structures/Machines/silo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions Resources/Prototypes/_CorvaxGoob/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@
- type: Tag
id: Skills

- type: Tag
id: SiloMaterialCloth

- type: Tag
id: SiloMaterialWood

- type: Tag
id: TelescopicBaton

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- SharedBoardsStatic
- EngineeringBoardsStatic
- CircuitFloorsStatic
Expand Down Expand Up @@ -109,6 +110,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- ToolsStatic
- SharedBoardsStatic
- CargoBoardsStatic
Expand Down Expand Up @@ -179,6 +181,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- SharedBoardsStatic
- EngineeringBoardsStatic
- CircuitFloorsStatic
Expand Down Expand Up @@ -274,6 +277,7 @@
idleState: icon
runningState: icon
staticPacks:
- DepartmentBasicToolsStatic # CorvaxGoob - dept-techfab-tools-materials
- ServiceBoardsStatic
- ServiceBoardsStaticGoob
- MaterialsStatic
Expand Down
Loading