Skip to content

Commit

Permalink
Merge pull request #1471 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
0.10.9
  • Loading branch information
snap01 authored Dec 24, 2023
2 parents 5cd963b + 284778e commit b7439de
Show file tree
Hide file tree
Showing 69 changed files with 691 additions and 692 deletions.
10 changes: 10 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ Happy gaming !

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

## Version 0.10.9

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

- Allow additional Actor sheet interactions when editing in a compendium
- Fix English Guide and Spanish Guide of the System, thanks to @zeedif #1458
- Resolve issue with dropping a setup on a character sometimes not allowing Validate to be clicked
- Resolve "Deprecated since Version 11" messages
- Update to French localization, thanks to @vonv #1462 and #1464

## Version 0.10.8

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.
Expand Down
32 changes: 16 additions & 16 deletions .github/TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry VTT better! Below is a list of translations keys on existing files that still need translated, based on `en.json`. Feel free to create a new `*.json` file for a language that is not shown here!

The **pl** translation is currently up to date
The following translations are currently up to date **fr**, **pl**

The following translations have more than 50 untranslated strings [are you able to help?](./ABANDONED.md)

Expand All @@ -20,21 +20,21 @@ The following translations have more than 50 untranslated strings [are you able



|Key|de|es|fr|it|ja|zh-TW|
|:---|:---:|:---:|:---:|:---:|:---:|:---:|
|**Remaining**:|**1**|**1**|**8**|**5**|**10**|**12**|
|[CoC7.EraRegency](#coc7eraregency)|✅|✅|✅|✅|✅|❌|
|[CoC7.EraRegencyPulp](#coc7eraregencypulp)|✅|✅|✅|✅|✅|❌|
|[CoC7.ErrorTokenIncorrect](#coc7errortokenincorrect)|✅|✅|✅|✅|❌|❌|
|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|❌|❌|❌|❌|❌|❌|
|[CoC7.SanityLossType](#coc7sanitylosstype)|✅|✅|✅|✅|❌|❌|
|[CoC7.System.Documentation](#coc7systemdocumentation)|✅|✅|❌|✅|❌|❌|
|[CoC7.TokenCreationRoll.ButtonAverage](#coc7tokencreationrollbuttonaverage)|✅|✅|❌|❌|❌|❌|
|[CoC7.TokenCreationRoll.ButtonRoll](#coc7tokencreationrollbuttonroll)|✅|✅|❌|❌|❌|❌|
|[CoC7.TokenCreationRoll.Prompt](#coc7tokencreationrollprompt)|✅|✅|❌|❌|❌|❌|
|[CoC7.TokenCreationRoll.Title](#coc7tokencreationrolltitle)|✅|✅|❌|❌|❌|❌|
|[SETTINGS.SceneDistanceNotCalcualtedNoError](#settingsscenedistancenotcalcualtednoerror)|✅|✅|❌|✅|❌|❌|
|[SETTINGS.SceneDistanceNotCalcualtedNoErrorHint](#settingsscenedistancenotcalcualtednoerrorhint)|✅|✅|❌|✅|❌|❌|
|Key|de|es|it|ja|zh-TW|
|:---|:---:|:---:|:---:|:---:|:---:|
|**Remaining**:|**1**|**1**|**5**|**10**|**12**|
|[CoC7.EraRegency](#coc7eraregency)|✅|✅|✅|✅|❌|
|[CoC7.EraRegencyPulp](#coc7eraregencypulp)|✅|✅|✅|✅|❌|
|[CoC7.ErrorTokenIncorrect](#coc7errortokenincorrect)|✅|✅|✅|❌|❌|
|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|❌|❌|❌|❌|❌|
|[CoC7.SanityLossType](#coc7sanitylosstype)|✅|✅|✅|❌|❌|
|[CoC7.System.Documentation](#coc7systemdocumentation)|✅|✅|✅|❌|❌|
|[CoC7.TokenCreationRoll.ButtonAverage](#coc7tokencreationrollbuttonaverage)|✅|✅|❌|❌|❌|
|[CoC7.TokenCreationRoll.ButtonRoll](#coc7tokencreationrollbuttonroll)|✅|✅|❌|❌|❌|
|[CoC7.TokenCreationRoll.Prompt](#coc7tokencreationrollprompt)|✅|✅|❌|❌|❌|
|[CoC7.TokenCreationRoll.Title](#coc7tokencreationrolltitle)|✅|✅|❌|❌|❌|
|[SETTINGS.SceneDistanceNotCalcualtedNoError](#settingsscenedistancenotcalcualtednoerror)|✅|✅|✅|❌|❌|
|[SETTINGS.SceneDistanceNotCalcualtedNoErrorHint](#settingsscenedistancenotcalcualtednoerrorhint)|✅|✅|✅|❌|❌|
##### CoC7.EraRegency
``` "CoC7.EraRegency": "Regency Cthulhu - Standard",```
##### CoC7.EraRegencyPulp
Expand Down
12 changes: 6 additions & 6 deletions docs/en/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ This last tab will includes all changes made to the character sheet.
An effect includes a list of changes. Each change needs to be addressed with the corresponding system path.
The available changes are :

- Characteristics:
- Characteristics:
- Strength:
- system.characteristics.str.value
- system.characteristics.str.bonusDice
Expand All @@ -72,11 +72,11 @@ The available changes are :
- system.characteristics.edu.bonusDice
- Attributes:
- Luck:
- system.characteristics.lck.value
- system.characteristics.lck.bonusDice
- system.attribs.lck.value
- system.attribs.lck.bonusDice
- Sanity:
- system.characteristics.san.value
- system.characteristics.san.bonusDice
- system.attribs.san.value
- system.attribs.san.bonusDice
- Movement Rate:
- system.attribs.mov.value
- Build:
Expand All @@ -96,4 +96,4 @@ The available changes are :
- system.skills.Charm.bonusDice
- Fighting (Brawl)
- system.skills.Fighting (Brawl).value
- system.skills.Fighting (Brawl).bonusDice
- system.skills.Fighting (Brawl).bonusDice
14 changes: 7 additions & 7 deletions docs/es/efectos.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ Los cambios disponibles son:
- system.characteristics.edu.bonusDice
- Atributos:
- Suerte:
- system.characteristics.lck.value
- system.characteristics.lck.bonusDice
- system.attribs.lck.value
- system.attribs.lck.bonusDice
- Cordura:
- system.characteristics.san.value
- system.characteristics.san.bonusDice
- system.attribs.san.value
- system.attribs.san.bonusDice
- Movimiento:
- system.attribs.mov.value
- Corpulencia:
Expand All @@ -94,6 +94,6 @@ Los cambios disponibles son:
- Encanto
- system.skills.Encanto.value
- system.skills.Encanto.bonusDice
- Combate (Pelea)
- system.skills.Combate (Pelea).value
- system.skills.Combate (Pelea).bonusDice
- Combatir (Pelea)
- system.skills.Combatir (Pelea).value
- system.skills.Combatir (Pelea).bonusDice
2 changes: 1 addition & 1 deletion generate-manuals.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const sources = {
file: 'hoja_de_atajos.md'
},
{
name: 'Creating your first investigator',
name: 'Creando tu primer investigador',
file: 'primer_investigador.md'
},
{
Expand Down
14 changes: 12 additions & 2 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@
"CoC7.EmptySkillList": "Ajouter une compétence en la déposant ici.",
"CoC7.EmptyItemList": "Ajouter un objet en le déposant ici.",
"CoC7.EmptyCharacterSkillList": "Faîtes glisser un générateur, une occupation ou une compétence ici.",
"CoC7.PersonalSpecialityPlaceholder": "autre(s) compétence(s) comme spécialités personnelles ou d'époque",
"CoC7.PersonalSpeciality": "Nombre de spécialités personnelles ou d'époque",
"CoC7.AdditionalSkills": "Compétences supplémentaires",
"CoC7.SkillSelectionWindow": "Sélectionner les compétences optionnelles",
Expand Down Expand Up @@ -1005,6 +1006,8 @@
"CoC7.Migrate.ErrorItem": "Échec de la migration du système CoC7 pour l'Objet {name}: {message}",
"CoC7.Migrate.ErrorActor": "Échec de la migration du système CoC7 pour le Personnage {name}: {message}",

"CoC7.System.Documentation": "Consulter le manuel du système",

"CoC7.Settings.CoreRules.Title": "Règles Optionnelles du Livre de Base",
"CoC7.Settings.Rules.Name": "Variantes/Règles optionnelles",
"CoC7.Settings.Rules.Label": "Configurer les variantes/règles optionnelles",
Expand Down Expand Up @@ -1186,7 +1189,9 @@
"SETTINGS.ChaseShowTokenMovementHint": "Afficher les mouvements sur la grille quand le token est déplacé vers le prochain lieu.",
"SETTINGS.UseContextMenus": "Utiliser les menus contextuels",
"SETTINGS.UseContextMenusHint": "[EXPERIMENTAL] Utiliser les menus contextuels pour les jets à la place des combinaisons de touches.",

"SETTINGS.SceneDistanceNotCalcualtedNoError": "Ne pas afficher les erreurs pour les distances",
"SETTINGS.SceneDistanceNotCalcualtedNoErrorHint": "Au début d'un combat à distance, en mode immersion, ne pas afficher les messages de calcul.",

"CoC7.getTheExample": "Copier l'Exemple",
"CoC7.Copied": "Texte de l'Exemple copié dans le presse-papier",

Expand Down Expand Up @@ -1289,5 +1294,10 @@
"CoC7.CoCIDFlag.error.documents-not-found": "Items inconnus dans le monde ou dans les compendiums pour les CoC IDs ({cocids}), langue \"{lang}\", et l'époque \"{era}\". Vérifiez l'époque du monde.",

"CoC7.CoCIDBatch.title": "Automate du System ID (CoC ID)",
"CoC7.CoCIDBatch.summary": "Le système CoC7 a ajouté le System ID (CoC ID). Cela permet d'identifier les items FoundryVTT, les compétences par exemple. Cette page vous permettra de positionner l'identifiant pour des '{type}' existant(e)s. Le System ID doit utiliser les traductions anglaises pour pouvoir supporter le portage dans d'autres langues."
"CoC7.CoCIDBatch.summary": "Le système CoC7 a ajouté le System ID (CoC ID). Cela permet d'identifier les items FoundryVTT, les compétences par exemple. Cette page vous permettra de positionner l'identifiant pour des '{type}' existant(e)s. Le System ID doit utiliser les traductions anglaises pour pouvoir supporter le portage dans d'autres langues.",

"CoC7.TokenCreationRoll.Title": "Aléatoire détecté",
"CoC7.TokenCreationRoll.Prompt": "Ce token a des caractéristiques ou compétences aléatoires.<br>Que souhaitez-vous faire ?",
"CoC7.TokenCreationRoll.ButtonRoll": "Jeter les dés pour toutes",
"CoC7.TokenCreationRoll.ButtonAverage": "Prendre les moyennes"
}
2 changes: 1 addition & 1 deletion lib/socketlib/src/socketlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class SocketlibSocket {

_sendRequest(handlerName, args, recipient) {
const message = {handlerName, args, recipient};
message.id = randomID();
message.id = foundry.utils.randomID();
message.type = MESSAGE_TYPES.REQUEST;
const promise = new Promise((resolve, reject) => this.pendingRequests.set(message.id, {handlerName, resolve, reject, recipient}));
game.socket.emit(this.socketName, message);
Expand Down
35 changes: 23 additions & 12 deletions module/active-effect.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* global ActiveEffect, game */
/* global ActiveEffect, foundry, game */
import { COC7 } from './config.js'

export default class CoC7ActiveEffect extends ActiveEffect {
apply (actor, change) {
if (change.key === 'system.attribs.armor.value') {
Expand Down Expand Up @@ -62,17 +64,27 @@ export default class CoC7ActiveEffect extends ActiveEffect {
return duration
}

static filterActiveEffects (effect, conditionName) {
if (!foundry.utils.isNewerVersion(game.version, '11')) {
// FoundryVTT v10
return effect.flags.core?.statusId === conditionName
}
return effect.statuses.has(conditionName)
}

static getStatusKey (effect) {
let options = []
if (!foundry.utils.isNewerVersion(game.version, '11')) {
// FoundryVTT v10
options = [effect.getFlag('core', 'statusId')]
} else if (effect.statuses.size > 0) {
options = [...effect.statuses.values()]
}
return options.find(v => Object.prototype.hasOwnProperty.call(COC7.status, v))
}

get isStatus () {
const statusId = this.getFlag('core', 'statusId')
return [
'tempoInsane',
'indefInsane',
'criticalWounds',
'dying',
'dead',
'unconscious',
'prone'
].includes(statusId)
return typeof CoC7ActiveEffect.getStatusKey(this) === 'string'
}

static prepareActiveEffectCategories (effects, { status = true } = {}) {
Expand Down Expand Up @@ -110,7 +122,6 @@ export default class CoC7ActiveEffect extends ActiveEffect {
}
// Iterate over active effects, classifying them into categories
for (const e of effects) {
e._getSourceName() // Trigger a lookup for the source name
if (e.isSuppressed) categories.suppressed.effects.push(e)
else if (e.isStatus) categories.status.effects.push(e)
else if (e.disabled) categories.inactive.effects.push(e)
Expand Down
Loading

0 comments on commit b7439de

Please sign in to comment.