Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2471,5 +2471,15 @@ public static readonly CVarDef<float>
CVarDef.Create("mood.decreases_speed", true, CVar.SERVER);

#endregion

#region Material Reclaimer

/// <summary>
/// Whether or not a Material Reclaimer is allowed to eat people when emagged.
/// </summary>
public static readonly CVarDef<bool> ReclaimerAllowGibbing =
CVarDef.Create("reclaimer.allow_gibbing", true, CVar.SERVER);

#endregion
}
}
17 changes: 10 additions & 7 deletions Content.Shared/Materials/SharedMaterialReclaimerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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";

Expand Down Expand Up @@ -193,16 +196,16 @@ public bool CanStart(EntityUid uid, MaterialReclaimerComponent component)
}

/// <summary>
/// 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.
/// </summary>
public bool CanGib(EntityUid uid, EntityUid victim, MaterialReclaimerComponent component)
{
return false; // DeltaV - Kinda LRP
// return component.Powered &&
// component.Enabled &&
// HasComp<BodyComponent>(victim) &&
// HasComp<EmaggedComponent>(uid);
return _config.GetCVar(CCVars.ReclaimerAllowGibbing)
&& component.Powered
&& component.Enabled
&& HasComp<BodyComponent>(victim)
&& HasComp<EmaggedComponent>(uid);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,5 @@
interactSuccessString: petting-success-recycler
interactFailureString: petting-failure-generic
interactSuccessSound:
path: /Audio/Items/drill_hit.ogg
path: /Audio/Items/drill_hit.ogg
- type: ApcPowerReceiver