game.player.caninsert() always returns true

This subforum contains all the issues which we already resolved.
ForFoxAche
Burner Inserter
Burner Inserter
Posts: 19
Joined: Tue Aug 19, 2014 12:47 pm
Contact:

game.player.caninsert() always returns true

Post by ForFoxAche »

Am I missing something or does game.player.caninsert() always return true?

http://i.imgur.com/8gE74Xs.png
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: game.player.caninsert() always returns true

Post by kovarex »

What was the command exactly?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14381
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: game.player.caninsert() always returns true

Post by Rseding91 »

This may have been related to this issue: https://forums.factorio.com/forum/vie ... =11&t=5477

But, without the screenshot I'm not positive.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14381
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: game.player.caninsert() always returns true

Post by Rseding91 »

I think I found the problem :)

Line 126 of LuaControl:

Code: Select all

bool canInsert(const ItemStack& itemStack) 
{ 
  this->failIfNotValid(); 
  return this->player 
         ? true 
         : (*this->entityTarget)->canInsert(itemStack, false, false); 
}
If you want to get ahold of me I'm almost always on Discord.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: game.player.caninsert() always returns true

Post by kovarex »

Thanks for the notice, fixed for 0.11.17.
Post Reply

Return to “Resolved Problems and Bugs”