Code: Select all
burner.insert({name = "coal", count = 1})
leeched[1].remove_item({name = "coal", count = 1})
Code: Select all
burner.insert({name = "coal", count = 1})
leeched[1].remove_item({name = "coal", count = 1})
Code: Select all
local item
item = {name = "coal", count = 1}
leeched[1].remove(item )
no dice :[oLaudix wrote:Try:Code: Select all
local item item = {name = "coal", count = 1} leeched[1].remove(item )
I'm not calling the inventory in the script since the method is called on the entityjohanwanderer wrote:Did you try different inventory? There is get_inventory(x) and get_output_inventory(x).
I usually surround that with a pcall because I haven't been able to figure when it is appropriate to have x > 1.
kovarex wrote:Well, there isn't method remove_item as opposite to insert in entity.
I was also missing that actually, as calling it on individual inventories isn't as comfortable.
This is not technically a bug, so I'm moving it to mod interface request, but I'm letting rseding know, so he will probably do it
Well, it will in 0.12.3Klonan wrote:kovarex wrote:Well, there isn't method remove_item as opposite to insert in entity.
I was also missing that actually, as calling it on individual inventories isn't as comfortable.
This is not technically a bug, so I'm moving it to mod interface request, but I'm letting rseding know, so he will probably do it
ahh okay, the WIki led me to believe that it worked like that.
Rseding91 wrote:Well, it will in 0.12.3Klonan wrote:kovarex wrote:Well, there isn't method remove_item as opposite to insert in entity.
I was also missing that actually, as calling it on individual inventories isn't as comfortable.
This is not technically a bug, so I'm moving it to mod interface request, but I'm letting rseding know, so he will probably do it
ahh okay, the WIki led me to believe that it worked like that.