Space Engineers

Space Engineers

评价数不足
Inventory & Nanite Sort Script
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
3.752 KB
2016 年 12 月 9 日 上午 7:33
2016 年 12 月 27 日 下午 2:10
3 项改动说明 ( 查看 )

订阅以下载
Inventory & Nanite Sort Script

描述
Trash and Sort Script Version 1.5 Modified by MrEichhorn

This script....
- finds the inventory of Containers, Refineries, Assemblers, Connectors and Nanite Factories.
- sorts the inventory to Containers with specified name (Ore Container, Ingot Container, Ammo Container.....).
Its possible to give a Container different names, sorting different items in this Container.
- dosent sort any items to Container, which have the word "Locked Container" in the name.
- sorts gas and oxygen bottles to refill in a Oxygen Generator.
- sorts trash (Basic Tools -Welder, -Hand Drills, -Grinder, -Rifles) to a Connector named "Trash Connector" and throws them out.
- turns off Nanite Factories, at the throw out, to prevent them collecting the trash.

Version 1.4
- deactivate the TrowOut function of the Trash Connector when its empty.
- create your own Trashlist; scroll down to the Trashlist an add your own items
- exclude the Trash Connector from the Container collection

Version 1.5
- BugFix for empty collections

Name declaration (Name extensions are possible):
Containers: Ore Container; Ingot Container; Component Container; Ammo Container; Gas Container; Locked Container.
Connector: Trash Connector
Refineries: Refinery
Oxygen Generators: Oxygen Generator
Nanite Control Factories: Nanite Control Factory

Example: Container named "Container 01 Ore Container Ingot Container Ammo Container"
- means that Ore, Ingot and Ammo/Tools will be sorted into this Container.
- place a Grav Generator on top to the connector named "Trash Connector" to speed up the trash.

Timer Block:
- Build a Timer Block
- Add the programmable Block with this script and the option "Runs with default Arguments"
- Add the Timer Block with the option "Start".
- Configure a Time Frame (30 sec.)
- Start the Timer Block
15 条留言
MrFox 2019 年 1 月 1 日 下午 6:03 
broken compile issue
British89 2017 年 1 月 6 日 上午 12:40 
@MrEichhorn not sure how recent this issue is but the auto sort feature pulls items out of the nanite control factory before it has a chance to build anything, So the nanite factory never gets the components it needs as they just get pulled to a inventory with the "Component Container" tag
British89 2016 年 12 月 29 日 上午 1:09 
@jafodude2 Yeah you are right, Good catch, works a charm now thanks.
MrEichhorn  [作者] 2016 年 12 月 28 日 下午 3:40 
Thx for this help. Iam rework the script in next days.
jafodude2 2016 年 12 月 28 日 下午 3:16 
The bug British89 is experiencing might be caused by not having a trash connector.
These lines in main(), and the code that follows them, assume there is a trash connector but without verifying the existence of such a connector.

var connectorInv = trashconnector[0].GetInventory(0);
var connectorItems = connectorInv.GetItems();
British89 2016 年 12 月 28 日 上午 2:38 
@MrEichhorn found time to test 1.5, Same Error as before, When it first Run's the program it sorts everything but then stopps working with the index out of range, Peremeter name: Index
British89 2016 年 12 月 27 日 下午 4:44 
Thanks, Much appreciated.
MrEichhorn  [作者] 2016 年 12 月 27 日 下午 2:14 
Version 1.5 with a bugfix for empty collections. Thx for the feedback.
British89 2016 年 12 月 27 日 下午 1:29 
getting exception error, index out of range, must be non-negative and less than the size of collection, paremeter name: Index
MrEichhorn  [作者] 2016 年 12 月 15 日 下午 1:59 
Version 1.4 is now online