Read if instrument mode is enabled

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 294
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Read if instrument mode is enabled

Post by Osmo »

It'd be useful to be able to read if instrument mode is enabled, to conditionally enable some stuff, like using features from debug library, and using exclusive APIs, like on_error and (undocumented as of 2.0.77) LuaGuiElement::actual_size.
It doesn't make much sense to load before all other mods just to define a value in instrument-control.lua and see if it is loaded or not. It also makes it harder for more than one mod to use instrument mode features, even if only one of them needs the functionality of loading before/after other mods.
It'd probably be most useful as a value in LuaHelpers, so it'd be available in data and setting stages, and return a name of the enabled instrument mode mod or nil. But only being available at runtime would also be useful.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 501
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Read if instrument mode is enabled

Post by protocol_1903 »

+1
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
Post Reply

Return to “Modding interface requests”