Queue to Front (Alt+ Mouse Button)

by tjson

This mod makes it possible to queue a recipe to the front of the queue when holding a key (default Alt button).

Utilities
1 year, 11 months ago
1.1
21.7K

b Crash when pressing hotkeys without selecting a recipe

2 years ago

Hello, when I accidentally pressed hotkeys for add craft to fornt and my inventory was closed, I got an error:
screen - https://flic.kr/p/2nC9ZhN

I think you should check if the selected_prototype field is in the event object

|if event.selected_prototype and event.selected_prototype.base_type == "recipe"| instead off | if event.selected_prototype.base_type == "recipe"|

P. S. sorry for my english :)))

2 years ago
(updated 2 years ago)

Posting this here in case it's related. I changed my hotkey to F since alt is taken already by a couple of things and every time I try to use it I get this error and crash to start EDIT: It does it with other keys too, not just F

The mod Queue to Front (Alt+ Mouse Button) (0.1.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event queue-to-front-button::front-craft (ID 188)
queue-to-front-button/control.lua:2: attempt to index field 'selected_prototype' (a nil value)
stack traceback:
queue-to-front-button/control.lua:2: in function <queue-to-front-button/control.lua:1>

1 year, 11 months ago
(updated 1 year, 11 months ago)

Crashing here too anytime somebody accidentally misses the button. No fixes yet? :(

New response