Skip to content

Commit

Permalink
Check if is real or dream world shopping
Browse files Browse the repository at this point in the history
  • Loading branch information
thehatkid committed Aug 6, 2022
1 parent 18712ad commit d4b1d09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions mod/js/plugins/HK_DiscordRPC_10_Handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getNameOf(obj) {

async function DRPC_Handler() {
let handlerLoop = true;
let scene, leader, chapter, hasFocus;
let scene, leader, chapter, hasFocus, isFaraway;
let old_scene, old_leader, old_chapter, old_hasFocus;
let leaderAssetKey, titleAssetKey;
let startTimestamp = Date.now();
Expand All @@ -31,6 +31,7 @@ async function DRPC_Handler() {
scene = SceneManager._scene;
leader = $gameParty.members()[0];
chapter = $gameVariables.value(23) ? $gameVariables.value(23) : "PROLOGUE";
isFaraway = $gameSwitches.value(7);
hasFocus = window.document.hasFocus();

if (
Expand Down Expand Up @@ -273,7 +274,7 @@ async function DRPC_Handler() {
state: langTexts.states.in_shop + (hasFocus ? "" : ` ${langTexts.states.out_of_focus}`),
largeImageKey: leaderAssetKey,
largeImageText: leader.name(),
smallImageKey: "mailbox",
smallImageKey: isFaraway ? "fa_shop" : "mailbox",
smallImageText: langTexts.texts.shop,
startTimestamp: startTimestamp
});
Expand Down
2 changes: 1 addition & 1 deletion mod/languages/en/HK_DiscordRPC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RichPresence:
foes_facts: "FOES FACTS!"
blackletter_map: "MAP"
photoalbum: "BASIL's PHOTO ALBUM"
shop: "Mailbox (Shop)"
shop: "Shop"
hangman: "HANGMAN"
blackjack: "BLACKJACK"
petrocks: "PET ROCKS"
Expand Down

0 comments on commit d4b1d09

Please sign in to comment.