Skip to content

Commit

Permalink
0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SalieriC committed Mar 17, 2021
1 parent fae1178 commit b3d5438
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 30 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.1]
### You need to update these macros:
- Spend Benny
- (Un-)Shake (both versions)
- (Un-)Stun
- Personal Health Centre
- Power Point Management
- Soak Damage
### Fixed
- Removed the border of images in chat messages.
- Fixed a breaking bug that caused the module to not work if SWADE Spices & Flavours was not installed (thx @Khitan#9089 for bringing it to my attention).

## [0.6.0] - 2021-03-10
### You need to update these macros:
- (Un-)Stunned
Expand Down
Binary file modified swim.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions swim/macros/(Un-)Shake (SWADE).js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {

// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -140,7 +140,7 @@ async function main() {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny and ${token.name} may act normally now.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny and ${token.name} may act normally now.</p>`,
});
}

Expand All @@ -153,4 +153,4 @@ async function main() {
}
}
}
/// v.3.2.0 Original code by Shteff, altered by Forien and SalieriC#8263, thanks to Spacemandev for the help as well. Fixed by hirumatto.
/// v.3.3.1 Original code by Shteff, altered by Forien and SalieriC#8263, thanks to Spacemandev for the help as well. Fixed by hirumatto.
6 changes: 3 additions & 3 deletions swim/macros/(Un-)Shake (SWD).js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function main() {

// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -143,7 +143,7 @@ async function main() {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny and ${token.name} may act normally now.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny and ${token.name} may act normally now.</p>`,
});
}

Expand All @@ -156,4 +156,4 @@ async function main() {
}
}
}
/// v.3.2.0 Original code by Shteff, altered by Forien and SalieriC#8263, thanks to Spacemandev for the help as well. Fixed by hirumatto.
/// v.3.3.1 Original code by Shteff, altered by Forien and SalieriC#8263, thanks to Spacemandev for the help as well. Fixed by hirumatto.
6 changes: 3 additions & 3 deletions swim/macros/(Un-)Stun.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function main() {

// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -152,7 +152,7 @@ async function main() {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
});
}

Expand All @@ -174,4 +174,4 @@ async function main() {
}
}

// v.3.1.0 Made by SalieriC#8263 using original Code from Shteff.
// v.3.2.1 Made by SalieriC#8263 using original Code from Shteff.
10 changes: 5 additions & 5 deletions swim/macros/Personal Health Centre.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function main() {
}
// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -457,7 +457,7 @@ for (let fatiguePotion of ownedFatiguePotions) {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
});
}

Expand Down Expand Up @@ -604,7 +604,7 @@ for (let fatiguePotion of ownedFatiguePotions) {
speaker: {
alias: token.name
},
content: `<img src="${potion_icon}" alt="" width="25" height="25" /> ${token.name} uses a ${selectedPotion} to heal ${genericHealWounds} wound(s).`
content: `<img style="border: none;" src="${potion_icon}" alt="" width="25" height="25" /> ${token.name} uses a ${selectedPotion} to heal ${genericHealWounds} wound(s).`
})
if (potionSFX) {
let audioDuration = AudioHelper.play({ src: `${potionSFX}` }, true)._duration;
Expand Down Expand Up @@ -653,7 +653,7 @@ for (let fatiguePotion of ownedFatiguePotions) {
speaker: {
alias: token.name
},
content: `<img src="${potion_icon}" alt="" width="25" height="25" /> ${token.name} uses a ${selectedPotion} to cure ${genericHealFatigue} level(s) of Fatigue.`
content: `<img style="border: none;" src="${potion_icon}" alt="" width="25" height="25" /> ${token.name} uses a ${selectedPotion} to cure ${genericHealFatigue} level(s) of Fatigue.`
})
if (potionSFX) {
let audioDuration = AudioHelper.play({ src: `${potionSFX}` }, true)._duration;
Expand Down Expand Up @@ -742,4 +742,4 @@ for (let fatiguePotion of ownedFatiguePotions) {
}
}

// v.3.0.2 By SalieriC#8263; fixing bugs supported by FloRad#2142. Potion usage inspired by grendel111111#1603; asynchronous playback of sfx by Freeze#2689.
// v.3.1.1 By SalieriC#8263; fixing bugs supported by FloRad#2142. Potion usage inspired by grendel111111#1603; asynchronous playback of sfx by Freeze#2689.
8 changes: 4 additions & 4 deletions swim/macros/Power Point Management.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function main() {

//Set up
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -117,7 +117,7 @@ function main() {
speaker: {
alias: token.name
},
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${token.name} recharges ${actualPP} Power Point(s) by spending a Benny and hits the maximum of ${ppm} (overflow prevented).</p>`
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${token.name} recharges ${actualPP} Power Point(s) by spending a Benny and hits the maximum of ${ppm} (overflow prevented).</p>`
})
}
else {
Expand All @@ -126,7 +126,7 @@ function main() {
speaker: {
alias: token.name
},
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${token.name} recharges 5 Power Point(s) using a Benny and now has ${newPP}.</p>`
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${token.name} recharges 5 Power Point(s) using a Benny and now has ${newPP}.</p>`
})
}
spendBenny();
Expand Down Expand Up @@ -405,4 +405,4 @@ function main() {
}
}

// v4.2.0 - Made by SalieriC#8263; with a ton of help from Kandashi (He/Him)#6698, thank you so much. =) Also thank you Enrahim#5273 and Freeze#2689 for helping me with the conditional buttons and Freeze again for the sound. Thx eXaminator#0079 for the option to have no sound.
// v4.3.1 - Made by SalieriC#8263; with a ton of help from Kandashi (He/Him)#6698, thank you so much. =) Also thank you Enrahim#5273 and Freeze#2689 for helping me with the conditional buttons and Freeze again for the sound. Thx eXaminator#0079 for the option to have no sound.
6 changes: 3 additions & 3 deletions swim/macros/Soak Damage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function main() {
}
// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -223,7 +223,7 @@ function main() {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
});
}

Expand Down Expand Up @@ -363,4 +363,4 @@ function main() {
}
}

// V2.4.0 Code by SalieriC#8263. Critical Failure awareness by Kekilla#7036 Testing and bug-chasing: javierrivera#4813.
// V2.5.1 Code by SalieriC#8263. Critical Failure awareness by Kekilla#7036 Testing and bug-chasing: javierrivera#4813.
4 changes: 2 additions & 2 deletions swim/macros/Spend Benny.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function main() {

// Checking for SWADE Spices & Flavours and setting up the Benny image.
let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp";
if (game.modules.get("swade-spices").active) {
if (game.modules.get("swade-spices")?.active) {
let benny_Back = game.settings.get(
'swade-spices', 'bennyBack');
if (benny_Back) {
Expand Down Expand Up @@ -46,7 +46,7 @@ async function main() {
//Chat Message to let the everyone know a benny was spent
ChatMessage.create({
user: game.user._id,
content: `<p><img src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
content: `<p><img style="border: none;" src="${bennyImage}"" width="25" height="25" /> ${game.user.name} spent a Benny for ${token.name}.</p>`,
});
}

Expand Down
2 changes: 1 addition & 1 deletion swim/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A simple module to configure some stuff in the SWADE System on Foundry VTT.",
"minimumCoreVersion": "0.7.4",
"compatibleCoreVersion": "0.7.9",
"version": "0.6.0",
"version": "0.6.1",
"author": "SalieriC",
"dependencies": [
{
Expand Down
Loading

0 comments on commit b3d5438

Please sign in to comment.