Spawn Belt


Create spawn & void belts to test throughput

Content
a month ago
0.13.1 - 2.0
3.52K
Cheats

g 2.0

2 months ago

Any chance for 2.0 update?

2 months ago

Just tried bumping the version but that gives errors. I'll have to investigate what in the API changed.

2 months ago

Figured it out and published a new version :) Have fun! I did not test all cases yet by the way. Using signals might be broken, if you encounter any errors please post them!

2 months ago
(updated 2 months ago)

Only works if the belt is above the chest.
They changed belt.entity.direction from 0,2,4,8 to 0,4,8,12

2 months ago

Thanks for the tip! I fixed that, signals were also broken, and the counter chest after a void-belt was also broken. Fixed all of that. Let me know if you encounter any other issue

2 months ago

Your script create items with only name. As quality is not defined it's always will be a normal item.
I found that can read the original item quality: inventory[1].quality and create the clone item: {name = belt.item; quality = belt.quality}

a month ago

Thanks @Rkaaya! I've implemented the quality as well. Have not messed with it in my playthrough yet haha! I should get to that.

a month ago

With this solution there is a bug, if you pick out the item from the chest, getting an exception that can't get the name. Somehow the chest item is 0x with name and quality is null. First I tried it in the same way but my lua knowledge not strong enough to understand why is behaves like that.
I gave up and made a workaround, keep your method to give back the item name, and cloned it for quality.
belt.item = get_chest_item(chest); //for name
belt.quality = get_chest_item_quality(chest); //for quality

a month ago

Ah, so sorry I missed that. Fixed it :)
FYI this is what I went with instead of duplicating the method:

chest_item = get_chest_item(chest);
if chest_item ~= nil then
  belt.item = chest_item.name;
  belt.quality = chest_item.quality;
else
  belt.item = nil;
  belt.quality = nil;
end

New response