Fix industrial reagent grinder bug, second attempt (#39690)
* fix recycler 3 * Update Resources/Prototypes/Entities/Structures/Machines/reagent_grinder.yml
This commit is contained in:
@@ -184,18 +184,21 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
|
||||
|
||||
var xform = Transform(uid);
|
||||
|
||||
if (component.ReclaimMaterials)
|
||||
SpawnMaterialsFromComposition(uid, item, completion * component.Efficiency, xform: xform);
|
||||
|
||||
if (CanGib(uid, item, component))
|
||||
{
|
||||
var logImpact = HasComp<HumanoidAppearanceComponent>(item) ? LogImpact.Extreme : LogImpact.Medium;
|
||||
_adminLogger.Add(LogType.Gib, logImpact, $"{ToPrettyString(item):victim} was gibbed by {ToPrettyString(uid):entity} ");
|
||||
if (component.ReclaimSolutions)
|
||||
SpawnChemicalsFromComposition(uid, item, completion, false, component, xform);
|
||||
_body.GibBody(item, true);
|
||||
_appearance.SetData(uid, RecyclerVisuals.Bloody, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (component.ReclaimSolutions)
|
||||
SpawnChemicalsFromComposition(uid, item, completion, true, component, xform);
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,20 @@ public sealed partial class MaterialReclaimerComponent : Component
|
||||
[DataField]
|
||||
public string? SolutionContainerId;
|
||||
|
||||
/// <summary>
|
||||
/// Can this reclaimer reclaim materials?
|
||||
/// They will be spawned as material stacks.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool ReclaimMaterials = true;
|
||||
|
||||
/// <summary>
|
||||
/// Can this reclaimer reclaim solutions?
|
||||
/// The reclaimed reagents will be stored in a buffer or spilled on the ground if that is full.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public bool ReclaimSolutions = true;
|
||||
|
||||
/// <summary>
|
||||
/// If the reclaimer should attempt to reclaim all solutions or just drainable ones
|
||||
/// Difference between Recycler and Industrial Reagent Grinder
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
tags:
|
||||
- HighRiskItem #ian meat
|
||||
efficiency: 0.9
|
||||
reclaimMaterials: false # Materials have ExtractableComponent, which is whitelisted, so we have to avoid infinite recycling loops
|
||||
onlyReclaimDrainable: false
|
||||
solutionContainerId: output
|
||||
- type: Sprite
|
||||
|
||||
Reference in New Issue
Block a user