diff options
-rw-r--r-- | game/battle.rpy | 2 | ||||
-rw-r--r-- | game/gui/battle.rpy | 2 | ||||
-rw-r--r-- | game/quest.rpy | 1 | ||||
-rw-r--r-- | game/script.rpy | 7 |
4 files changed, 10 insertions, 2 deletions
diff --git a/game/battle.rpy b/game/battle.rpy index 731682e..02ac498 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -31,7 +31,7 @@ label combat: # Implement combat view $stdout("================= prepare for combat") $ hud_clear() - $ show_img("bg battle", False) + $ show_img("bg %s" % TMP_BACKG, False) scene bg battle # Load variables python: diff --git a/game/gui/battle.rpy b/game/gui/battle.rpy index f180c1c..7f77bd9 100644 --- a/game/gui/battle.rpy +++ b/game/gui/battle.rpy @@ -338,7 +338,7 @@ screen battle_bars(): screen battle(): # Background and append all three battle sub-screens # FIXME Our custom displayables are not 100.00% reliable - add "bg battle" + add "bg %s" % TMP_BACKG use battle_mobs use battle_core use battle_bars diff --git a/game/quest.rpy b/game/quest.rpy index 4ba1185..6bb7caf 100644 --- a/game/quest.rpy +++ b/game/quest.rpy @@ -165,6 +165,7 @@ label quest_selected: # Okay, story-telling time is over: To arms! # $ TMP_MUSIC=get_sfx(quest["music"]) + $ TMP_BACKG=quest["bg"] #$ print("Stage music: "+str(TMP_MUSIC)) play music TMP_MUSIC fadein 0.5 #play music MUSIC_BATTLE.id() fadein 0.5 diff --git a/game/script.rpy b/game/script.rpy index 4bd7081..946db3b 100644 --- a/game/script.rpy +++ b/game/script.rpy @@ -135,6 +135,13 @@ label loop: $ renpy.call_screen("msgbox", "{b}Battle{/b}\n\nYou are in battle. You'll be brought back to combat.") #window show None $ Battle=reload_battle() + python: + try: + TMP_BACKG=dl_search(allquests[Battle["world"]], "quest_id", Battle["quest_id"])["bg"] + except: + traceback.print_exec() + stdout("Invalid background for reloaded battle") + pass # TODO: Handle errors if (Battle in [ERR_JSONDECODER]): e "Unknown Error: [ERR_JSONDECODER]" |