Skip to content

Commit

Permalink
version 2.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
p4535992 committed Nov 1, 2023
1 parent fecd835 commit 9c2191e
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 1,213 deletions.
22 changes: 11 additions & 11 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
34 changes: 17 additions & 17 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
gulpfile.js
.eslintrc.js
.prettierrc.js
jsconfig.json
/.pnp.js
/.yarn/

.github/
dist/
docs/
external/
src/languages/
src/assets/
src/lang/
src/scripts/
src/styles/
src/templates/
gulpfile.js
.eslintrc.js
.prettierrc.js
jsconfig.json
/.pnp.js
/.yarn/

.github/
dist/
docs/
external/
src/languages/
src/assets/
src/lang/
src/scripts/
src/styles/
src/templates/
src/**/*.svelte
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
"import/resolver": {
"node": {
"paths": ["src", "types", "", "dist"],
"extensions": [".css", ".mjs", ".mjs", ".json", ".jsx", ".scss", ".ts", ".tsx"],
"extensions": [".css", ".js", ".mjs", ".json", ".jsx", ".scss", ".ts", ".tsx"],
},
"eslint-import-resolver-typescript": true,
"typescript": {
Expand Down
14 changes: 7 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.github export-ignore
FUNDING.yml export-ignore

.gitattributes export-ignore
README.md export-ignore
preview.jpg export-ignore
patchnotes.md export-ignore
.github export-ignore
FUNDING.yml export-ignore

.gitattributes export-ignore
README.md export-ignore
preview.jpg export-ignore
patchnotes.md export-ignore
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ out

# Foundry
foundry.js
/.vscode
/dist
/package
/.vite-cache
Expand Down
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CHANGELOG

## 2.3.3
### 2.3.4

- Add fix to sound(door lock) sound, ty to @Saibot393

### 2.3.3

- Stupid rename for fix https://github.com/p4535992/foundryvtt-arms-reach/issues/80
### 2.3.0-1-2 [BREAKING CHANGES]
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "arms-reach",
"title": "FoundryVTT Arms Reach",
"description": "Allows the GM to limit the distance that a player can interacted with a placeable object like door, journal, stairway, token, ecc..",
"version": "2.3.3",
"version": "2.3.4",
"main": "module.js",
"license": "SEE LICENSE IN LICENSE",
"private": true,
Expand All @@ -17,6 +17,7 @@
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@rollup/plugin-node-resolve": "^15.2.1",
"@typhonjs-fvtt/runtime": "^0.1.0",
"@typhonjs-fvtt/svelte-standard": "^0.1.0",
"svelte": "^4.0.0",
Expand All @@ -27,6 +28,7 @@
"eslint": "^8",
"husky": "^8.0.3",
"jquery": "^3.6.4",
"jsdoc": "^4.0.2",
"lint-staged": "^13.2.1",
"prettier": "^2.8.7",
"sass": "^1.63.6",
Expand All @@ -46,7 +48,7 @@
"dev": "vite",
"eslint": "eslint .",
"prepare": "husky install",
"prettier-format": "prettier --config .prettierrc --write \"./src/**/*.{ts,js,mjs,json,scss,css}\""
"prettier-format": "prettier --config .prettierrc --write \"./src/**/*.{js,mjs,json,scss,css}\""
},
"lint-staged": {
"*.{js,css}": "prettier --write"
Expand Down
10 changes: 5 additions & 5 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "arms-reach",
"title": "Arms Reach",
"description": "Allows the GM to limit the distance that a player can interacted with a placeable object like door, journal, stairway, token, ecc..",
"version": "2.3.3",
"version": "2.3.4",
"authors": [
{
"name": "Psyny"
Expand Down Expand Up @@ -91,10 +91,10 @@
},
"manifestPlusVersion": "1.2.1",
"url": "https://github.com/p4535992/foundryvtt-arms-reach",
"manifest": "https://github.com/p4535992/foundryvtt-arms-reach/releases/download/v2.3.3/module.json",
"download": "https://github.com/p4535992/foundryvtt-arms-reach/releases/download/v2.3.3/module.zip",
"readme": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.3.3/README.md",
"changelog": "https://github.com/p4535992/foundryvtt-arms-reach/blob/v2.3.3/changelog.md",
"manifest": "https://github.com/p4535992/foundryvtt-arms-reach/releases/download/2.3.4/module.json",
"download": "https://github.com/p4535992/foundryvtt-arms-reach/releases/download/2.3.4/module.zip",
"readme": "https://github.com/p4535992/foundryvtt-arms-reach/blob/main/README.md",
"changelog": "https://github.com/p4535992/foundryvtt-arms-reach/blob/main/changelog.md",
"bugs": "https://github.com/p4535992/foundryvtt-arms-reach/issues",
"allowBugReporter": true,
"relationships": {
Expand Down
78 changes: 56 additions & 22 deletions src/scripts/lib/lib.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,43 +19,77 @@ export function wait(ms) {
// export let debugEnabled = 0;
// 0 = none, warnings = 1, debug = 2, all = 3

export function debug(msg, args = "") {
if (game.settings.get(CONSTANTS.MODULE_ID, "debug")) {
console.log(`DEBUG | ${CONSTANTS.MODULE_ID} | ${msg}`, args);
export function debug(msg, ...args) {
try {
if (
game.settings.get(CONSTANTS.MODULE_ID, "debug") ||
game.modules.get("_dev-mode")?.api?.getPackageDebugValue(CONSTANTS.MODULE_ID, "boolean")
) {
console.log(`DEBUG | ${CONSTANTS.MODULE_ID} | ${msg}`, ...args);
}
} catch (e) {
console.error(e.message);
}
return msg;
}

export function log(message) {
message = `${CONSTANTS.MODULE_ID} | ${message}`;
console.log(message.replace("<br>", "\n"));
export function log(message, ...args) {
try {
message = `${CONSTANTS.MODULE_ID} | ${message}`;
console.log(message.replace("<br>", "\n"), ...args);
} catch (e) {
console.error(e.message);
}
return message;
}

export function notify(message) {
message = `${CONSTANTS.MODULE_ID} | ${message}`;
ui.notifications?.notify(message);
console.log(message.replace("<br>", "\n"));
export function notify(message, ...args) {
try {
message = `${CONSTANTS.MODULE_ID} | ${message}`;
ui.notifications?.notify(message);
console.log(message.replace("<br>", "\n"), ...args);
} catch (e) {
console.error(e.message);
}
return message;
}

export function info(info, notify = false) {
info = `${CONSTANTS.MODULE_ID} | ${info}`;
if (notify) ui.notifications?.info(info);
console.log(info.replace("<br>", "\n"));
export function info(info, notify = false, ...args) {
try {
info = `${CONSTANTS.MODULE_ID} | ${info}`;
if (notify) {
ui.notifications?.info(info);
}
console.log(info.replace("<br>", "\n"), ...args);
} catch (e) {
console.error(e.message);
}
return info;
}

export function warn(warning, notify = false) {
warning = `${CONSTANTS.MODULE_ID} | ${warning}`;
if (notify) ui.notifications?.warn(warning);
console.warn(warning.replace("<br>", "\n"));
export function warn(warning, notify = false, ...args) {
try {
warning = `${CONSTANTS.MODULE_ID} | ${warning}`;
if (notify) {
ui.notifications?.warn(warning);
}
console.warn(warning.replace("<br>", "\n"), ...args);
} catch (e) {
console.error(e.message);
}
return warning;
}

export function error(error, notify = true) {
error = `${CONSTANTS.MODULE_ID} | ${error}`;
if (notify) ui.notifications?.error(error);
export function error(error, notify = true, ...args) {
try {
error = `${CONSTANTS.MODULE_ID} | ${error}`;
if (notify) {
ui.notifications?.error(error);
}
console.error(error.replace("<br>", "\n"), ...args);
} catch (e) {
console.error(e.message);
}
return new Error(error.replace("<br>", "\n"));
}

Expand All @@ -71,7 +105,7 @@ export const i18nFormat = (key, data = {}) => {
return game.i18n.format(key, data)?.trim();
};

// export const setDebugLevel = (debugText) => {
// export const setDebugLevel = (debugText): void => {
// debugEnabled = { none: 0, warn: 1, debug: 2, all: 3 }[debugText] || 0;
// // 0 = none, warnings = 1, debug = 2, all = 3
// if (debugEnabled >= 3) CONFIG.debug.hooks = true;
Expand Down
Loading

0 comments on commit 9c2191e

Please sign in to comment.