Space Engineers

Space Engineers

Not enough ratings
Assembly Cleaning (Update 1.205+)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
231.097 KB
28 Sep, 2021 @ 3:41pm
16 Apr @ 5:07pm
6 Change Notes ( view )

Subscribe to download
Assembly Cleaning (Update 1.205+)

Description
Clean Assembly (Reptar Forked & Updated)
========================================

This is a re-upload of Reptar's Assembly Cleaning script.

The original version hasn't been updated since January 15, 2017, and was no longer working reliably — resulting in clogged up assemblers and idle refineries.

This version brings it up to date and adds useful features while keeping the spirit of the original.

What’s New / Changed:
---------------------

- Fully updated and working with Space Engineers 1.205+
- No timer block needed
- Automatically moves items into all available cargo containers, not just the first
- Prioritizes containers by name keyword (optional)
- You can configure how often the script runs (default: every 6 seconds)
- Refineries are emptied automatically
- Components are removed from assemblers too (optional)
- Ignores subgrids like pistons/rotors (optional)
- Actively maintained and open to feedback

How to Use:
-----------

To use this script:
- Open the Programmable Block's terminal.
- Click Browse Workshop.
- Select Clean Assembly from the list.
- Click Copy to Editor.
- Click Check Code to verify there are no errors.
- Click Remember & Exit.
- Press Run to start the script.


Adding New Blocks
-----------------
If you add new assemblers, refineries, or cargo containers, simply recompile the script to detect them.

Script Frequency
----------------
Set how often the script runs using the 'timer' variable:

int timer = 6; // in seconds

Subgrid Filtering
-----------------
By default, the script only operates on blocks that are on the same grid as the Programmable Block.
This avoids messing with subgrids such as:
- Rotor heads
- Piston tops
- Docked grids

To include subgrids, change:
bool ignoreSubgrids = false;

Cargo Prioritization
--------------------
By default, the script will try to move ingots and components into containers whose names contain specific keywords:

string ingotsCargo = "ingot";
string componentsCargo = "component";

If no matching container is found or available, items will be moved to any non-full cargo container instead.

Disabling Prioritization
------------------------
Option 1: Clear the keyword filters

string ingotsCargo = "";
string componentsCargo = "";

Option 2: Turn prioritization off completely

bool prioritizeCargo = false;

Shared Containers
-----------------
You can use the same keyword for both types of items if you want everything to go into the same group of containers:

string ingotsCargo = "storage";
string componentsCargo = "storage";

This will direct both ingots and components into containers named with "storage".

This script is actively supported and updated.
Feedback, suggestions, or issues? Drop a comment on the Workshop page!
Popular Discussions View All (1)
0
11 Jul, 2022 @ 6:23am
PINNED: Bug Report
Torki
39 Comments
Torki  [author] 16 Apr @ 5:18pm 
@SmokingRabbit
Just updated the script to ignore subgrids by default
Torki  [author] 13 Apr @ 1:20pm 
a way to ignore subgrid?
No yet but im pretty sure I can make it happen.
Friedrich Nietzsche 13 Apr @ 8:40am 
Is there a way to stop it from putting things into ships?
Torki  [author] 11 Nov, 2024 @ 9:07am 
@oneSki
Does it not work by default? As it uses the type to find the appropriate blocks ( IMyAssembler,...)
I can take a look at it if you confirm it doesnt work currently
|RD| OneSki 10 Nov, 2024 @ 8:22pm 
I use tech blocks mod. Is there a way you could update this mod to include tech assemblers, such as Elite Assembler?

If not, what would I need to change in the code to make it work?
Torki  [author] 8 Oct, 2024 @ 10:06am 
Well, not having any issues on my test world... Can you share some details so I can recreate your setup and try to see why it's not working ?
Torki  [author] 8 Oct, 2024 @ 9:36am 
@YORBIGBLACKDADDY :)
Indeed... A shame when this is the purpose of the script...
I'll get it fixed up soon. Thanks for letting me know !
YORBIGBLACKDADDY :) 7 Oct, 2024 @ 10:27am 
doesn't clean ore build up out of assemblers
Torki  [author] 14 Jun, 2024 @ 1:57pm 
You'r right; I never spell it out once. I changed the description so it is clearer.
But I was really asking if the block changed name in a recent update. With all the new fancy logic stuff we got ;)
SSS-class Warlock 14 Jun, 2024 @ 12:45pm 
To be fair, you didn't spell it out even once and sometimes one doesn't get the simplest abbreviations