[0.17.23]LuaCharacter.set_request_slot() inconsistency and typo
Posted: Fri Mar 29, 2019 10:07 pm
LuaCharacter.set_request_slot() doesn't let you set 0 as the requested amount, whereas you can set a 0 request via the GUI just fine.
To reproduce:
Results in an error:
I'd expect the call to work even when count is 0.
But reading the error it might actually be because the implementation of item stack doesn't allow count to be 0, which makes sense i guess.
To reproduce:
Code: Select all
/c game.player.character.set_request_slot({name="wood", count=0}, 1)
The message should be "has to be a" and not "has to a be"Cannot execute command. Error: Item stack count has to a be positive number
I'd expect the call to work even when count is 0.
But reading the error it might actually be because the implementation of item stack doesn't allow count to be 0, which makes sense i guess.