Space Engineers

Space Engineers

[Obsolete] [Broken] Refinery Inventory Rotator
19 kommenttia
Amiti 19.6.2019 klo 14.45 
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  [tekijä] 19.6.2019 klo 12.07 
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.6.2019 klo 11.13 

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.6.2019 klo 10.43 
it more like a random switch than it was but it switch XD
Skallabjorn 2.3.2019 klo 18.04 
Alas... 1.189.0 broke it... ;(
Skallabjorn 16.8.2018 klo 18.30 
Anyway to get this working without a timer block?
Rasip 8.12.2017 klo 13.38 
Just wanted to say thank you. This is one of the best scripts on the workshop.
Meridius_IX / Lucas  [tekijä] 16.10.2017 klo 13.58 
Meridius_IX / Lucas  [tekijä] 16.10.2017 klo 11.41 
@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.10.2017 klo 21.46 
nice thx
Meridius_IX / Lucas  [tekijä] 15.10.2017 klo 17.09 
@Anach & #Ronald - I think it's possible. I'll give it a shot sometime in the future :)
Anach 15.10.2017 klo 17.00 
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.10.2017 klo 21.16 
is it possible to make the same script but for rotate the assembler build production :p (not inv components ;))
Skallabjorn 20.9.2017 klo 12.34 

Yes it works on modded refineries :)
Skallabjorn 20.9.2017 klo 11.03 
will let you know
Meridius_IX / Lucas  [tekijä] 20.9.2017 klo 11.01 
@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.9.2017 klo 11.00 
does this work with mod refineries or just the vanila one?
Mogeley 27.6.2017 klo 8.05 
Thanks was looking for something like this!