Space Engineers

Space Engineers

Not enough ratings
[Obsolete] [Broken] Refinery Inventory Rotator
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
525.000 B
6 Feb, 2017 @ 11:25am
1 Change Note ( view )

Subscribe to download
[Obsolete] [Broken] Refinery Inventory Rotator

In 1 collection by Meridius_IX / Lucas
Meridius_IX's Script Library
5 items
Description
Description / How It Works:
This script will rotate the items in your Refinery production queue. This is useful if you've loaded a large assortment of Ore to the Refinery and you don't wait it to be stuck processing a single type for a long time.

Blocks Required:
- 1x Refinery (or more)
- 1x Programmable Block
- 1x Timer Block

Refinery Setup:
Add (RotateInv) to the name of any Refinery you want managed by the script.

Timer Setup:
Set the timer delay to how often you want the inventory items to rotate, along with the following actions:
- Programmable Block -> Run Without Argument
- Timer -> Start
19 Comments
Amiti 19 Jun, 2019 @ 2:45pm 
sure ;p put this one one obsolete tag and link the new one i just have put my noob patch for waiting ;p
Meridius_IX / Lucas  [author] 19 Jun, 2019 @ 12:07pm 
if you've got a working version up and running, feel free to republish it. I likely won't be updating this one, but I can link to yours if you'd like :)
Amiti 19 Jun, 2019 @ 11:13am 

string refinery_naming_tag = "(RotateInv)"; // Any Refinery containing this tag in its name will be managed by this script.

void Main(string argument){

List<IMyTerminalBlock> refinery_list = new List<IMyTerminalBlock>();
IMyRefinery refinery;
GridTerminalSystem.GetBlocksOfType<IMyRefinery>(refinery_list);

if(refinery_list.Count != 0){

for(int i = 0; i < refinery_list.Count; i++){

refinery = refinery_list as IMyRefinery;
if(refinery.CustomName.Contains(refinery_naming_tag)){

IMyInventory refinery_inv = refinery.GetInventory(0);
Random random = new Random();
int s = random.Next(7);
refinery_inv.TransferItemTo(refinery_inv, 0, s, true, null);

}

}

}

}
Amiti 19 Jun, 2019 @ 10:43am 
it more like a random switch than it was but it switch XD
Skallabjorn 2 Mar, 2019 @ 6:04pm 
Alas... 1.189.0 broke it... ;(
Skallabjorn 16 Aug, 2018 @ 6:30pm 
Anyway to get this working without a timer block?
Rasip 8 Dec, 2017 @ 1:38pm 
Just wanted to say thank you. This is one of the best scripts on the workshop.
Meridius_IX / Lucas  [author] 16 Oct, 2017 @ 1:58pm 
Meridius_IX / Lucas  [author] 16 Oct, 2017 @ 11:41am 
@Anach & #Ronald - Steam or SE is being a pain in the arse today, and isn't letting me upload the script for the assembler. Here's a pastebin link if you still want to use it anyway!

https://pastebin.com/cxAWP9yc