Add left_click_sound to LuaStyle

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
jdogg
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Oct 08, 2018 9:41 pm
Contact:

Add left_click_sound to LuaStyle

Post by jdogg »

Was wondering if this would be possible so I could change the sound file of the the style through the control script.

The idea being if the player can't reach the entity my GUI is trying access it plays the default cannot-build.ogg but if they can it just uses the normal gui-click.ogg sound. I can get it to kinda work by making two different gui styles with the different sound files but when the script updates the style it doesn't use the new style's left_click_sound file. This means the player has to click the button twice to get the error sound. Not terrible, but doesn't feel right.

Unless there is some other way to access this that I'm not seeing.
Post Reply

Return to “Modding interface requests”