Skip to content

Commit

Permalink
Merge pull request #1194 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
Bugs correction
  • Loading branch information
HavlockV authored Aug 18, 2022
2 parents 442512d + 7e379d0 commit 4564cac
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 19 deletions.
9 changes: 9 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ _If you decide to go on with V10:_

Happy gaming !

## Version 0.8.1

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.

- Bug correction of sanity flow where applying san loss will fail the card.
- Bug correction on item summary slide down.
- Further support for FoundryVTT v10 #1188
- Update to Italian localization, thanks to @Stefano1975t #1187

## Version 0.8.0

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.
Expand Down
4 changes: 4 additions & 0 deletions lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,10 @@
"SETTINGS.showIconsOnly": "Nella scheda riepilogativa, mostra solo le icone nell'elenco delle abilità.",
"SETTINGS.UseToken": "Usa l'immagine della pedina",
"SETTINGS.UseTokenHint": "Usa l'immagine della pedina invece dei ritratti nelle schede della chat",
"SETTINGS.TrustedCanModfyChatCard": "Permetti ai giocatori fidati di modificare la scheda di chat",
"SETTINGS.TrustedCanModfyChatCardHint": "Attivare questa impostazione permetterà ai giocatori fidati di selezionare le opzioni sulla scheda di chat. La sezione privata del GM continuerà a non essere visibile per loro",
"SETTINGS.TrustedCanSeeChatCard": "Permetti ai giocatori fidati di vedere le sezioni private del GM",
"SETTINGS.TrustedCanSeeChatCardHint": "Attivare questa impostazione permetterà ai giocatori fidati di vedere la sezione privata del GM sulla scheda di chat. Usa questa opzione con cautela!",
"SETTINGS.DisplayActorOnCard": "Mostra il personaggio sulla scheda",
"SETTINGS.DisplayActorOnCardHint": "mostra l'immagine/la pedina del personaggio sulle schede della chat di combattimento",
"SETTINGS.InitiativeRule": "Seleziona regola per l'iniziativa",
Expand Down
4 changes: 4 additions & 0 deletions module/actors/actor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,10 @@ export class CoCActor extends Actor {
return this.data.data.attribs.san?.dailyLoss || 0
}

get dailySanLimit () {
return this.data.data.attribs.san?.dailyLimit || 0
}

get rawSanMax () {
if (!this.data.data.attribs) return undefined
if (this.data.data.attribs?.san?.auto) {
Expand Down
5 changes: 4 additions & 1 deletion module/actors/sheets/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,10 @@ export class CoC7ActorSheet extends ActorSheet {
// Toggle summary
if (li.hasClass('expanded')) {
const summary = li.children('.item-summary')
summary.slideUp(200, () => summary.remove())
summary.slideUp(200, () => {
summary.remove()
li.toggleClass('expanded')
})
} else {
const div = $('<div class="item-summary"></div>')

Expand Down
2 changes: 1 addition & 1 deletion module/apps/coc7-tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (typeof Tour !== 'undefined') {

const observer = new MutationObserver((mutations, observer) => {
document.querySelectorAll(selector).forEach((el) => {
resolve(el)
resolve()
observer.disconnect()
})
})
Expand Down
2 changes: 1 addition & 1 deletion module/chat/cards/san-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export class SanCheckCard extends ChatCardActor {
this.state.intRolled = false
}

if (this.actor.dailySanLoss >= this.data.data.attribs.san.dailyLimit) {
if (this.actor.dailySanLoss >= this.actor.dailySanLimit) {
// this.actor.san/5
this.state.insanity = true
this.state.intRolled = true
Expand Down
23 changes: 12 additions & 11 deletions module/tours/enable-variant-rules-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export class EnableVariantRulesEn extends CoC7Tour {
},
{
id: 'goto-system-settings',
selector: '[data-tab="system"]',
selector: '[data-category="system"]',
title: 'COC7.Tour.GotoSystemSettingsTitle',
content: 'COC7.Tour.GotoSystemSettingsContent',
action: 'click'
},
{
id: 'goto-game-rules',
selector: '[data-key="CoC7.gameRules"]',
selector: '[data-category="system"] [data-key="CoC7.gameRules"]',
title: 'COC7.Tour.GotoGameRulesTitle',
content: 'COC7.Tour.GotoGameRulesContent',
action: 'click'
Expand All @@ -42,12 +42,6 @@ export class EnableVariantRulesEn extends CoC7Tour {
selector: '#rules-settings [name=submit]',
title: 'COC7.Tour.SaveGameRulesTitle',
content: 'COC7.Tour.SaveGameRulesContent'
},
{
id: 'save-system-settings-rules',
selector: '#client-settings [name=submit]',
title: 'COC7.Tour.SaveSystemSettingsTitle',
content: 'COC7.Tour.SaveSystemSettingsContent'
}
],
localization: {
Expand All @@ -60,10 +54,17 @@ export class EnableVariantRulesEn extends CoC7Tour {
'COC7.Tour.GotoGameRulesTitle': 'Configure Variant/Optional Rules',
'COC7.Tour.GotoGameRulesContent': 'Click on the Configure Variant/Optional Rules button',
'COC7.Tour.SaveGameRulesTitle': 'Save rule changes',
'COC7.Tour.SaveGameRulesContent': 'Once you have made your changes click on the Save Changes button',
'COC7.Tour.SaveSystemSettingsTitle': 'Save system settings',
'COC7.Tour.SaveSystemSettingsContent': 'Finally click on the Save Changes button'
'COC7.Tour.SaveGameRulesContent': 'Once you have made your changes click on the Save Changes button'
}
}, config))
}

async _preStep () {
await super._preStep()

if (this.currentStep.id === 'goto-game-rules') {
await this.waitForElement('.category-filter.system.active')
await this.waitForElement(this.currentStep.selector)
}
}
}
4 changes: 1 addition & 3 deletions module/tours/enable-variant-rules-fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export class EnableVariantRulesFr extends EnableVariantRulesEn {
'COC7.Tour.GotoGameRulesTitle': 'Configurer les variantes/règles optionnelles',
'COC7.Tour.GotoGameRulesContent': 'Clickez sur le boutton "Configurer les variantes/règles optionnelles"',
'COC7.Tour.SaveGameRulesTitle': 'Sauvegarder les modifications',
'COC7.Tour.SaveGameRulesContent': 'Apres avoir choisis les options cliquez sur le bouton "Sauvegarder les modifications"',
'COC7.Tour.SaveSystemSettingsTitle': 'Saugarder',
'COC7.Tour.SaveSystemSettingsContent': 'Cliquez sur "Sauvegarer" !'
'COC7.Tour.SaveGameRulesContent': 'Apres avoir choisis les options cliquez sur le bouton "Sauvegarder les modifications"'
}
})
}
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-coc7",
"version": "0.7.11",
"version": "0.8.1",
"description": "An unofficial implementation of Call of Cthulhu 7th Edition system for Foundry VTT.",
"scripts": {
"build": "webpack --mode production",
Expand Down
3 changes: 3 additions & 0 deletions styles/system/inline.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
text-align: left;
}

.coc7.sheet.actor a.coc7-link,
a.coc7-link {
display: inline-flex;
align-items: center;
height: 1.5rem;
img {
flex: 0;
border: none;
width: 1rem;
margin-right: 0.2rem;
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "CoC7",
"title": "Call of Cthulhu 7th Edition (Unofficial)",
"description": "An unofficial implementation of the Call of Cthulhu 7th Edition game system for Foundry Virtual Tabletop.",
"version": "0.8.0",
"version": "0.8.1",
"authors": [
{
"name": "Miskatonic Investigative Society"
Expand Down

0 comments on commit 4564cac

Please sign in to comment.