Allow set_shortcut_toggled on built-in shortcuts.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Allow set_shortcut_toggled on built-in shortcuts.

Post by eradicator »

What?

It'd be nice if scripts could toggle roboports and exoskeletons.
Currently set_shortcut_toggled("toggle-personal-roboport",false) has no effect and does not raise an unknown-prototype error.

Why?

Because i want to auto-disable my roboports when i'm riding a fast vehicle.
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3139
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow set_shortcut_toggled on built-in shortcuts.

Post by Bilka »

What's wrong with https://lua-api.factorio.com/latest/Lua ... ment_bonus ?

Also, robots are now disabled by default if you are moving faster than the vehicle you are in/the vehicle is in automatic mode.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Qon
Smart Inserter
Smart Inserter
Posts: 2118
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Allow set_shortcut_toggled on built-in shortcuts.

Post by Qon »

Bilka wrote:
Sat May 04, 2019 6:49 pm
Also, robots are now disabled by default if you are moving faster than the vehicle you are in/the vehicle is in automatic mode.
:? :roll:

Sounds painful. :shock: :o

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

Re: Allow set_shortcut_toggled on built-in shortcuts.

Post by eradicator »

Bilka wrote:
Sat May 04, 2019 6:49 pm
What's wrong with https://lua-api.factorio.com/latest/Lua ... ment_bonus ?
Does that visible toggle the shortcut button?
Bilka wrote:
Sat May 04, 2019 6:49 pm
Also, robots are now disabled by default if you are moving faster than the vehicle you are in/the vehicle is in automatic mode.
Cars are never in automatic mode. And spammed exoskeletons can be faster than robots. As @Qon already quoted...i'm not sure what speed "faster than the vehicle your in" is, but my personal intend was to disable them when the vehicle moves at more than 50% of current maximum bot speed according to research, so that they still work in slow mode, and get some time to catch up, and also work like expected when you have insane speed bonus research.
(Also didn't know that automatic trains disable bots now, which is a very nice addition, but i'd like it to work in manual trains too.)
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.

Bilka
Factorio Staff
Factorio Staff
Posts: 3139
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Allow set_shortcut_toggled on built-in shortcuts.

Post by Bilka »

0.17 changelog wrote:Changed personal roboports so they won't send construction robots if you're driving in a vehicle that they can't keep up with or if in a train in automatic mode.
Does that visible toggle the shortcut button?
No.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: Allow set_shortcut_toggled on built-in shortcuts.

Post by eradicator »

Fiddled around a bit with the built in auto-disabling and it looks pretty good. Usually i read all the changelogs, but this time i wasn't around when the release happend :oops: . Thanks for the hint.
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.

Post Reply

Return to “Modding interface requests”