Page 1 of 1

Allow set_shortcut_toggled on built-in shortcuts.

Posted: Sat May 04, 2019 5:15 pm
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.

Re: Allow set_shortcut_toggled on built-in shortcuts.

Posted: Sat May 04, 2019 6:49 pm
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.

Re: Allow set_shortcut_toggled on built-in shortcuts.

Posted: Sat May 04, 2019 6:53 pm
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

Re: Allow set_shortcut_toggled on built-in shortcuts.

Posted: Sat May 04, 2019 7:16 pm
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.)

Re: Allow set_shortcut_toggled on built-in shortcuts.

Posted: Sat May 04, 2019 7:40 pm
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.

Re: Allow set_shortcut_toggled on built-in shortcuts.

Posted: Mon May 06, 2019 7:40 pm
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.