Space Engineers

Space Engineers

72 ratings
Assembly Cleaning
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
680.000 B
10 Jan, 2015 @ 8:11pm
15 Jan, 2017 @ 8:11am
4 Change Notes ( view )

Subscribe to download
Assembly Cleaning

Description
You can also check out my Item Sorting script to help keep all your containers categorized and sorted.

I have also made a Selective Refining script, which will let specify the type of ores you want going into your refineries.

•This script will clean out ingots from your assemblers "input" inventory when your assembler's queue is empty or cannot produce whatever is in the front of the queue for whatever reason.

•Your assembler can become so full of ingots that it cannot pull the ingots it needs in order to create the item in the front of its' queue. This script should solve that problem.

•When you assembler doesn't have anything to produce, this script will also move out the extra ingots in its' inventory to keep everything clean and organized.

•If your assembler is trying to produce an item you only have some of the ingots for, you should notice it's inventory pulling the ingots it does have, and them moving them back out because it cannot produce the next item. You should take this as a sign that you are missing ingots for the item you are trying to make.

•To get the block working correctly, be sure to attach it to a Timer Block. Simply build the Timer Block and setup its' action to run the script, and then start itself. A delay of 1-2 seconds seems to work perfectly fine.

•If you have any suggestions or problems please let me know!
Popular Discussions View All (4)
2
13 Jan, 2015 @ 12:23am
When moving items from Assembler's Inventory, for loop should count backwards.
Psicraft
1
13 Jan, 2015 @ 2:28am
It's not necessary to cast assembler to IMyProductionBlock.
Psicraft
0
10 Dec, 2017 @ 1:24pm
Empty assemblers as they fill
Scorpion00021
33 Comments
Torki 28 Sep, 2021 @ 3:54pm 
Lucid 3 Aug, 2021 @ 7:40pm 
worked some time ago with the help from wurfelhusten but now it dont work
! ! _ _ G R E Y _ _ ! ! 19 Jul, 2021 @ 11:54am 
Doesn't seem to work...
Glytchii 18 Dec, 2020 @ 11:27am 
Stops cleaning out assemblers. Mine are all clogged due to this script
Würfelhusten 29 Apr, 2019 @ 11:06am 
Replace
var assemblerInv = assembler.GetInventory(0);
var assemblerItems = assemblerInv.GetItems();

for (int i = assemblerItems.Count -1; i >= 0; i--)
{
assemblerInv.TransferItemTo(containerDestination, i, null, true, null);
}


with

var assemblerInv = assembler.GetInventory(0);
List<MyInventoryItem> assemblerItems = new List<MyInventoryItem>();
assemblerInv.GetItems(assemblerItems);
for (int i = 0; i < assemblerItems.Count; i++){
assemblerInv.TransferItemTo(containerDestination, i, null, true, null);
}


and it should work with 1.190
Gadget 9 Aug, 2018 @ 9:35pm 
Is this script no longer working??? I can't seem to get it to do anything at all...
Copper Boltwire 20 Dec, 2017 @ 8:14am 
Reptar, if you gave up on this script, please just remove it - pointless to have a "script" on the workshop that is no longer maintained...
AnglizanDer 6 Feb, 2017 @ 1:25pm 
After last update 1.173 warning in code check - IMyTerminalBlock.SetCustomName(string) is obsolete.
Reptar  [author] 15 Jan, 2017 @ 8:12am 
This is update and should be working again now.
Daddy_J 6 Jan, 2017 @ 6:23pm 
I get that error too