borg construction module (#19260)

* cant insert materials into machine if unremoveable

* lingering materials

* add construction cyborg module

* fix empty stack color

* lathe recipe

* a

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-08-23 22:34:39 +01:00
committed by GitHub
parent b61b0e1fd2
commit 4935a95687
10 changed files with 72 additions and 2 deletions

View File

@@ -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<UnremoveableComponent>(toInsert))
return false;
// Material Whitelist checked implicitly by CanChangeMaterialAmount();
var multiplier = TryComp<StackComponent>(toInsert, out var stackComponent) ? stackComponent.Count : 1;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -394,6 +394,7 @@
- BorgModuleRadiationDetection
- BorgModuleTool
- BorgModuleAppraisal
- BorgModuleConstruction
- CyborgEndoskeleton
- LeftArmBorg
- RightArmBorg

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

View File

@@ -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"
},