diff --git a/README.md b/README.md index 05335f6..fd5dc65 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,8 @@ Enum bitmask of the types of growables that will spawn. Customize the background to look like the background of `background_theme`. * `floor_theme` THEME \ Customize the floor textures to look like the floors of `floor_theme`. +* `music_theme` THEME \ +Customize the music to play the music for `music_theme`. * `post_configure` function(CustomTheme, Subtheme) \ Function that allows additional configuration of the CustomTheme that was created from the properties. diff --git a/level_sequence.lua b/level_sequence.lua index 89d701d..8ed6237 100644 --- a/level_sequence.lua +++ b/level_sequence.lua @@ -555,6 +555,12 @@ local function update_state_and_doors() state.world = current_level.world or index_of_level(current_level) state.level = current_level.level or 1 + if current_level.music then + state.theme = current_level.music + elseif current_level.music_theme then + state.theme = current_level.music_theme + end + if sequence_state.keep_progress then -- Setting the _start properties of the state will ensure that Instant Restarts will take -- the player back to the current level, instead of going to the starting level.