[0.15.3] defines.inventory.player_quickbar -and main swapped

Bugs that are actually features.
Post Reply
Fl_GUI
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Aug 10, 2015 3:59 pm
Contact:

[0.15.3] defines.inventory.player_quickbar -and main swapped

Post by Fl_GUI »

Title says all really, when doing

Code: Select all

game.player.get_inventory(defines.inventory.player_quickbar)
you get your main inventory and

Code: Select all

game.player.get_inventory(defines.inventory.player_main)
is your quickbar.

Might have already been reported, couldn't use the search function on the forum.

(I did use a variable "me" that was equal to game.player but that shouldn't matter too much)

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.15.3] defines.inventory.player_quickbar -and main swapped

Post by posila »

Hmm, it is swapped for god controller ... there are defines god_quickbar and god_main for that. But it is strange inconsistency.

Fl_GUI
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Aug 10, 2015 3:59 pm
Contact:

Re: [0.15.3] defines.inventory.player_quickbar -and main swapped

Post by Fl_GUI »

posila wrote:Hmm, it is swapped for god controller ... there are defines god_quickbar and god_main for that. But it is strange inconsistency.
correct, I was playing as god controller, didn't notice the god_quickbar and god_main before. I'll use that from now on

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.3] defines.inventory.player_quickbar -and main swapped

Post by Rseding91 »

posila wrote:Hmm, it is swapped for god controller ... there are defines god_quickbar and god_main for that. But it is strange inconsistency.
There's a reason we have the defines :)

As for why it's like it is: it was changed some time ago so robots take from the main inventory first when grabbing items from the character.
If you want to get ahold of me I'm almost always on Discord.

sparr
Smart Inserter
Smart Inserter
Posts: 1327
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [0.15.3] defines.inventory.player_quickbar -and main swapped

Post by sparr »

I don't understand why that explanation means the names have to be backwards.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.3] defines.inventory.player_quickbar -and main swapped

Post by Rseding91 »

sparr wrote:I don't understand why that explanation means the names have to be backwards.
The names aren't backwards.

defines.inventory.god_quickbar -> points at the god controller quickbar
defines.inventory.player_quickbar -> points at the character controller quickbar
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”