Space Engineers

Space Engineers

评价数不足
Inventory Management
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
393.289 KB
2022 年 5 月 14 日 下午 9:33
2022 年 5 月 15 日 上午 11:19
3 项改动说明 ( 查看 )

订阅以下载
Inventory Management

描述
This script automatically sorts your items into configured dedicated containers.

The TOML-like configuration is in the Custom Data of the programmable block, here's the default config (everything is optional):

debug = false
scan interval = 240
sort interval = 120
ignore reactors = true

Intervals are in seconds. The scan interval is more computationally expensive than sorting. Ignoring reactors is recommended because otherwise the uranium may be sorted into the (if specified) ingot containers.

To define the destinations, you need to group your containers (or any other blocks with an inventory). Then, add these lines to your config:

[item destinations]
$item-group = container group name
Ore/Uranium = my uranium stash
Ingot = my ingots

Where $group can be one of the following pre-defined groups: $ingot, $ore, $ammo, $component, $tool, and $consumable. Otherwise the key is interpreted as an item id, optionally with a subtype id. For example, "Ingot/Stone" is the id for gravel where "Ingot" is the type and "Stone" the subtype. If you leave out the subtype, then the whole type is matched by the filter.

This script is optimized for performance, as it saves all possible inventories that items can be transferred from into a specific container to save performance when sorting. This also respectes conveyor sorters. Items are only going to be taken from the grid the programmable block is placed on and grids that are physically connected, eg. with pistons or motors.

Example config:

[item destinations]
$ingot = containers.ingots
$component = containers.components
Ore/Stone = stone stash

This config does the following:
- All ingots are automatically sorted into inventories of blocks that belong to the group with the name "containers.ingots".
- All components are sorted into inventories of the group "containers.components".
- All stone is sorted into inventories of the group "stone stash".

Have any feedback or suggestions? Please let me know ;)
7 条留言
SEMikeC 2023 年 3 月 18 日 上午 9:44 
This script takes ingots from assemblers?
NAUGHTY SANTA 2022 年 11 月 13 日 上午 9:59 
I THINK IT WORKS. like this.
1 program blok
copy this to custom data of the programmable blok.
debug = false
scan interval = 240
sort interval = 120
ignore reactors = true

(containers.ingots ( my group is BASE CARGO ORE- 2 large cargo))
(component = my group is BASE CARGO comp- 2 large cargo)

[item destinations]
$ingot = BASE CARGO ORE
$component = BASE CARGO comp
Ore/Stone =BASE CARGO ORE

1 timer.
rerun the program blok.,.
mazrados 2022 年 8 月 24 日 上午 7:31 
Is it possible to set script to ignore particular connected subgrids or single containers?
For example, if I need to have items in cockpits, I would not like script moving this items to another containers.
bombbandit 2022 年 6 月 23 日 下午 8:20 
thank you
Zemarchus  [作者] 2022 年 6 月 22 日 下午 8:53 
The $ is required. Please note that the script is currently only useful for smaller ships as it is computationally too expensive otherwise (meaning that the script is stopped by the game automatically). I need to rewrite it to be asynchronous to avoid this issue.
bombbandit 2022 年 6 月 16 日 下午 9:59 
is the $ needed or is that example
bombbandit 2022 年 6 月 16 日 下午 9:57 
if possible could you explain a tad better on how to set this up im trying to use this script and having difficulty getting it to work