[0.17.79] can_insert returns true when should be false

Post your bugs and problems so we can fix them.
Post Reply
lalmec
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri May 22, 2020 9:45 pm
Contact:

[0.17.79] can_insert returns true when should be false

Post by lalmec »

When a player's inventory is full, can_insert returns true

https://lua-api.factorio.com/latest/Lua ... can_insert


Steps to reproduce:

1. start new game
2. run player command

Code: Select all

/c game.print(game.player.insert{name="submachine-gun", count=1})
3. repeat step #2 until inventory is full:
82158754-be452280-9857-11ea-94f8-82e63320a8ee.png
82158754-be452280-9857-11ea-94f8-82e63320a8ee.png (623.84 KiB) Viewed 76 times
4. run player command

Code: Select all

 /c game.print(game.player.can_insert{name="submachine-gun", count=1})
expected: false
actual: true
82158773-e46ac280-9857-11ea-969e-96298501eb6b.png
82158773-e46ac280-9857-11ea-969e-96298501eb6b.png (807.82 KiB) Viewed 76 times

Loewchen
Global Moderator
Global Moderator
Posts: 5942
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [0.17.79] can_insert returns true when should be false

Post by Loewchen »

This is the case when not all weapon slots are occupied and reproducible in 0.18.26 fyi.

Post Reply

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users