diff --git a/Content.Server/Conveyor/ConveyorSystem.cs b/Content.Server/Conveyor/ConveyorSystem.cs index a1cdf8c7b8..b68537062c 100644 --- a/Content.Server/Conveyor/ConveyorSystem.cs +++ b/Content.Server/Conveyor/ConveyorSystem.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using Content.Server.MachineLinking.Events; using Content.Server.MachineLinking.Models; using Content.Server.Power.Components; +using Content.Server.Recycling; +using Content.Server.Recycling.Components; using Content.Server.Stunnable; using Content.Shared.Conveyor; using Content.Shared.Item; @@ -20,6 +22,7 @@ namespace Content.Server.Conveyor { public sealed class ConveyorSystem : EntitySystem { + [Dependency] private RecyclerSystem _recycler = default!; [Dependency] private StunSystem _stunSystem = default!; public override void Initialize() @@ -87,6 +90,15 @@ namespace Content.Server.Conveyor TwoWayLeverSignal.Right => ConveyorState.Forward, _ => ConveyorState.Off }; + + if (TryComp(component.Owner, out var recycler)) + { + if (component.State != ConveyorState.Off) + _recycler.EnableRecycler(recycler); + else + _recycler.DisableRecycler(recycler); + } + UpdateAppearance(component); } diff --git a/Content.Server/Physics/Controllers/ConveyorController.cs b/Content.Server/Physics/Controllers/ConveyorController.cs index 6230ec2a8f..064e9b0182 100644 --- a/Content.Server/Physics/Controllers/ConveyorController.cs +++ b/Content.Server/Physics/Controllers/ConveyorController.cs @@ -1,13 +1,8 @@ -using System; -using System.Collections.Generic; using Content.Server.Conveyor; using Content.Shared.Conveyor; using Content.Shared.Movement.Components; using Robust.Shared.Containers; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; using Robust.Shared.Map; -using Robust.Shared.Maths; using Robust.Shared.Physics; using Robust.Shared.Physics.Controllers; diff --git a/Content.Server/Recycling/Components/RecyclableComponent.cs b/Content.Server/Recycling/Components/RecyclableComponent.cs index e94792b1d2..2270357274 100644 --- a/Content.Server/Recycling/Components/RecyclableComponent.cs +++ b/Content.Server/Recycling/Components/RecyclableComponent.cs @@ -1,24 +1,20 @@ -using System; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Server.Recycling.Components { - [RegisterComponent] + [RegisterComponent, Friend(typeof(RecyclerSystem))] public sealed class RecyclableComponent : Component { - [Dependency] private readonly IEntityManager _entMan = default!; - /// /// The prototype that will be spawned on recycle. /// - [DataField("prototype")] private string? _prototype; + [DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer))] public string? Prototype; /// /// The amount of things that will be spawned on recycle. /// - [DataField("amount")] private int _amount = 1; + [DataField("amount")] public int Amount = 1; /// /// Whether this is "safe" to recycle or not. @@ -26,19 +22,5 @@ namespace Content.Server.Recycling.Components /// [DataField("safe")] public bool Safe { get; set; } = true; - - public void Recycle(float efficiency = 1f) - { - if(!string.IsNullOrEmpty(_prototype)) - { - for (var i = 0; i < Math.Max(_amount * efficiency, 1); i++) - { - _entMan.SpawnEntity(_prototype, _entMan.GetComponent(Owner).Coordinates); - } - - } - - _entMan.QueueDeleteEntity(Owner); - } } } diff --git a/Content.Server/Recycling/Components/RecyclerComponent.cs b/Content.Server/Recycling/Components/RecyclerComponent.cs index c2349f0e77..7236391a3a 100644 --- a/Content.Server/Recycling/Components/RecyclerComponent.cs +++ b/Content.Server/Recycling/Components/RecyclerComponent.cs @@ -6,13 +6,8 @@ using Content.Server.Popups; using Content.Shared.Body.Components; using Content.Shared.Popups; using Content.Shared.Recycling; +using Content.Shared.Sound; using Robust.Server.GameObjects; -using Robust.Shared.Analyzers; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Localization; -using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.ViewVariables; namespace Content.Server.Recycling.Components { @@ -23,6 +18,10 @@ namespace Content.Server.Recycling.Components { [Dependency] private readonly IEntityManager _entMan = default!; + [ViewVariables] + [DataField("enabled")] + public bool Enabled = true; + /// /// Whether or not sentient beings will be recycled /// @@ -47,13 +46,15 @@ namespace Content.Server.Recycling.Components SuicideKind ISuicideAct.Suicide(EntityUid victim, IChatManager chat) { - if (_entMan.TryGetComponent(victim, out ActorComponent? actor) && actor.PlayerSession.ContentData()?.Mind is {} mind) + if (_entMan.TryGetComponent(victim, out ActorComponent? actor) && + actor.PlayerSession.ContentData()?.Mind is { } mind) { EntitySystem.Get().OnGhostAttempt(mind, false); mind.OwnedEntity?.PopupMessage(Loc.GetString("recycler-component-suicide-message")); } - victim.PopupMessageOtherClients(Loc.GetString("recycler-component-suicide-message-others", ("victim",victim))); + victim.PopupMessageOtherClients(Loc.GetString("recycler-component-suicide-message-others", + ("victim", victim))); if (_entMan.TryGetComponent(victim, out var body)) { @@ -61,8 +62,16 @@ namespace Content.Server.Recycling.Components } EntitySystem.Get().Bloodstain(this); - return SuicideKind.Bloodloss; } + + /// + /// Default sound to play when recycling + /// + [ViewVariables(VVAccess.ReadWrite)] [DataField("sound")] + public SoundSpecifier? Sound = new SoundPathSpecifier("/Audio/Effects/saw.ogg"); + + // Ratelimit sounds to avoid spam + public TimeSpan LastSound; } } diff --git a/Content.Server/Recycling/RecyclerSystem.cs b/Content.Server/Recycling/RecyclerSystem.cs index d3c4ed9bf3..640cc74100 100644 --- a/Content.Server/Recycling/RecyclerSystem.cs +++ b/Content.Server/Recycling/RecyclerSystem.cs @@ -1,52 +1,93 @@ +using Content.Server.Audio; using Content.Server.Power.Components; using Content.Server.Recycling.Components; +using Content.Shared.Audio; using Content.Shared.Body.Components; -using Content.Shared.Recycling; using Content.Shared.Emag.Systems; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; +using Content.Shared.Recycling; +using Content.Shared.Tag; +using Robust.Shared.Audio; using Robust.Shared.Physics.Dynamics; using Robust.Shared.Player; +using Robust.Shared.Timing; namespace Content.Server.Recycling { - internal sealed class RecyclerSystem : EntitySystem + public sealed class RecyclerSystem : EntitySystem { + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly AmbientSoundSystem _ambience = default!; + [Dependency] private readonly TagSystem _tags = default!; + + private const float RecyclerSoundCooldown = 0.8f; + public override void Initialize() { - base.Initialize(); - SubscribeLocalEvent(HandleCollide); + SubscribeLocalEvent(OnCollide); SubscribeLocalEvent(OnEmagged); } - private void HandleCollide(EntityUid uid, RecyclerComponent component, StartCollideEvent args) + public void EnableRecycler(RecyclerComponent component) { + if (component.Enabled) return; + + component.Enabled = true; + _ambience.SetAmbience(component.Owner, true); + } + + public void DisableRecycler(RecyclerComponent component) + { + if (!component.Enabled) return; + + component.Enabled = false; + _ambience.SetAmbience(component.Owner, false); + } + + private void OnCollide(EntityUid uid, RecyclerComponent component, StartCollideEvent args) + { + if (component.Enabled && args.OurFixture.ID != "brrt") return; + Recycle(component, args.OtherFixture.Body.Owner); } private void Recycle(RecyclerComponent component, EntityUid entity) { - // TODO: Prevent collision with recycled items + RecyclableComponent? recyclable = null; // Can only recycle things that are recyclable... And also check the safety of the thing to recycle. - if (!EntityManager.TryGetComponent(entity, out RecyclableComponent? recyclable) || !recyclable.Safe && component.Safe) return; + if (!_tags.HasTag(entity, "Recyclable") && + (!TryComp(entity, out recyclable) || !recyclable.Safe && component.Safe)) + { + return; + } + + // TODO: Prevent collision with recycled items // Mobs are a special case! if (CanGib(component, entity)) { - EntityManager.GetComponent(entity).Gib(true); + Comp(entity).Gib(true); Bloodstain(component); return; } - recyclable.Recycle(component.Efficiency); + if (recyclable == null) + QueueDel(entity); + else + Recycle(recyclable, component.Efficiency); + + if (component.Sound != null && (_timing.CurTime - component.LastSound).TotalSeconds > RecyclerSoundCooldown) + { + SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.Sound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.01f).WithVolume(-3)); + component.LastSound = _timing.CurTime; + } } private bool CanGib(RecyclerComponent component, EntityUid entity) { - // We suppose this entity has a Recyclable component. - return EntityManager.HasComponent(entity) && !component.Safe && - EntityManager.TryGetComponent(component.Owner, out ApcPowerReceiverComponent? receiver) && receiver.Powered; + // TODO: Power needs a helper for this jeez + return HasComp(entity) && !component.Safe && + TryComp(component.Owner, out var receiver) && receiver.Powered; } public void Bloodstain(RecyclerComponent component) @@ -57,13 +98,26 @@ namespace Content.Server.Recycling } } + private void Recycle(RecyclableComponent component, float efficiency = 1f) + { + if (!string.IsNullOrEmpty(component.Prototype)) + { + var xform = Transform(component.Owner); + + for (var i = 0; i < Math.Max(component.Amount * efficiency, 1); i++) + { + Spawn(component.Prototype, xform.Coordinates); + } + } + + QueueDel(component.Owner); + } + private void OnEmagged(EntityUid uid, RecyclerComponent component, GotEmaggedEvent args) { - if (component.Safe == true) - { - component.Safe = false; - args.Handled = true; - } + if (!component.Safe) return; + component.Safe = false; + args.Handled = true; } } } diff --git a/Resources/Audio/Ambience/Objects/circular_saw.ogg b/Resources/Audio/Ambience/Objects/circular_saw.ogg new file mode 100644 index 0000000000..a816e9990d Binary files /dev/null and b/Resources/Audio/Ambience/Objects/circular_saw.ogg differ diff --git a/Resources/Audio/Ambience/Objects/license.txt b/Resources/Audio/Ambience/Objects/license.txt new file mode 100644 index 0000000000..f0c29b5b7b --- /dev/null +++ b/Resources/Audio/Ambience/Objects/license.txt @@ -0,0 +1 @@ +circular_saw.ogg - https://freesound.org/people/derjuli/sounds/448133/ and clipped - CC0-1.0 \ No newline at end of file diff --git a/Resources/Audio/Effects/license.txt b/Resources/Audio/Effects/license.txt index 9612726429..8cc37bea43 100644 --- a/Resources/Audio/Effects/license.txt +++ b/Resources/Audio/Effects/license.txt @@ -1,20 +1,23 @@ -hit_kick.ogg is made by Taira Komori -(https://taira-komori.jpn.org/freesounden.html) - -smoke.ogg taken from https://github.com/tgstation/tgstation/blob/a5d362ce84e4f0c61026236d5ec84d3c81553664/sound/effects/smoke.ogg - -adminhelp.ogg taken from https://github.com/tgstation/tgstation/blob/d775e1ac804eb9d0259573f5f29a18d320c97ef3/sound/effects/adminhelp.ogg +adminhelp.ogg taken from https://github.com/tgstation/tgstation/blob/d775e1ac804eb9d0259573f5f29a18d320c97ef3/sound/effects/adminhelp.ogg (available in master, therefore see master license: "All assets including icons and sound are under a Creative Commons 3.0 BY-SA license unless otherwise indicated.") "Changed the adminhelpsound to some creative commons sound I pinched. Until somebody can get a better one. I'm sick of MAAAAAAAAOOOOOOW." Actual source is https://freesound.org/people/martian/sounds/19261/ (CC0) The sound had been reversed and the volume altered. -voteding.ogg taken from "Bike, Bell Ding, Single, 01-01.wav" by InspectorJ (www.jshaw.co.uk) of Freesound.org at https://freesound.org/people/InspectorJ/sounds/484344/ under CC BY 3.0. The volume has been reduced. +hit_kick.ogg is made by Taira Komori +(https://taira-komori.jpn.org/freesounden.html) + +fire.ogg taken and edited from https://freesound.org/people/raremess/sounds/222557/ + +holy.ogg taken from https://freesound.org/people/random_intruder/sounds/392172/ and edited poster_broken.ogg taken from https://github.com/tgstation/tgstation/blob/2834383245d2129a106acef3afd17b81e1e64777/sound/items/poster_ripped.ogg poster_being_set.ogg taken from https://github.com/tgstation/tgstation/blob/2834383245d2129a106acef3afd17b81e1e64777/sound/items/poster_ripped.ogg -fire.ogg taken and edited from https://freesound.org/people/raremess/sounds/222557/ +saw.ogg taken from https://freesound.org/people/domiscz/sounds/461728/ and clipped - CC0-1.0 +*It's actually an angle grinder -holy.ogg taken from https://freesound.org/people/random_intruder/sounds/392172/ and edited +smoke.ogg taken from https://github.com/tgstation/tgstation/blob/a5d362ce84e4f0c61026236d5ec84d3c81553664/sound/effects/smoke.ogg + +voteding.ogg taken from "Bike, Bell Ding, Single, 01-01.wav" by InspectorJ (www.jshaw.co.uk) of Freesound.org at https://freesound.org/people/InspectorJ/sounds/484344/ under CC BY 3.0. The volume has been reduced. \ No newline at end of file diff --git a/Resources/Audio/Effects/saw.ogg b/Resources/Audio/Effects/saw.ogg new file mode 100644 index 0000000000..70052bce83 Binary files /dev/null and b/Resources/Audio/Effects/saw.ogg differ diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml index ab287bc8b6..fc0890b538 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml @@ -2104,6 +2104,7 @@ sprite: Objects/Consumable/Drinks/ramen.rsi - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml index 9bfa84b015..e1fe9f9a9e 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml @@ -36,6 +36,7 @@ stateOpen: icon_open - type: Tag tags: + - Recyclable - Trash - type: ItemCooldown - type: Recyclable @@ -56,6 +57,7 @@ - type: Tag tags: - Cola + - Recyclable - Trash - type: Sprite sprite: Objects/Consumable/Drinks/cola.rsi diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml index 953234e728..f37ccf36cd 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml @@ -52,6 +52,7 @@ acts: [ "Destruction" ] - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml index 3a5300b0b7..979a1a63f1 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml @@ -55,6 +55,7 @@ netsync: false - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml index cab454e938..c8476cef75 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml @@ -7,6 +7,7 @@ abstract: true components: - type: Food + - type: Recyclable - type: Sprite netsync: false diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml index 17a1139e39..fe67fd8232 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml @@ -195,6 +195,7 @@ - SmallImpassable - type: Tag tags: + - Recyclable - Trash - type: SolutionContainerManager solutions: diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml index c4fd07855b..f45a184026 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml @@ -208,6 +208,7 @@ HeldPrefix: packet - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml index 736ed8d01d..f27002dc29 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml @@ -23,6 +23,7 @@ openIcon: open - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml index 6f02d6b9bf..03955ac880 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml @@ -14,6 +14,7 @@ - type: Tag tags: - Cigarette + - Recyclable - Trash - type: Recyclable - type: Clothing diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml index 2cf5e75a2c..140b20d65b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml @@ -11,6 +11,7 @@ - type: Tag tags: - Cigarette + - Recyclable - Trash - type: Recyclable - type: Clothing @@ -42,6 +43,7 @@ - type: Tag tags: - Cigarette + - Recyclable - Trash - type: Recyclable - type: Clothing diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml index b11de6e5bc..28a952359b 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml @@ -7,6 +7,7 @@ - type: Tag tags: - CigPack + - Recyclable - Trash - type: Recyclable - type: Storage diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml index f642c02254..feebd4e5e0 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml @@ -57,6 +57,7 @@ size: 2 - type: Tag tags: + - Recyclable - RollingPaper - Trash - type: Recyclable @@ -80,5 +81,6 @@ - type: Tag tags: - CigFilter + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml index cd2b815d89..edd7a31150 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml @@ -12,6 +12,7 @@ - type: BurnStateVisualizer - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml index 7fc18d7a0c..bccd85f6ff 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml @@ -9,6 +9,7 @@ tags: - Write - Crayon + - Recyclable - Trash - type: Recyclable - type: UserInterface @@ -38,6 +39,7 @@ - Write - Crayon - CrayonWhite + - Recyclable - Trash - type: entity @@ -60,6 +62,7 @@ - Write - Crayon - CrayonWhite + - Recyclable - Trash - type: entity @@ -82,6 +85,7 @@ - Write - Crayon - CrayonBlack + - Recyclable - Trash - type: entity @@ -104,6 +108,7 @@ - Write - Crayon - CrayonRed + - Recyclable - Trash - type: entity @@ -126,6 +131,7 @@ - Write - Crayon - CrayonOrange + - Recyclable - Trash - type: entity @@ -148,6 +154,7 @@ - Write - Crayon - CrayonYellow + - Recyclable - Trash - type: entity @@ -170,6 +177,7 @@ - Write - Crayon - CrayonGreen + - Recyclable - Trash - type: entity @@ -192,6 +200,7 @@ - Write - Crayon - CrayonBlue + - Recyclable - Trash - type: entity @@ -214,6 +223,7 @@ - Write - Crayon - CrayonPurple + - Recyclable - Trash - type: entity diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml index 5af7ee5155..cc4b1cf34c 100644 --- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml +++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml @@ -25,6 +25,7 @@ Slash: 2 - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml b/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml index 9fe9bda210..a58ae4a86b 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml @@ -20,6 +20,7 @@ Slash: 2 - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml index 68b458237a..e77d93b1ba 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml @@ -9,6 +9,7 @@ sprite: Objects/Misc/utensils.rsi - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Power/lights.yml b/Resources/Prototypes/Entities/Objects/Power/lights.yml index ececd8d97a..12ec51c6a3 100644 --- a/Resources/Prototypes/Entities/Objects/Power/lights.yml +++ b/Resources/Prototypes/Entities/Objects/Power/lights.yml @@ -54,6 +54,7 @@ - type: LightBulbVisualizer - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml index b437bf112a..87663717aa 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml @@ -51,6 +51,7 @@ emptySpriteName: medipen_empty - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml index beeb33a0ea..9e94fb6e18 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml @@ -8,6 +8,7 @@ - type: Tag tags: - Bottle + - Recyclable - Trash - type: Recyclable - type: Sprite diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml index 7aa55be607..31538a2b9f 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml @@ -7,6 +7,7 @@ - type: Tag tags: - Flare + - Recyclable - Trash - type: Recyclable - type: ExpendableLight diff --git a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml index 490901ea96..b4a276883f 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml @@ -6,6 +6,7 @@ components: - type: Tag tags: + - Recyclable - Trash - type: Recyclable - type: ExpendableLight diff --git a/Resources/Prototypes/Entities/Objects/Tools/matches.yml b/Resources/Prototypes/Entities/Objects/Tools/matches.yml index 4fb3a3cd48..d445c1b443 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/matches.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/matches.yml @@ -17,6 +17,7 @@ - type: Tag tags: - Matchstick + - Recyclable - Trash - type: Recyclable - type: Sprite @@ -80,5 +81,6 @@ - matchbox3 - type: Tag tags: + - Recyclable - Trash - type: Recyclable diff --git a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml index 2b338f3977..89cf94d578 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml @@ -6,6 +6,7 @@ - type: Tag tags: - Cartridge + - Recyclable - type: Item size: 1 - type: Recyclable diff --git a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml index ee466f03f7..6e3c6d1578 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/recycler.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/recycler.yml @@ -4,22 +4,40 @@ name: recycler description: A large crushing machine used to recycle small items inefficiently. There are lights on the side. components: + - type: AmbientSound + enabled: false + volume: -8 + range: 5 + sound: + # TODO: https://freesound.org/people/derjuli/sounds/448133/ CC-NC- + path: /Audio/Ambience/Objects/circular_saw.ogg - type: Physics - type: Fixtures fixtures: - shape: !type:PhysShapeAabb - bounds: "-0.49,-0.49,0.49,0.49" + bounds: "-0.2,-0.2,0.2,0.2" + id: brrt hard: false layer: - Opaque - Impassable - MobImpassable - VaultImpassable + - shape: + !type:PhysShapeAabb + bounds: "-0.49,-0.49,0.49,0.49" + id: collision + hard: true + mask: + - Impassable + layer: + - Opaque - type: Transform anchored: true - type: Sprite netsync: false + drawdepth: Doors sprite: Structures/Machines/recycling.rsi layers: - state: grinder-o0 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index fdf7aaa21c..f876d9f0be 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -240,6 +240,10 @@ - type: Tag id: Powerdrill +# Give this to something that doesn't need any special recycler behavior and just needs deleting. +- type: Tag + id: Recyclable + - type: Tag id: RCDDeconstructWhitelist diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png index 96be34e2ca..e1449a9a22 100644 Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0.png differ diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png index 715b003ca3..b4a1f08b06 100644 Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o0bld.png differ diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png index 697bb007d3..794c319632 100644 Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1.png differ diff --git a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png index b8c6ea7c68..24d85075cb 100644 Binary files a/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png and b/Resources/Textures/Structures/Machines/recycling.rsi/grinder-o1bld.png differ