]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Recycler Overhaul (#30802)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Mon, 19 Aug 2024 03:39:00 +0000 (23:39 -0400)
committerGitHub <noreply@github.com>
Mon, 19 Aug 2024 03:39:00 +0000 (21:39 -0600)
* Recycler overhaul

* remove

32 files changed:
Content.Client/Materials/RecyclerVisualizerSystem.cs [new file with mode: 0644]
Content.Client/Materials/RecyclerVisualsComponent.cs [new file with mode: 0644]
Content.Server/Materials/MaterialReclaimerSystem.cs
Content.Server/Physics/Controllers/ConveyorController.cs
Content.Server/Repairable/RepairableSystem.cs
Content.Shared/Materials/MaterialReclaimerComponent.cs
Content.Shared/Materials/SharedMaterialReclaimerSystem.cs
Resources/Prototypes/Entities/Objects/Devices/Circuitboards/Machine/production.yml
Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Resources/Prototypes/Entities/Structures/Machines/material_reclaimer.yml [deleted file]
Resources/Prototypes/Entities/Structures/Machines/recycler.yml
Resources/Prototypes/Recipes/Lathes/electronics.yml
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-1.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-2.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-3.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-4.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-5.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-6.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-active.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-idle.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/icon.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/meta.json [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/panel.png [deleted file]
Resources/Textures/Structures/Machines/material_reclaimer.rsi/unlit.png [deleted file]
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2bld.png [new file with mode: 0644]
Resources/Textures/Structures/Machines/recycling.rsi/meta.json
Resources/migration.yml

diff --git a/Content.Client/Materials/RecyclerVisualizerSystem.cs b/Content.Client/Materials/RecyclerVisualizerSystem.cs
new file mode 100644 (file)
index 0000000..646ae40
--- /dev/null
@@ -0,0 +1,27 @@
+using Content.Shared.Conveyor;
+using Content.Shared.Materials;
+using Robust.Client.GameObjects;
+
+namespace Content.Client.Materials;
+
+public sealed class RecyclerVisualizerSystem : VisualizerSystem<RecyclerVisualsComponent>
+{
+    protected override void OnAppearanceChange(EntityUid uid, RecyclerVisualsComponent component, ref AppearanceChangeEvent args)
+    {
+        if (args.Sprite == null || !args.Sprite.LayerMapTryGet(RecyclerVisualLayers.Main, out var layer))
+            return;
+
+        AppearanceSystem.TryGetData<ConveyorState>(uid, ConveyorVisuals.State, out var running);
+        AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Bloody, out var bloody);
+        AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Broken, out var broken);
+
+        var activityState = running == ConveyorState.Off ? 0 : 1;
+        if (broken) //breakage overrides activity
+            activityState = 2;
+
+        var bloodyKey = bloody ? component.BloodyKey : string.Empty;
+
+        var state = $"{component.BaseKey}{activityState}{bloodyKey}";
+        args.Sprite.LayerSetState(layer, state);
+    }
+}
diff --git a/Content.Client/Materials/RecyclerVisualsComponent.cs b/Content.Client/Materials/RecyclerVisualsComponent.cs
new file mode 100644 (file)
index 0000000..4db2632
--- /dev/null
@@ -0,0 +1,17 @@
+namespace Content.Client.Materials;
+
+[RegisterComponent]
+public sealed partial class RecyclerVisualsComponent : Component
+{
+    /// <summary>
+    /// Key appended to state string if bloody.
+    /// </summary>
+    [DataField]
+    public string BloodyKey = "bld";
+
+    /// <summary>
+    /// Base key for the visual state.
+    /// </summary>
+    [DataField]
+    public string BaseKey = "grinder-o";
+}
index b962af2b41fd201c180226b6e7b3717cbcb84a0e..e66c27343c858394c4e147aa95e3ff0cb4b015a8 100644 (file)
@@ -20,19 +20,24 @@ using Robust.Shared.Player;
 using Robust.Shared.Utility;
 using System.Linq;
 using Content.Server.Administration.Logs;
+using Content.Server.Repairable;
 using Content.Shared.Database;
+using Content.Shared.Destructible;
+using Content.Shared.Emag.Components;
+using Robust.Shared.Prototypes;
 
 namespace Content.Server.Materials;
 
 /// <inheritdoc/>
 public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
 {
+    [Dependency] private readonly IPrototypeManager _prototype = default!;
     [Dependency] private readonly AppearanceSystem _appearance = default!;
     [Dependency] private readonly GameTicker _ticker = default!;
     [Dependency] private readonly MaterialStorageSystem _materialStorage = default!;
     [Dependency] private readonly OpenableSystem _openable = default!;
     [Dependency] private readonly PopupSystem _popup = default!;
-    [Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
+    [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
     [Dependency] private readonly SharedBodySystem _body = default!; //bobby
     [Dependency] private readonly PuddleSystem _puddle = default!;
     [Dependency] private readonly StackSystem _stack = default!;
@@ -44,16 +49,14 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
     {
         base.Initialize();
 
-        SubscribeLocalEvent<MaterialReclaimerComponent, ComponentStartup>(OnStartup);
         SubscribeLocalEvent<MaterialReclaimerComponent, PowerChangedEvent>(OnPowerChanged);
         SubscribeLocalEvent<MaterialReclaimerComponent, InteractUsingEvent>(OnInteractUsing,
-            before: new []{typeof(WiresSystem), typeof(SolutionTransferSystem)});
+            before: [typeof(WiresSystem), typeof(SolutionTransferSystem)]);
         SubscribeLocalEvent<MaterialReclaimerComponent, SuicideByEnvironmentEvent>(OnSuicideByEnvironment);
         SubscribeLocalEvent<ActiveMaterialReclaimerComponent, PowerChangedEvent>(OnActivePowerChanged);
-    }
-    private void OnStartup(Entity<MaterialReclaimerComponent> entity, ref ComponentStartup args)
-    {
-        _solutionContainer.EnsureSolution(entity.Owner, entity.Comp.SolutionContainerId);
+
+        SubscribeLocalEvent<MaterialReclaimerComponent, BreakageEventArgs>(OnBreakage);
+        SubscribeLocalEvent<MaterialReclaimerComponent, RepairedEvent>(OnRepaired);
     }
 
     private void OnPowerChanged(Entity<MaterialReclaimerComponent> entity, ref PowerChangedEvent args)
@@ -119,6 +122,30 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
             TryFinishProcessItem(entity, null, entity.Comp);
     }
 
+    private void OnBreakage(Entity<MaterialReclaimerComponent> ent, ref BreakageEventArgs args)
+    {
+        //un-emags itself when it breaks
+        RemComp<EmaggedComponent>(ent);
+        SetBroken(ent, true);
+    }
+
+    private void OnRepaired(Entity<MaterialReclaimerComponent> ent, ref RepairedEvent args)
+    {
+        SetBroken(ent, false);
+    }
+
+    public void SetBroken(Entity<MaterialReclaimerComponent> ent, bool val)
+    {
+        if (ent.Comp.Broken == val)
+            return;
+
+        _appearance.SetData(ent, RecyclerVisuals.Broken, val);
+        SetReclaimerEnabled(ent, false);
+
+        ent.Comp.Broken = val;
+        Dirty(ent);
+    }
+
     /// <inheritdoc/>
     public override bool TryFinishProcessItem(EntityUid uid, MaterialReclaimerComponent? component = null, ActiveMaterialReclaimerComponent? active = null)
     {
@@ -136,7 +163,8 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
 
         // scales the output if the process was interrupted.
         var completion = 1f - Math.Clamp((float) Math.Round((active.EndTime - Timing.CurTime) / active.Duration),
-            0f, 1f);
+            0f,
+            1f);
         Reclaim(uid, item, completion, component);
 
         return true;
@@ -193,7 +221,8 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
 
         foreach (var (storedMaterial, storedAmount) in storage.Storage)
         {
-            var stacks = _materialStorage.SpawnMultipleFromMaterial(storedAmount, storedMaterial,
+            var stacks = _materialStorage.SpawnMultipleFromMaterial(storedAmount,
+                storedMaterial,
                 xform.Coordinates,
                 out var materialOverflow);
             var amountConsumed = storedAmount - materialOverflow;
@@ -215,8 +244,6 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
     {
         if (!Resolve(reclaimer, ref reclaimerComponent, ref xform))
             return;
-        if (!_solutionContainer.TryGetSolution(reclaimer, reclaimerComponent.SolutionContainerId, out var outputSolution))
-            return;
 
         efficiency *= reclaimerComponent.Efficiency;
 
@@ -232,20 +259,14 @@ public sealed class MaterialReclaimerSystem : SharedMaterialReclaimerSystem
         }
 
         // if the item we inserted has reagents, add it in.
-        if (TryComp<SolutionContainerManagerComponent>(item, out var solutionContainer))
+        if (_solutionContainer.TryGetDrainableSolution(item, out _, out var drainableSolution))
         {
-            foreach (var (_, soln) in _solutionContainer.EnumerateSolutions((item, solutionContainer)))
-            {
-                var solution = soln.Comp.Solution;
-                foreach (var quantity in solution.Contents)
-                {
-                    totalChemicals.AddReagent(quantity.Reagent.Prototype, quantity.Quantity * efficiency, false);
-                }
-            }
+            totalChemicals.AddSolution(drainableSolution, _prototype);
         }
 
-        _solutionContainer.TryTransferSolution(outputSolution.Value, totalChemicals, totalChemicals.Volume);
-        if (totalChemicals.Volume > 0)
+        if (!_solutionContainer.TryGetSolution(reclaimer, reclaimerComponent.SolutionContainerId, out var outputSolution) ||
+            !_solutionContainer.TryTransferSolution(outputSolution.Value, totalChemicals, totalChemicals.Volume) ||
+            totalChemicals.Volume > 0)
         {
             _puddle.TrySpillAt(reclaimer, totalChemicals, out _, sound, transformComponent: xform);
         }
index db4307f6de58883e269541e4b0acfa80e7a9f292..e2788fa54cfb0fcd2afce3963c86a5c8ba26ba8e 100644 (file)
@@ -3,6 +3,7 @@ using Content.Server.DeviceLinking.Systems;
 using Content.Server.Materials;
 using Content.Server.Power.Components;
 using Content.Shared.Conveyor;
+using Content.Shared.Destructible;
 using Content.Shared.Maps;
 using Content.Shared.Physics;
 using Content.Shared.Physics.Controllers;
@@ -26,7 +27,7 @@ public sealed class ConveyorController : SharedConveyorController
         UpdatesAfter.Add(typeof(MoverController));
         SubscribeLocalEvent<ConveyorComponent, ComponentInit>(OnInit);
         SubscribeLocalEvent<ConveyorComponent, ComponentShutdown>(OnConveyorShutdown);
-
+        SubscribeLocalEvent<ConveyorComponent, BreakageEventArgs>(OnBreakage);
 
         SubscribeLocalEvent<ConveyorComponent, SignalReceivedEvent>(OnSignalReceived);
         SubscribeLocalEvent<ConveyorComponent, PowerChangedEvent>(OnPowerChanged);
@@ -61,6 +62,11 @@ public sealed class ConveyorController : SharedConveyorController
         _fixtures.DestroyFixture(uid, ConveyorFixture, body: physics);
     }
 
+    private void OnBreakage(Entity<ConveyorComponent> ent, ref BreakageEventArgs args)
+    {
+        SetState(ent, ConveyorState.Off, ent);
+    }
+
     private void OnPowerChanged(EntityUid uid, ConveyorComponent component, ref PowerChangedEvent args)
     {
         component.Powered = args.Powered;
@@ -96,13 +102,14 @@ public sealed class ConveyorController : SharedConveyorController
         if (!Resolve(uid, ref component))
             return;
 
+        if (!_materialReclaimer.SetReclaimerEnabled(uid, state != ConveyorState.Off))
+            return;
+
         component.State = state;
 
         if (TryComp<PhysicsComponent>(uid, out var physics))
             _broadphase.RegenerateContacts(uid, physics);
 
-        _materialReclaimer.SetReclaimerEnabled(uid, component.State != ConveyorState.Off);
-
         UpdateAppearance(uid, component);
         Dirty(uid, component);
     }
index ec24cd819750e907f1ec95c03af48f503e0a4485..68dcfd6743d4e8d74f70fc7fe53d2bd5d3f6fef6 100644 (file)
@@ -46,6 +46,9 @@ namespace Content.Server.Repairable
                 ("target", uid),
                 ("tool", args.Used!));
             _popup.PopupEntity(str, uid, args.User);
+
+            var ev = new RepairedEvent((uid, component), args.User);
+            RaiseLocalEvent(uid, ref ev);
         }
 
         public async void Repair(EntityUid uid, RepairableComponent component, InteractUsingEvent args)
@@ -72,4 +75,13 @@ namespace Content.Server.Repairable
             args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, delay, component.QualityNeeded, new RepairFinishedEvent(), component.FuelCost);
         }
     }
+
+    /// <summary>
+    /// Event raised on an entity when its successfully repaired.
+    /// </summary>
+    /// <param name="Ent"></param>
+    /// <param name="User"></param>
+    [ByRefEvent]
+    public readonly record struct RepairedEvent(Entity<RepairableComponent> Ent, EntityUid User);
+
 }
index 3e72baf6041ea0ec99b5213d957fd6152b12c14e..372cd114abfc4cdd353d8e99ac68a23398e80553 100644 (file)
@@ -1,4 +1,5 @@
 using Content.Shared.Whitelist;
+using JetBrains.Annotations;
 using Robust.Shared.Audio;
 using Robust.Shared.GameStates;
 using Robust.Shared.Serialization;
@@ -27,6 +28,12 @@ public sealed partial class MaterialReclaimerComponent : Component
     [DataField, AutoNetworkedField, ViewVariables(VVAccess.ReadWrite)]
     public bool Enabled = true;
 
+    /// <summary>
+    /// A master control for whether or not the recycler is broken and can function.
+    /// </summary>
+    [DataField, AutoNetworkedField]
+    public bool Broken;
+
     /// <summary>
     /// How efficiently the materials are reclaimed.
     /// In practice, a multiplier per material when calculating the output of the reclaimer.
@@ -59,8 +66,8 @@ public sealed partial class MaterialReclaimerComponent : Component
     /// <summary>
     /// The id of our output solution
     /// </summary>
-    [DataField, ViewVariables(VVAccess.ReadWrite)]
-    public string SolutionContainerId = "output";
+    [DataField]
+    public string? SolutionContainerId;
 
     /// <summary>
     /// a whitelist for what entities can be inserted into this reclaimer
@@ -114,11 +121,12 @@ public sealed partial class MaterialReclaimerComponent : Component
 [NetSerializable, Serializable]
 public enum RecyclerVisuals
 {
-    Bloody
+    Bloody,
+    Broken
 }
 
+[UsedImplicitly]
 public enum RecyclerVisualLayers : byte
 {
-    Main,
-    Bloody
+    Main
 }
index 866148b113161d4bc71b7870388a54d29f530882..d143f509485c8ec2e5463b10a7187931cb3064d6 100644 (file)
@@ -2,7 +2,6 @@ using System.Linq;
 using Content.Shared.Administration.Logs;
 using Content.Shared.Audio;
 using Content.Shared.Body.Components;
-using Content.Shared.Coordinates;
 using Content.Shared.Database;
 using Content.Shared.Emag.Components;
 using Content.Shared.Emag.Systems;
@@ -10,7 +9,6 @@ using Content.Shared.Examine;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Stacks;
 using Content.Shared.Whitelist;
-using Robust.Shared.Audio;
 using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
@@ -102,7 +100,8 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
 
         if (user != null)
         {
-            _adminLog.Add(LogType.Action, LogImpact.High,
+            _adminLog.Add(LogType.Action,
+                LogImpact.High,
                 $"{ToPrettyString(user.Value):player} destroyed {ToPrettyString(item)} in the material reclaimer, {ToPrettyString(uid)}");
         }
 
@@ -171,13 +170,19 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
     /// <summary>
     /// Sets the Enabled field on the reclaimer.
     /// </summary>
-    public void SetReclaimerEnabled(EntityUid uid, bool enabled, MaterialReclaimerComponent? component = null)
+    public bool SetReclaimerEnabled(EntityUid uid, bool enabled, MaterialReclaimerComponent? component = null)
     {
         if (!Resolve(uid, ref component, false))
-            return;
+            return true;
+
+        if (component.Broken && enabled)
+            return false;
+
         component.Enabled = enabled;
         AmbientSound.SetAmbience(uid, enabled && component.Powered);
         Dirty(uid, component);
+
+        return true;
     }
 
     /// <summary>
@@ -189,7 +194,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
         if (HasComp<ActiveMaterialReclaimerComponent>(uid))
             return false;
 
-        return component.Powered && component.Enabled;
+        return component.Powered && component.Enabled && !component.Broken;
     }
 
     /// <summary>
@@ -200,6 +205,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
     {
         return component.Powered &&
                component.Enabled &&
+               !component.Broken &&
                HasComp<BodyComponent>(victim) &&
                HasComp<EmaggedComponent>(uid);
     }
index e48fb0a26300f0c9cd475d6e9f64eed67561f1b4..040a7daffcf623b4e96b538eac3c22d2a520d4e1 100644 (file)
       Manipulator: 1
       Steel: 1
 
-- type: entity
-  id: MaterialReclaimerMachineCircuitboard
-  parent: BaseMachineCircuitboard
-  name: material reclaimer machine board
-  components:
-    - type: Sprite
-      state: supply
-    - type: MachineBoard
-      prototype: MaterialReclaimer
-      stackRequirements:
-        Manipulator: 2
-        Steel: 5
-        Plastic: 5
-
 - type: entity
   id: OreProcessorMachineCircuitboard
   parent: BaseMachineCircuitboard
index da1d9aa6a2440fb2d34b8435a268147b4c482dc2..6c97f9fd5f23a4f59a6db104f49b967de1e00f6f 100644 (file)
     - AutolatheMachineCircuitboard
     - CircuitImprinterMachineCircuitboard
     - OreProcessorMachineCircuitboard
-    - MaterialReclaimerMachineCircuitboard
     - ElectrolysisUnitMachineCircuitboard
     - CentrifugeMachineCircuitboard
     - ChemDispenserMachineCircuitboard
diff --git a/Resources/Prototypes/Entities/Structures/Machines/material_reclaimer.yml b/Resources/Prototypes/Entities/Structures/Machines/material_reclaimer.yml
deleted file mode 100644 (file)
index 9a9c528..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-- type: entity
-  parent: [ BaseMachinePowered, ConstructibleMachine ]
-  id: MaterialReclaimer
-  name: material reclaimer
-  description: Cannot reclaim immaterial things, like motivation.
-  components:
-  - type: Sprite
-    sprite: Structures/Machines/material_reclaimer.rsi
-    snapCardinals: true
-    layers:
-    - state: icon
-      map: ["enum.LatheVisualLayers.IsRunning"]
-    - state: gear-active
-      map: ["enum.DamageStateVisualLayers.Base"]
-    - state: unlit
-      shader: unshaded
-      map: ["enum.PowerDeviceVisualLayers.Powered"]
-    - state: fill-6
-      map: ["enum.SolutionContainerLayers.Fill"]
-      visible: false
-    - state: panel
-      map: ["enum.WiresVisualLayers.MaintenancePanel"]
-  - type: Appearance
-  - type: SolutionContainerVisuals
-    maxFillLevels: 6
-    fillBaseName: fill-
-  - type: WiresVisuals
-  - type: GenericVisualizer
-    visuals:
-      enum.PowerDeviceVisuals.Powered:
-        enum.DamageStateVisualLayers.Base:
-          True: { state: gear-active}
-          False: { state: gear-idle }
-        enum.PowerDeviceVisualLayers.Powered:
-          True: { visible: true }
-          False: { visible: false }
-  - type: LitOnPowered
-  - type: PointLight
-    radius: 1.5
-    energy: 1.6
-    enabled: false
-    color: "#da824d"
-    mask: /Textures/Effects/LightMasks/cone.png
-    autoRot: true
-    offset: "0, 0.4"
-    castShadows: false
-  - type: PowerSwitch
-  - type: Destructible
-    thresholds:
-    - trigger:
-        !type:DamageTrigger
-        damage: 100
-      behaviors:
-      - !type:PlaySoundBehavior
-        sound:
-          collection: MetalGlassBreak
-      - !type:ChangeConstructionNodeBehavior
-        node: machineFrame
-      - !type:DoActsBehavior
-        acts: ["Destruction"]
-  - type: Machine
-    board: MaterialReclaimerMachineCircuitboard
-  - type: WiresPanel
-  - type: MaterialReclaimer
-    whitelist:
-      components:
-      - PhysicalComposition
-      - SpaceGarbage
-      tags:
-      - Trash
-      - Recyclable
-    blacklist:
-      components:
-      - Material
-      - Pda
-      - IdCard
-      - Brain
-      tags:
-      - HighRiskItem
-    soundCooldown: 0
-    sound:
-      path: /Audio/Ambience/Objects/crushing.ogg
-      params:
-        volume: 5
-        maxDistance: 5
-        loop: true
-  - type: MaterialStorage
-    insertOnInteract: false
-  - type: ContainerContainer
-    containers:
-      active-material-reclaimer-container: !type:Container
-      machine_board: !type:Container
-      machine_parts: !type:Container
-  - type: SolutionContainerManager
-    solutions:
-      output:
-        maxVol: 100
-  - type: DrainableSolution
-    solution: output
-  - type: ExaminableSolution
-    solution: output
-  - type: StaticPrice
-    price: 500
index 138795cbf132caeece5e9730fa67236635adbbd6..8bbbad6c0d1966216f0c6a723e5b0cd07162247d 100644 (file)
     layers:
     - state: grinder-o0
       map: ["enum.RecyclerVisualLayers.Main"]
-    - state: grinder-o0bld
-      map: ["enum.RecyclerVisualLayers.Bloody"]
-      visible: false
   - type: Appearance
-  - type: GenericVisualizer
-    visuals:
-      enum.RecyclerVisuals.Bloody:
-        enum.RecyclerVisualLayers.Main:
-          True: { visible: false }
-          False: { visible: true }
-        enum.RecyclerVisualLayers.Bloody:
-          True: { visible: true }
-          False: { visible: false }
-      enum.ConveyorVisuals.State:
-        enum.RecyclerVisualLayers.Main:
-          Forward: { state: grinder-o1 }
-          Reverse: { state: grinder-o1 }
-          Off: { state: grinder-o0 }
-        enum.RecyclerVisualLayers.Bloody:
-          Forward: { state: grinder-o1bld }
-          Reverse: { state: grinder-o1bld }
-          Off: { state: grinder-o0bld }
+  - type: RecyclerVisuals
+
   - type: CollideMaterialReclaimer
   - type: MaterialReclaimer
     enabled: false
-    efficiency: 0.25
     scaleProcessSpeed: false #instant!
     minimumProcessDuration: 0
     whitelist:
       params:
         volume: -3
     cutOffSound: false
-  - type: SolutionContainerManager
-    solutions:
-      output:
-        maxVol: 0 #exists only for the overflow stuff on material reclaimer
   - type: MaterialStorage
   - type: Conveyor
   - type: Rotatable
+  - type: Repairable
+    doAfterDelay: 5
+    fuelCost: 25
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 300
+      behaviors:
+      - !type:DoActsBehavior
+        acts: ["Breakage"]
+      - !type:PlaySoundBehavior
+        sound:
+          collection: MetalBreak
   - type: InteractionPopup
     successChance: 1.0
     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
index 4690055a9fda63c136ca6ab880d74cd148f79a66..1bbd60e3af6e3bcb1a2f920eee03071726548c64 100644 (file)
     Steel: 100
     Glass: 500
 
-- type: latheRecipe
-  id: MaterialReclaimerMachineCircuitboard
-  result: MaterialReclaimerMachineCircuitboard
-  category: Circuitry
-  completetime: 4
-  materials:
-    Steel: 100
-    Glass: 500
-
 - type: latheRecipe
   id: OreProcessorMachineCircuitboard
   result: OreProcessorMachineCircuitboard
      Steel: 100
      Glass: 500
      Gold: 100
+
 - type: latheRecipe
   id: JukeboxCircuitBoard
   result: JukeboxCircuitBoard
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-1.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-1.png
deleted file mode 100644 (file)
index 32efd40..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-1.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-2.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-2.png
deleted file mode 100644 (file)
index 71883d8..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-2.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-3.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-3.png
deleted file mode 100644 (file)
index 747e6a3..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-3.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-4.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-4.png
deleted file mode 100644 (file)
index e734cce..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-4.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-5.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-5.png
deleted file mode 100644 (file)
index 1ed097f..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-5.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-6.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-6.png
deleted file mode 100644 (file)
index ab269ef..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/fill-6.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-active.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-active.png
deleted file mode 100644 (file)
index a228b14..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-active.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-idle.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-idle.png
deleted file mode 100644 (file)
index 96a795a..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/gear-idle.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/icon.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/icon.png
deleted file mode 100644 (file)
index 7ba2ef7..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/icon.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/meta.json b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/meta.json
deleted file mode 100644 (file)
index 3e27312..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-{
-  "version": 1,
-  "license": "CC0-1.0",
-  "copyright": "Created by EmoGarbage404 (github) for Space Station 14",
-  "size": {
-    "x": 32,
-    "y": 32
-  },
-  "states": [
-    {
-      "name": "fill-1"
-    },
-    {
-      "name": "fill-2"
-    },
-    {
-      "name": "fill-3"
-    },
-    {
-      "name": "fill-4"
-    },
-    {
-      "name": "fill-5"
-    },
-    {
-      "name": "fill-6"
-    },
-    {
-      "name": "gear-active",
-      "delays": [
-        [
-          0.25,
-          0.25,
-          0.25
-        ]
-      ]
-    },
-    {
-      "name": "gear-idle"
-    },
-    {
-      "name": "icon"
-    },
-    {
-      "name": "panel"
-    },
-    {
-      "name": "unlit",
-      "delays": [
-        [
-          0.1,
-          1.0
-        ]
-      ]
-    }
-  ]
-}
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/panel.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/panel.png
deleted file mode 100644 (file)
index b3de5c1..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/panel.png and /dev/null differ
diff --git a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/unlit.png b/Resources/Textures/Structures/Machines/material_reclaimer.rsi/unlit.png
deleted file mode 100644 (file)
index 9c9511a..0000000
Binary files a/Resources/Textures/Structures/Machines/material_reclaimer.rsi/unlit.png and /dev/null differ
index e1449a9a223521741f06df28564fab0ff4738384..84e3c4ec9d506c620ad971b41a07921fa335d8bb 100644 (file)
Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png differ
index b4a1f08b06a6d003ae6996203774e2de5ac0ad58..b226f9e1c7ca34b346ff46b96a18244c98bb89cf 100644 (file)
Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png differ
index 794c319632af1389be9e4202a7eb943654d45eff..abba97a410b8edbf35dcd4cdc5d7fe24abca236a 100644 (file)
Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png differ
index 24d85075cb31d275a065275408356d60fc542b56..5b69e7dcee96270ebb6e7d299271fe24888aeb2a 100644 (file)
Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png differ
diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2.png
new file mode 100644 (file)
index 0000000..f07cc6f
Binary files /dev/null and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2.png differ
diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2bld.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2bld.png
new file mode 100644 (file)
index 0000000..8821be1
Binary files /dev/null and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o2bld.png differ
index e176651d17b8aeea2c9e5263111c5c3de65b2490..12d7b779ccbd8f0daff8e33ee74b8ad49a1d6edd 100644 (file)
             ]
         },
         {
-            "name": "grinder-o0"
-
+            "name": "grinder-o0",
+            "directions": 4
         },
         {
-            "name": "grinder-o0bld"
-
+            "name": "grinder-o0bld",
+            "directions": 4
         },
         {
             "name": "grinder-o1",
+            "directions": 4,
             "delays": [
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
                 [
                     0.1,
                     0.1,
         },
         {
             "name": "grinder-o1bld",
+            "directions": 4,
             "delays": [
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
+                [
+                    0.1,
+                    0.1,
+                    0.1,
+                    0.1
+                ],
                 [
                     0.1,
                     0.1,
                 ]
             ]
         },
+        {
+            "name": "grinder-o2",
+            "directions": 4
+        },
+        {
+            "name": "grinder-o2bld",
+            "directions": 4
+        },
         {
             "name": "separator-"
 
index 7de70260f788b2b0e3262c66d44b8707ea8af3ab..9ce3d71156a73b213cd5cba9232e03223f795a33 100644 (file)
@@ -383,6 +383,10 @@ SignHydro3: SignHydro1
 # 2024-07-27
 LogicGate: LogicGateOr
 
+# 2024-08-08
+MaterialReclaimer: null
+MaterialReclaimerMachineCircuitboard: null
+
 # 2024-08-11
 FoodTacoBeef: FoodTacoShell
 FoodTacoChicken: FoodTacoShell
@@ -398,4 +402,4 @@ FoodMeatRatdoubleKebab: FoodKebabSkewer
 FoodMeatSnakeKebab: FoodKebabSkewer
 FoodMeatHawaiianKebab: FoodKebabSkewer
 FoodMeatKebab: FoodKebabSkewer
-FoodMeatFiestaKebab: FoodKebabSkewer
\ No newline at end of file
+FoodMeatFiestaKebab: FoodKebabSkewer