Read if instrument mode is enabled

User avatar
Osmo
Filter Inserter
Filter Inserter
Posts: 329
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: 525
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
Rseding91
Factorio Staff
Factorio Staff
Posts: 17239
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Read if instrument mode is enabled

Post by Rseding91 »

This was added for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Implemented mod requests”