Space Engineers

Space Engineers

[Obsolete] [Broken] Refinery Inventory Rotator
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
Amiti 15 Oct, 2017 @ 9:46pm 
nice thx
Meridius_IX / Lucas  [author] 15 Oct, 2017 @ 5:09pm 
@Anach & #Ronald - I think it's possible. I'll give it a shot sometime in the future :)
Anach 15 Oct, 2017 @ 5:00pm 
Nice script, just what I needed. I'm also wondering the same thing as #Ronald. Right now I have some stuff holding up the production queue, due to being out of one type of ingot.
Amiti 8 Oct, 2017 @ 9:16pm 
is it possible to make the same script but for rotate the assembler build production :p (not inv components ;))
Skallabjorn 20 Sep, 2017 @ 12:34pm 

Yes it works on modded refineries :)
Skallabjorn 20 Sep, 2017 @ 11:03am 
will let you know
Meridius_IX / Lucas  [author] 20 Sep, 2017 @ 11:01am 
@Skallabjorn - Can't say I've ever tried on a modded refienry, but as long as the game recognizes it as a IMyRefinery type block, then I would imagine it should work.
Skallabjorn 20 Sep, 2017 @ 11:00am 
does this work with mod refineries or just the vanila one?
Mogeley 27 Jun, 2017 @ 8:05am 
Thanks was looking for something like this!