Skip to content

Commit

Permalink
2.0.1 (#39)
Browse files Browse the repository at this point in the history
* fix: players who have not selected a character are now able to see the achievements window
* fix: added socketlib as a dependency
  • Loading branch information
EddieDover committed Feb 4, 2024
1 parent bd8b867 commit 022fe62
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.2.1 (2024-02-04)

##### Bug Fixes

* added socketlib as a dependency ([f68aa849](https://github.com/EddieDover/fvtt-player-achievements/commit/f68aa84973878bd2aec4d120ef5bb8b0fcf56f29))
* players who have not selected a character are now able to see the achievements window ([f3b36414](https://github.com/EddieDover/fvtt-player-achievements/commit/f3b364146a84528c7c133483c2a5c06f64f63b36))

## 1.2.0 (2024-01-29)

##### New Features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fvtt-player-achievements",
"version": "1.2.0",
"version": "1.2.1",
"description": "Player Achievements for Foundry VTT",
"main": "index.js",
"author": {
Expand Down
8 changes: 7 additions & 1 deletion src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,18 @@
"url": "https://github.com/eddiedover/"
}
],
"version": "1.2.0",
"version": "1.2.1",
"compatibility": {
"minimum": "11",
"verified": "11"
},
"relationships": {
"requires": [
{
"id": "socketlib",
"type": "module"
}
],
"conflicts": [
{
"id": "enhancedcombathud",
Expand Down
18 changes: 9 additions & 9 deletions src/module/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ const PlayerAchievementsAPI = (function () {
* @param {string} id The achievement id
* @param {string} title The achievement title
* @param {string} description The achievement description
* @param {boolean} [showTitleCloaked=false] Show the title cloaked?
* @param {string} [image="/modules/fvtt-player-achievements/images/default.webp"] The achievement image
* @param {string} [cloakedImage="/modules/fvtt-player-achievements/images/default.webp"] The achievement cloaked image
* @param {string} [sound="/modules/fvtt-player-achievements/sounds/notification.ogg"] The achievement sound effect
* @param {boolean} showTitleCloaked Show the title cloaked?
* @param {string} image The achievement image
* @param {string} cloakedImage The achievement cloaked image
* @param {string} sound The achievement sound effect
* @returns { PlayerAchievementReturn<boolean> } Was the achievement created?
*/
function createAchievement(
Expand Down Expand Up @@ -212,7 +212,7 @@ const PlayerAchievementsAPI = (function () {

/**
* Delete an achievement
* @param {string} id
* @param {string} id The achievement id
* @returns {PlayerAchievementReturn<boolean>} Was the achievement deleted?
*/
function deleteAchievement(id) {
Expand All @@ -234,10 +234,10 @@ const PlayerAchievementsAPI = (function () {
* @param {string} id The achievement id
* @param {string} title The achievement title
* @param {string} description The achievement description
* @param {boolean} [showTitleCloaked=false] Show the title cloaked?
* @param {string} [image="/modules/fvtt-player-achievements/images/default.webp"] The achievement image
* @param {string} [cloakedImage="/modules/fvtt-player-achievements/images/default.webp"] The achievement cloaked image
* @param {string} [sound="/modules/fvtt-player-achievements/sounds/notification.ogg"] The achievement sound effect
* @param {boolean} showTitleCloaked Show the title cloaked?
* @param {string} image The achievement image
* @param {string} cloakedImage The achievement cloaked image
* @param {string} sound The achievement sound effect
* @returns { PlayerAchievementReturn<boolean> } Was the achievement edited?
*/
function editAchievement(
Expand Down
4 changes: 2 additions & 2 deletions src/module/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export async function getAchivements(overrides) {
if (!game.user.isGM) {
return await achievement_socket.executeAsGM("getAchievements", {
callingUser: game.user,
callingCharacterId: `Actor.${game.user.character.id ?? ""}`,
callingCharacterId: `Actor.${game.user?.character?.id ?? ""}`,
});
}

Expand Down Expand Up @@ -287,7 +287,7 @@ export function unAwardAchievement(achievementId, characterIds) {
/**
* Does the actor exist?
* @param {string} actorId The actor id
* @returns {boolean}
* @returns {boolean} Does the actor exist?
*/
export function doesActorExist(actorId) {
const nonNPCActors = game.actors.filter((actor) => actor.type !== "npc");
Expand Down

0 comments on commit 022fe62

Please sign in to comment.