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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user