diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 11cd7e9d3d5..061bf40c0c0 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -2542,5 +2542,15 @@ public static readonly CVarDef CVarDef.Create("mood.decreases_speed", true, CVar.SERVER); #endregion + + #region Material Reclaimer + + /// + /// Whether or not a Material Reclaimer is allowed to eat people when emagged. + /// + public static readonly CVarDef ReclaimerAllowGibbing = + CVarDef.Create("reclaimer.allow_gibbing", true, CVar.SERVER); + + #endregion } } diff --git a/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs b/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs index 50dce3c7669..cd4ae2e7676 100644 --- a/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs +++ b/Content.Shared/Materials/SharedMaterialReclaimerSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Administration.Logs; using Content.Shared.Audio; using Content.Shared.Body.Components; +using Content.Shared.CCVar; using Content.Shared.Coordinates; using Content.Shared.Database; using Content.Shared.Emag.Components; @@ -11,6 +12,7 @@ using Content.Shared.Stacks; using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; +using Robust.Shared.Configuration; using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Physics.Events; @@ -29,6 +31,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem [Dependency] protected readonly SharedAmbientSoundSystem AmbientSound = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] protected readonly SharedContainerSystem Container = default!; + [Dependency] private readonly IConfigurationManager _config = default!; public const string ActiveReclaimerContainerId = "active-material-reclaimer-container"; @@ -193,16 +196,16 @@ public bool CanStart(EntityUid uid, MaterialReclaimerComponent component) } /// - /// Whether or not the reclaimer satisfies the conditions - /// allowing it to gib/reclaim a living creature. + /// Whether or not the reclaimer satisfies the conditions + /// allowing it to gib/reclaim a living creature. /// public bool CanGib(EntityUid uid, EntityUid victim, MaterialReclaimerComponent component) { - return false; // DeltaV - Kinda LRP - // return component.Powered && - // component.Enabled && - // HasComp(victim) && - // HasComp(uid); + return _config.GetCVar(CCVars.ReclaimerAllowGibbing) + && component.Powered + && component.Enabled + && HasComp(victim) + && HasComp(uid); } /// diff --git a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml index 138795cbf13..91eb0335e62 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml @@ -116,4 +116,5 @@ interactSuccessString: petting-success-recycler interactFailureString: petting-failure-generic interactSuccessSound: - path: /Audio/Items/drill_hit.ogg \ No newline at end of file + path: /Audio/Items/drill_hit.ogg + - type: ApcPowerReceiver