Page 1 of 1

More shortcut button API features please

Posted: Sun Mar 17, 2019 11:40 am
by GotLag
I've been experimenting with shortcut buttons and there are a few features I feel are currently lacking.
I think these are pretty obvious so they're probably already on somebody's to-do list or even being worked upon, but:
  • Respect the prototype's technology_to_unlock setting - currently this does nothing
  • Relatedly, "not yet enabled" functionality should be separated from "not yet able to be added to the shortcut bar"
  • Allow buttons to be enabled/disabled via script, and possibly add a start_disabled setting/flag to the prototype so the button can be enabled by script instead of by a technology
  • Allow toggleable to work with lua buttons, and provide API functions to read (and write) button state, presumably by having the event return a LuaShortcut entity or something
  • Minor feature: ability to create custom shortcut styles (eg style = "green")
Apologies for the rambling semi-incoherency :)

Re: More shortcut button API features please

Posted: Sun Mar 17, 2019 5:46 pm
by GotLag
Gah, I looked at the API but didn't find the shortcut features because they're in LuaPlayer for some reason:
https://lua-api.factorio.com/latest/Lua ... ut_toggled