diff --git a/Content.Shared/Materials/SharedMaterialStorageSystem.cs b/Content.Shared/Materials/SharedMaterialStorageSystem.cs index d2a7af52c6..be93f8dac5 100644 --- a/Content.Shared/Materials/SharedMaterialStorageSystem.cs +++ b/Content.Shared/Materials/SharedMaterialStorageSystem.cs @@ -1,5 +1,6 @@ -using System.Linq; +using System.Linq; using Content.Shared.Interaction; +using Content.Shared.Interaction.Components; using Content.Shared.Stacks; using JetBrains.Annotations; using Robust.Shared.GameStates; @@ -201,6 +202,9 @@ public abstract class SharedMaterialStorageSystem : EntitySystem if (storage.EntityWhitelist?.IsValid(toInsert) == false) return false; + if (HasComp(toInsert)) + return false; + // Material Whitelist checked implicitly by CanChangeMaterialAmount(); var multiplier = TryComp(toInsert, out var stackComponent) ? stackComponent.Count : 1; diff --git a/Content.Shared/Stacks/SharedStackSystem.cs b/Content.Shared/Stacks/SharedStackSystem.cs index c5cd70ced0..5e25c20701 100644 --- a/Content.Shared/Stacks/SharedStackSystem.cs +++ b/Content.Shared/Stacks/SharedStackSystem.cs @@ -336,6 +336,10 @@ namespace Content.Shared.Stacks private void OnStackStarted(EntityUid uid, StackComponent component, ComponentStartup args) { + // on client, lingering stacks that start at 0 need to be darkened + // on server this does nothing + SetCount(uid, component.Count, component); + if (!TryComp(uid, out AppearanceComponent? appearance)) return; diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml index 76dc23b69b..f22eb93e86 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml @@ -100,6 +100,17 @@ - type: Item size: 1 +- type: entity + parent: SheetGlass + id: SheetGlassLingering0 + suffix: Lingering, 0 + components: + - type: Item + size: 0 + - type: Stack + lingering: true + count: 0 + - type: entity parent: SheetGlassBase id: SheetRGlass diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml index 725fb93441..d38cfd5240 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml @@ -98,6 +98,17 @@ stackType: Steel count: 1 +- type: entity + parent: SheetSteel + id: SheetSteelLingering0 + suffix: Lingering, 0 + components: + - type: Item + size: 0 + - type: Stack + lingering: true + count: 0 + - type: entity parent: SheetMetalBase id: SheetPlasteel diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml index 5606de22b9..d07f511fdf 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml @@ -93,3 +93,14 @@ count: 1 - type: Item size: 1 + +- type: entity + parent: PartRodMetal + id: PartRodMetalLingering0 + suffix: Lingering, 0 + components: + - type: Item + size: 0 + - type: Stack + lingering: true + count: 0 diff --git a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml index bcd81225bf..1ac61972ce 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Robotics/borg_modules.yml @@ -212,6 +212,21 @@ items: - GasAnalyzer +- type: entity + id: BorgModuleConstruction + parent: [ BaseBorgModuleEngineering, BaseProviderBorgModule ] + name: construction cyborg module + components: + - type: Sprite + layers: + - state: engineering + - state: icon-construction + - type: ItemBorgModule + items: + - SheetSteelLingering0 + - SheetGlassLingering0 + - PartRodMetalLingering0 + - type: entity id: BorgModuleRCD parent: [ BaseBorgModuleEngineering, BaseProviderBorgModule ] diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 985d11f74d..977f98ed0f 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -394,6 +394,7 @@ - BorgModuleRadiationDetection - BorgModuleTool - BorgModuleAppraisal + - BorgModuleConstruction - CyborgEndoskeleton - LeftArmBorg - RightArmBorg diff --git a/Resources/Prototypes/Recipes/Lathes/robotics.yml b/Resources/Prototypes/Recipes/Lathes/robotics.yml index 1ace3c4929..90a794a265 100644 --- a/Resources/Prototypes/Recipes/Lathes/robotics.yml +++ b/Resources/Prototypes/Recipes/Lathes/robotics.yml @@ -399,6 +399,16 @@ Plastic: 250 Gold: 50 +- type: latheRecipe + id: BorgModuleConstruction + result: BorgModuleConstruction + completetime: 3 + materials: + Steel: 500 + Glass: 750 + Plastic: 250 + Gold: 50 + - type: latheRecipe id: BorgModuleGasAnalyzer result: BorgModuleGasAnalyzer diff --git a/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/icon-construction.png b/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/icon-construction.png new file mode 100644 index 0000000000..fa53867b36 Binary files /dev/null and b/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/icon-construction.png differ diff --git a/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/meta.json b/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/meta.json index abfd0e18a9..780803d815 100644 --- a/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/meta.json +++ b/Resources/Textures/Objects/Specific/Robotics/borgmodule.rsi/meta.json @@ -1,7 +1,7 @@ { "version": 1, "license": "CC0-1.0", - "copyright": "Created by EmoGarbage404 (github) for Space Station 14.", + "copyright": "Created by EmoGarbage404 (github) for Space Station 14. icon-construction.png created by deltanedas (github).", "size": { "x": 32, "y": 32 @@ -31,6 +31,9 @@ { "name": "icon-clown" }, + { + "name": "icon-construction" + }, { "name": "icon-defib" },