I'm trying to add a new utility sound to use with surface.play_sound(). But all attempts at this have failed so far.
For adding the prototype i vertabitm copied the function body from /core/prototypes/utility-sounds.lua
Code: Select all
data.raw["utility-sounds"]["default"]['warp'] =
{
{
filename = '__er-waypoints__/assets/warp.ogg'
}
}
But:
Every time i try to use the sound with surface.play_sounds() i get an <Unknown utility sound "warp"> error.
Code: Select all
wp.entity.surface.play_sound{
-- path = 'utility/axe_mining_ore',
path = 'utility/warp',
-- path = "entity-build/wooden-chest"
position = wp.entity.position,
volume_modifier = 0.8,
}
Any help would be greatly appreciated. Has anyone else successfully added new utility sounds?