From 459660ed9208d87dfb14a1dc4ff4c4c2b03c4287 Mon Sep 17 00:00:00 2001 From: Sailor <109166122+Equivocateur@users.noreply.github.com> Date: Mon, 14 Aug 2023 02:54:52 +0300 Subject: [PATCH] Fix Murdertron 5000 a/k/a Emagged recycler (#18892) * Fix gibbing humans * Millions must gib * Workplace accident * Everything alive goes into the recycler * Review --- Content.Shared/Materials/SharedMaterialReclaimerSystem.cs | 8 +++++--- .../Prototypes/Entities/Structures/Machines/recycler.yml | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs b/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs index 203bff493a..e6e511f875 100644 --- a/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs +++ b/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs @@ -111,11 +111,13 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem if (!CanStart(uid, component)) return false; - if (component.Whitelist != null && !component.Whitelist.IsValid(item) || - HasComp(item) && !CanGib(uid, item, component)) // whitelist? We be gibbing, boy! + if (HasComp(item) && !CanGib(uid, item, component)) // whitelist? We be gibbing, boy! return false; - if (component.Blacklist != null && component.Blacklist.IsValid(item)) + if (component.Whitelist is {} whitelist && !whitelist.IsValid(item)) + return false; + + if (component.Blacklist is {} blacklist && blacklist.IsValid(item)) return false; if (!_container.TryRemoveFromContainer(item)) diff --git a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml index f0e822b090..4cb2cc92d7 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml @@ -87,6 +87,7 @@ whitelist: components: - PhysicalComposition + - MobState - SpaceGarbage tags: - Trash