diff --git a/src/module/ArmsReachSocket.ts b/src/module/ArmsReachSocket.ts index a525bc8..38f31b9 100644 --- a/src/module/ArmsReachSocket.ts +++ b/src/module/ArmsReachSocket.ts @@ -8,6 +8,7 @@ export function recalculate(tokens) { } export function _socketRecalculate(tokenIds) { + // DO NOTHING JUST REGISTER THE TOKEN FOR STRANGE BUG WITH SOCKETLIB //@ts-ignore - return getCanvas().controls?.ruler?.dragRulerRecalculate(tokenIds); + // return getCanvas().controls?.ruler?.dragRulerRecalculate(tokenIds); } diff --git a/src/module/DoorsReach.ts b/src/module/DoorsReach.ts index 30bd622..5cec20e 100644 --- a/src/module/DoorsReach.ts +++ b/src/module/DoorsReach.ts @@ -40,7 +40,7 @@ export const DoorsReach = { ArmsReachVariables.door_interaction_lastTime = Date.now(); const character = getFirstPlayerToken(); if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelectedToCenterCamera')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelectedToCenterCamera`)); return; } @@ -71,7 +71,7 @@ export const DoorsReach = { const character = getFirstPlayerToken(); if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelected')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelected`)); return; } @@ -215,7 +215,7 @@ export const DoorsReach = { }; if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelected')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelected`)); return false; } else { // PreHook (can abort the interaction with the door) @@ -223,10 +223,10 @@ export const DoorsReach = { const tokenName = getCharacterName(character); if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.doorNotInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.doorNotInReachFor`, { tokenName: tokenName }), ); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.doorNotInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.doorNotInReach`)); } return false; } @@ -280,10 +280,10 @@ export const DoorsReach = { const tokenName = getCharacterName(character); if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.doorNotInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.doorNotInReachFor`, { tokenName: tokenName }), ); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.doorNotInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.doorNotInReach`)); } return false; } else { @@ -510,11 +510,11 @@ export const DoorsReach = { if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.doorNotFoundInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.doorNotFoundInReachFor`, { tokenName: tokenName }), ); //iteractionFailNotification(`Door distance: ${clampNum(shortestDistance)} <= ${reach}`); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.doorNotFoundInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.doorNotFoundInReach`)); //iteractionFailNotification(`Door distance: ${clampNum(shortestDistance)} <= ${reach}`); } return; diff --git a/src/module/JournalsReach.ts b/src/module/JournalsReach.ts index 0d4a6cf..11788dc 100644 --- a/src/module/JournalsReach.ts +++ b/src/module/JournalsReach.ts @@ -44,7 +44,7 @@ export const JournalsReach = { getGame().settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionDistanceForGM')) ) { if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelectedForJournal')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelectedForJournal`)); return false; } else { let isNotNearEnough = false; @@ -62,10 +62,10 @@ export const JournalsReach = { const tokenName = getCharacterName(character); if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.journalsNotInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.journalsNotInReachFor`, { tokenName: tokenName }), ); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.journalsNotInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.journalsNotInReach`)); } return false; } else { diff --git a/src/module/StairwaysReach.ts b/src/module/StairwaysReach.ts index 08b6985..d92ff68 100644 --- a/src/module/StairwaysReach.ts +++ b/src/module/StairwaysReach.ts @@ -46,7 +46,7 @@ export const StairwaysReach = { getGame().settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionDistanceForGM')) ) { if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelectedForStairway')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelectedForStairway`)); return false; } else { let isNotNearEnough = false; @@ -64,10 +64,10 @@ export const StairwaysReach = { const tokenName = getCharacterName(character); if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.stairwaysNotInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.stairwaysNotInReachFor`, { tokenName: tokenName }), ); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.stairwaysNotInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.stairwaysNotInReach`)); } return false; } else { diff --git a/src/module/TokensReach.ts b/src/module/TokensReach.ts index 75beffe..8ad41ff 100644 --- a/src/module/TokensReach.ts +++ b/src/module/TokensReach.ts @@ -44,7 +44,7 @@ export const TokensReach = { getGame().settings.get(ARMS_REACH_MODULE_NAME, 'globalInteractionDistanceForGM')) ) { if (!character) { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.noCharacterSelectedForJournal')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.noCharacterSelectedForJournal`)); return false; } else { let isNotNearEnough = false; @@ -62,10 +62,10 @@ export const TokensReach = { const tokenName = getCharacterName(character); if (tokenName) { iteractionFailNotification( - i18nFormat(ARMS_REACH_MODULE_NAME + '.tokensNotInReachFor', { tokenName: tokenName }), + i18nFormat(`${ARMS_REACH_MODULE_NAME}.tokensNotInReachFor`, { tokenName: tokenName }), ); } else { - iteractionFailNotification(i18n(ARMS_REACH_MODULE_NAME + '.tokensNotInReach')); + iteractionFailNotification(i18n(`${ARMS_REACH_MODULE_NAME}.tokensNotInReach`)); } return false; } else {