Belt Balancer 2


Adds Balancer Parts, that can be put together, to balance all adjusting lanes. Updated for better performance and 2.0

Utilities
28 days ago
2.0
6.59K
Logistics

b ERROR: 'durability': real number expected got boolean.

26 days ago

Error while running event belt-balancer-2::on_nth_tick(4)
'durability': real number expected got boolean.
stack traceback:
[C]: in function 'insert_at_back'
belt-balancer-2/objects/balancer.lua:234: in function 'try_insert_and_next'
belt-balancer-2/objects/balancer.lua:244: in function 'run'
belt-balancer-2/helper/message-handler.lua:33: in function <belt-balancer-2/helper/message-handler.lua:31>

26 days ago

Idk how to fix, probably caused by possibility of toolPrototypes to have infinite durability, but I don't meet it, and insert_at_back require to have double at durability field

26 days ago

Probably in conversion we can add check is it tool and if it is, then does this have infinite durability, but what it gives I don't understand, since I don't understand conception of infinite durability and what it does, when it enabled on Tool

26 days ago
(updated 26 days ago)

I realised how I got this crash. I tried to balance armors via balancer parts, since it was kinda my last actions and ArmorPrototype inherits Infinite(bool) from ToolPrototype, also I checked, conversion.lua doesn't do anything, when type is 'armor'

26 days ago

How to reproduce:
Try to sort any armor

How to fix:
In helper/conversion.lua:
durability = (type == "tool" or type == "repair-tool") and stack.durability,
change to
durability = (type == "tool" or type == "repair-tool" or type == 'armor') and stack.durability,

New response