[1.1.80] set_request_slot does not allow a count of 0
Posted: Sat May 20, 2023 11:15 am
It seems there may be a small bug in the condition within set_request_slot. I am trying to set spidertron logistic requests to 0 from a mod function, but when I try to run a line like
I get the following error
Since logistic requests can be set to 0 (always trash), shouldn't count have to be non-negative rather than positive like it is now? Also, I can see many count = 0 for existing logistic requests when logged.
It is also definitely possible I am just doing something wrong lol. Appreciate any help/confirmation!
Code: Select all
spidertron_entity.set_request_slot({name=item.name, count=0}, slot)
Code: Select all
Error while running event spidertron-construction-qol::on_entity_damaged (ID 103)
count must be positive)
stack traceback:
[C]: in function 'set_request_slot'
__spidertron-construction-qol__/control.lua:44: in function 'add_not_requested_items'
__spidertron-construction-qol__/control.lua:56: in function <__spidertron-construction-qol__/control.lua:51>
It is also definitely possible I am just doing something wrong lol. Appreciate any help/confirmation!