diff --git a/Content.Client/Entry/IgnoredComponents.cs b/Content.Client/Entry/IgnoredComponents.cs
index 2a51408f8b..a4ce1012a2 100644
--- a/Content.Client/Entry/IgnoredComponents.cs
+++ b/Content.Client/Entry/IgnoredComponents.cs
@@ -66,6 +66,7 @@ namespace Content.Client.Entry
"Drain",
"Food",
"DeployableBarrier",
+ "SpaceGarbage",
"MagicMirror",
"DiseaseSwab",
"FloorTile",
diff --git a/Content.Server/Shuttles/Components/SpaceGarbageComponent.cs b/Content.Server/Shuttles/Components/SpaceGarbageComponent.cs
new file mode 100644
index 0000000000..3f8fa6f865
--- /dev/null
+++ b/Content.Server/Shuttles/Components/SpaceGarbageComponent.cs
@@ -0,0 +1,8 @@
+namespace Content.Server.Shuttles.Components;
+
+///
+/// Cleanup component that deletes the entity if it has a cross-grid collision.
+/// Useful for small, unimportant items like bullets to avoid generating many contacts.
+///
+[RegisterComponent]
+public sealed class SpaceGarbageComponent : Component {}
diff --git a/Content.Server/Shuttles/EntitySystems/SpaceGarbageSystem.cs b/Content.Server/Shuttles/EntitySystems/SpaceGarbageSystem.cs
new file mode 100644
index 0000000000..96429ccf41
--- /dev/null
+++ b/Content.Server/Shuttles/EntitySystems/SpaceGarbageSystem.cs
@@ -0,0 +1,28 @@
+using Content.Server.Shuttles.Components;
+using Robust.Shared.Physics;
+using Robust.Shared.Physics.Dynamics;
+
+namespace Content.Server.Shuttles.EntitySystems;
+
+///
+/// Deletes anything with that has a cross-grid collision with a static body.
+///
+public sealed class SpaceGarbageSystem : EntitySystem
+{
+ public override void Initialize()
+ {
+ base.Initialize();
+ SubscribeLocalEvent(OnCollide);
+ }
+
+ private void OnCollide(EntityUid uid, SpaceGarbageComponent component, StartCollideEvent args)
+ {
+ var ourXform = Transform(args.OurFixture.Body.Owner);
+ var otherXform = Transform(args.OtherFixture.Body.Owner);
+
+ if (ourXform.GridID == otherXform.GridID ||
+ args.OtherFixture.Body.BodyType != BodyType.Static) return;
+
+ QueueDel(uid);
+ }
+}
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml
index d12fb5726c..f0af94d949 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks.yml
@@ -2103,9 +2103,9 @@
sprite: Objects/Consumable/Drinks/ramen.rsi
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
parent: DrinkRamen
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml
index 72dc3606f3..a0164bb597 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cans.yml
@@ -36,10 +36,10 @@
stateOpen: icon_open
- type: Tag
tags:
- - Recyclable
- Trash
- type: ItemCooldown
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
parent: DrinkCanBaseFull
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml
index 40c87ed430..4992feed90 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Drinks/trash_drinks.yml
@@ -52,9 +52,9 @@
acts: [ "Destruction" ]
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
# Containers
- type: entity
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
index 81163e6a8e..45d587214a 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
@@ -59,9 +59,9 @@
netsync: false
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
name: bowl
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml
index a3f65ce2f4..ae1aa737b0 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/plate.yml
@@ -44,9 +44,9 @@
acts: [ "Destruction" ]
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
name: broken plate
@@ -60,9 +60,9 @@
netsync: false
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
# Small Plate
@@ -142,3 +142,4 @@
tags:
- Trash
- type: Recyclable
+ - type: SpaceGarbage
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml
index 09a80f2c8e..adfcd6241b 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/egg.yml
@@ -110,6 +110,7 @@
- Egg
- Trash
- type: Recyclable
+ - type: SpaceGarbage
# Egg
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml
index c8476cef75..08958ce5ae 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/food_base.yml
@@ -8,6 +8,7 @@
components:
- type: Food
- type: Recyclable
+ - type: SpaceGarbage
- type: Sprite
netsync: false
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml
index 70c4032706..cac4dd34bf 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/frozen.yml
@@ -259,3 +259,4 @@
tags:
- Trash
- type: Recyclable
+ - type: SpaceGarbage
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml
index 532b22403f..38a6297bc2 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/produce.yml
@@ -211,6 +211,7 @@
- type: Extractable
grindableSolutionName: food
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
name: carrot
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml
index 4aae6c41db..739f49a8c7 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/snacks.yml
@@ -206,9 +206,9 @@
HeldPrefix: packet
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
noSpawn: true
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml
index f27002dc29..d7cc6a01fb 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml
@@ -23,9 +23,9 @@
openIcon: open
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
id: CigCartonRed
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml
index 03955ac880..1b26e0d7e7 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml
@@ -14,9 +14,9 @@
- type: Tag
tags:
- Cigarette
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Clothing
sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi
Slots: [ mask ]
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml
index 140b20d65b..fc8d98c68c 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/joints.yml
@@ -11,9 +11,9 @@
- type: Tag
tags:
- Cigarette
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Clothing
sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi
Slots: [ mask ]
@@ -43,9 +43,9 @@
- type: Tag
tags:
- Cigarette
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Clothing
sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi
Slots: [ mask ]
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml
index 28a952359b..10180f9778 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml
@@ -7,9 +7,9 @@
- type: Tag
tags:
- CigPack
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Storage
capacity: 6
- type: Item
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 feebd4e5e0..32854c776c 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml
@@ -57,10 +57,10 @@
size: 2
- type: Tag
tags:
- - Recyclable
- RollingPaper
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
id: CigaretteFilter
@@ -81,6 +81,5 @@
- 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 edd7a31150..b2762653ae 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base_smokeables.yml
@@ -12,9 +12,9 @@
- type: BurnStateVisualizer
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
# Base for all cigars and cigarettes.
- type: entity
diff --git a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml
index bccd85f6ff..23ea9f0f35 100644
--- a/Resources/Prototypes/Entities/Objects/Fun/crayons.yml
+++ b/Resources/Prototypes/Entities/Objects/Fun/crayons.yml
@@ -9,9 +9,9 @@
tags:
- Write
- Crayon
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: UserInterface
interfaces:
- key: enum.CrayonUiKey.Key
diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml
index d5624207db..d9ded9e844 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml
@@ -25,9 +25,9 @@
Slash: 2
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Glass
diff --git a/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml b/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml
index 8ed0219832..93913e51ba 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/broken_bottle.yml
@@ -20,7 +20,7 @@
Slash: 2
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
diff --git a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml
index e77d93b1ba..4268fe1908 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/utensils.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/utensils.yml
@@ -9,9 +9,9 @@
sprite: Objects/Misc/utensils.rsi
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
parent: UtensilBase
diff --git a/Resources/Prototypes/Entities/Objects/Power/lights.yml b/Resources/Prototypes/Entities/Objects/Power/lights.yml
index d3684ab476..7abb8e5c1f 100644
--- a/Resources/Prototypes/Entities/Objects/Power/lights.yml
+++ b/Resources/Prototypes/Entities/Objects/Power/lights.yml
@@ -54,9 +54,9 @@
- type: LightBulbVisualizer
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
# Lighting color values gathered from
# https://andi-siess.de/rgb-to-color-temperature/
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml
index 523f6c5cdf..e0ec6b9294 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/hypospray.yml
@@ -51,9 +51,9 @@
emptySpriteName: medipen_empty
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: entity
name: emergency medipen
@@ -114,4 +114,4 @@
- type: Tag
tags:
- Write
-
+
diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
index 7c5691d10b..c47addc495 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry-bottles.yml
@@ -8,9 +8,9 @@
- type: Tag
tags:
- Bottle
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Sprite
sprite: Objects/Specific/Chemistry/bottle.rsi
netsync: false
@@ -139,7 +139,7 @@
reagents:
- ReagentId: RobustHarvest
Quantity: 30
-
+
- type: entity
id: NocturineChemistryBottle
name: nocturine bottle
diff --git a/Resources/Prototypes/Entities/Objects/Tools/flare.yml b/Resources/Prototypes/Entities/Objects/Tools/flare.yml
index e0a6ddfb24..54c5c992b9 100644
--- a/Resources/Prototypes/Entities/Objects/Tools/flare.yml
+++ b/Resources/Prototypes/Entities/Objects/Tools/flare.yml
@@ -7,9 +7,9 @@
- type: Tag
tags:
- Flare
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: ExpendableLight
spentName: spent flare
spentDesc: It looks like this flare has burnt out. What a bummer.
diff --git a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml
index b4a276883f..4a7848d2ec 100644
--- a/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml
+++ b/Resources/Prototypes/Entities/Objects/Tools/glowstick.yml
@@ -6,9 +6,9 @@
components:
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: ExpendableLight
spentName: spent green glowstick
spentDesc: It looks like this glowstick has stopped glowing. How tragic.
diff --git a/Resources/Prototypes/Entities/Objects/Tools/matches.yml b/Resources/Prototypes/Entities/Objects/Tools/matches.yml
index d445c1b443..fc426c7e6c 100644
--- a/Resources/Prototypes/Entities/Objects/Tools/matches.yml
+++ b/Resources/Prototypes/Entities/Objects/Tools/matches.yml
@@ -17,9 +17,9 @@
- type: Tag
tags:
- Matchstick
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
- type: Sprite
netsync: false
sprite: Objects/Tools/matches.rsi
@@ -81,6 +81,6 @@
- matchbox3
- type: Tag
tags:
- - Recyclable
- Trash
- type: Recyclable
+ - type: SpaceGarbage
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 89cf94d578..3ae4eaea0b 100644
--- a/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml
+++ b/Resources/Prototypes/Entities/Objects/Weapons/Guns/Ammunition/Cartridges/BaseCartridge.yml
@@ -6,7 +6,7 @@
- type: Tag
tags:
- Cartridge
- - Recyclable
- type: Item
size: 1
- type: Recyclable
+ - type: SpaceGarbage