Add FileName or SoundDefinition variant to Sound

Place to report issues and suggest improvements to the API documentation.
Geheim
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Feb 05, 2025 9:28 pm
Contact:

Add FileName or SoundDefinition variant to Sound

Post by Geheim »

Sound is of type struct or array[SoundDefinition] and SoundDefinition is of type struct or FileName. However, Sound itself is sometimes used as a single SoundDefinition or FileName, e.g.

Code: Select all

data.raw["gui-style"]["default"]["button"]["left_click_sound"] = "__core__/sound/gui-click.ogg"
(or line 743 of data-raw-dump.json)
Related: 117186
curiosity
Filter Inserter
Filter Inserter
Posts: 607
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add FileName or SoundDefinition variant to Sound

Post by curiosity »

Quite a few of these shortcuts were removed in 2.0, but apparently not enough of them.
Post Reply

Return to “Documentation Improvement Requests”