[1.1.38] selection-tool items do not stack in input slot

Things that has been reported already before.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

[1.1.38] selection-tool items do not stack in input slot

Post by PFQNiet »

I have the following item in my mod:

Code: Select all

local scanneritem = {
	type = "selection-tool",
	name = name,
	icon = graphics.."icons/"..name..".png",
	icon_size = 64,
	stack_size = 1,
	subgroup = "logistics-observation",
	order = "f["..name.."]",
	open_sound = sounds.open_sound,
	close_sound = sounds.close_sound,
	selection_mode = {"nothing"},
	selection_color = {a=0},
	selection_cursor_box_type = "entity",
	alt_selection_mode = {"nothing"},
	alt_selection_color = {a=0},
	alt_selection_cursor_box_type = "entity",
	mouse_cursor = name,
	flags = {"mod-openable"}
}
I will mention that the only reason this is a `selection-tool` is that `mod-openable` doesn't work on any other item type.

This item is used in certain recipes. Five of them are needed at once. However, while this worked fine in 1.1.37, as of 1.1.38 they will no longer stack in assembling machines.

If this is intentional, I will need some other way of "opening" an item. In my particular case it's really just a way of accessing a special GUI for the item, so technically all I really need is some way of detecting a right-click on any item having this name, they aren't item-specific, so any pointers for a workaround would help too, but this does seem like a regression since it doesn't appear to be listed as an intentional change in the changelog.

Xoriun
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Wed Apr 01, 2020 11:31 am
Contact:

Re: [1.1.38] Tools can no longer stack

Post by Xoriun »

It says `stack_size = 1`.
Maybe that's the problem?

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.1.38] Tools can no longer stack

Post by eradicator »

PFQNiet wrote:
Mon Aug 30, 2021 10:37 am
detecting a right-click on any item having this name, they aren't item-specific, so any pointers for a workaround would help too
The only other item type that comes to mind is: item-with-inventory, but I don't know if that fires any events.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: [1.1.38] Tools can no longer stack

Post by PFQNiet »

Xoriun wrote:
Mon Aug 30, 2021 11:26 am
It says `stack_size = 1`.
Maybe that's the problem?
Concrete has a stack size of 100 but that doesn't stop you shoving 1k of it into an assembling machine to make a silo ;)

Also it worked in 1.1.37. This appears to be a regression.

PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: [1.1.38] Tools can no longer stack

Post by PFQNiet »

I have "fixed" this by just making it a regular `item` and, instead of `mod-openable`, I made a `custom-input` that listens for `open-item` inputs. If the selected prototype is an item, that item is the one I want, and if the player has either no GUI or their own character open, then the item's GUI will appear. This is as close as I can get to replicating the built-in behaviour of `mod-openable` on a regular item.

SoShootMe
Filter Inserter
Filter Inserter
Posts: 476
Joined: Mon Aug 03, 2020 4:16 pm
Contact:

Re: [1.1.38] Tools can no longer stack

Post by SoShootMe »

PFQNiet wrote:
Mon Aug 30, 2021 10:37 am
I have the following item in my mod:

Code: Select all

local scanneritem = {
	...
	stack_size = 1,
	...
}
...
This item is used in certain recipes. Five of them are needed at once. However, while this worked fine in 1.1.37, as of 1.1.38 they will no longer stack in assembling machines.
Very similar to 99708, and while that is marked as resolved in 1.1.39, it's not clear if the fix will also apply to this case.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.38] selection-tool items do not stack in input slot

Post by Klonan »

It looks like a duplicate of this 99708

Post Reply

Return to “Duplicates”