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;