Space Engineers
Недостаточно оценок
Categorized Inventories
   
Наградить
В избранное
В избранном
Удалить
Размер файла
Добавлен
Изменён
362.011 KB
2 янв. 2015 г. в 12:45
8 янв. 2015 г. в 3:46
Обновлений: 2 (просмотреть)

Подпишитесь, чтобы загрузить
Categorized Inventories

Описание
.. let's you auto-sort your inventories based on customizable categories in an easy item/category map.

Setup:
- Create 1 Programmable Block
- Create 1 Timer Block
- Create 4 Cargo Containers
- Add the Script to the Programmable Block
- Set the Timer Actions to:
--- Run Programmable Block
--- Start Itself again
- Set the Timer to 2minutes (or something longer) (altho the script is as light as possible it is advised not to spam it)
- Don't start the Timer yet, we still need to prep our containers

Now let's take a look into the code of the thing. In there you'll find the public void InitInventoryCategories() method. This is where you can map items to categories with ease.

inventory["Ore", "Iron"] = "Ores";

That looks pretty simple don't it?!
inventory targets the sorting system to which we add the type "Ore" and "subType "Iron" into the category "Ores".

So how do we get the Stone into the Trash (Container or Connector ;) you simply have to prefix the name of the containment block with a $ and have it contain the string "trash".. meaning these are valid options

$White-trash
$Trashster Mc Gee
$Snowwhite and the 7 Trashers
$Trash Container 001

The default categories i put in are: "ores", "components", "refined" and " * ". So name your containers accordingly. You should have at least one container for each category you specified in the InitInventoryCategories method. and one for random stuff.
Now that you set the names go ahead and kick off that Timer from earlier and enjoy some nicely organized and categorized Inventories.

As always the script is as lightweight as possible and fully documented.
have phun


Plannet features:
- none atm

ChangeLog
- did a full rewrite so writing a detailed changelog would be ridiculous ;)
Комментариев: 28
Gameboy Nitro 25 авг. 2015 г. в 13:49 
Thanks for this m8. Perfect. :thumbs::thumbs:
Twinkle Tip 20 мар. 2015 г. в 4:44 
I have been using this for a couple of days now and my automated station has been working fine (A lot better than my previous station with sorting conveyors).

The latest update, 1.074, introduced Ice. If this gets into the system an exception is thrown because it has no idea how to handle it.
[ISFR]n2o_live 11 мар. 2015 г. в 7:47 
Sorry! It's work with *Random Stuff
[ISFR]n2o_live 11 мар. 2015 г. в 7:34 
Thanks!!! Your script is just amazing, but he don't work with the ammunition :s
DSMTurboAWD 20 янв. 2015 г. в 9:40 
Super slick, Code works great :happycthulhu:
BarfightSpectator  [создатель] 18 янв. 2015 г. в 1:00 
correct.

i assume you mean to do this for docking purposes. it is something that annoys me aswell but once merged or docked all containers belong to the same grid.. the only way is to index beforehand and compare the lists at dock to determine what belongs to whuich ship and which cargo pc. the thing about that is, that the cargo PCs have to be able to talk to eachother.. a functionality i hoped to have been released in last thursdays update already.. to my dissapointment however there was no such release and we're stuck with problems like this.
Uthwe 17 янв. 2015 г. в 19:59 
Is there a way to exclude ships inventories? Is the only option to rename everything with a ! if we don't want it to be auto pulled?
BarfightSpectator  [создатель] 16 янв. 2015 г. в 15:38 
of course :)

it'll even leave a 5% margin when filling up containers then jump to the next one on the grid, not sorted by name.
Nekochan 16 янв. 2015 г. в 15:25 
Excuse me if I missed it somewhere, but will this work if I create two ore containers and mark both with ore? So when one fills up the other will be used as overflow?
justin.binda 14 янв. 2015 г. в 14:05 
simple effective and easy to use simply awesome