Skip to content

Commit

Permalink
Merge pull request #1645 from Miskatonic-Investigative-Society/develop
Browse files Browse the repository at this point in the history
7.5
  • Loading branch information
snap01 authored Dec 1, 2024
2 parents 80ca16e + 86ddada commit f12185b
Showing 13 changed files with 112 additions and 81 deletions.
42 changes: 28 additions & 14 deletions .github/ABANDONED.md
Original file line number Diff line number Diff line change
@@ -2,23 +2,23 @@

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`.

[cn.json (450 untranslated strings)](#cnjson)
[cn.json (452 untranslated strings)](#cnjson)

[cs.json (635 untranslated strings)](#csjson)
[cs.json (637 untranslated strings)](#csjson)

[ko.json (232 untranslated strings)](#kojson)
[ko.json (234 untranslated strings)](#kojson)

[pt-BR.json (180 untranslated strings)](#ptbrjson)
[pt-BR.json (182 untranslated strings)](#ptbrjson)

[ru.json (102 untranslated strings)](#rujson)
[ru.json (104 untranslated strings)](#rujson)

[sv.json (418 untranslated strings)](#svjson)
[sv.json (420 untranslated strings)](#svjson)

[zh-TW.json (79 untranslated strings)](#zhtwjson)
[zh-TW.json (81 untranslated strings)](#zhtwjson)


## cn.json
450 untranslated strings
452 untranslated strings
```
"CoC7.ActorIsTokenHint": "Actor is a token",
"CoC7.ActorDataLinked": "Actor data are linked",
@@ -216,6 +216,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.",
"CoC7.AddBonusDie": "Add bonus die",
"CoC7.RemoveBonusDie": "Remove bonus die",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.DecreaseMovementAction": "Decrease movement action",
"CoC7.IncreaseMovementAction": "Increase movement action",
"CoC7.CautiousApproach": "Take cautious approach",
@@ -472,7 +474,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## cs.json
635 untranslated strings
637 untranslated strings
```
"CoC7.Entities.Character": "Character",
"CoC7.Entities.Container": "Container",
@@ -720,6 +722,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.",
"CoC7.AddBonusDie": "Add bonus die",
"CoC7.RemoveBonusDie": "Remove bonus die",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.DecreaseMovementAction": "Decrease movement action",
"CoC7.IncreaseMovementAction": "Increase movement action",
"CoC7.CautiousApproach": "Take cautious approach",
@@ -1111,7 +1115,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## ko.json
232 untranslated strings
234 untranslated strings
```
"CoC7.CustomSpecialisationLabel": "Custom label - {specialisation}",
"CoC7.CastHidden": "Cast Hidden",
@@ -1186,6 +1190,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.SanityLossType": "Type",
"CoC7.SANLossPass": "pass",
"CoC7.SANLossFail": "fail",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.ErrorTokenIncorrect": "Unable to find selected token",
"CoC7.RemoveParticipant": "Remove participant",
"CoC7.RemoveParticipantHint": "Participant will be completely removed from the chase",
@@ -1347,7 +1353,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## pt-BR.json
180 untranslated strings
182 untranslated strings
```
"CoC7.CastHidden": "Cast Hidden",
"CoC7.EraRegency": "Regency Cthulhu - Standard",
@@ -1406,6 +1412,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.SanityLossType": "Type",
"CoC7.SANLossPass": "pass",
"CoC7.SANLossFail": "fail",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.ErrorTokenIncorrect": "Unable to find selected token",
"CoC7.PersonalSpecialityPlaceholder": "other skill(s) as personal or era specialties",
"CoC7.InfoSkillAddedAtBase": "This skill {name} has been added at {percent}%",
@@ -1531,7 +1539,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## ru.json
102 untranslated strings
104 untranslated strings
```
"CoC7.CastHidden": "Cast Hidden",
"CoC7.EraReignOfTerror": "Reign Of Terror",
@@ -1568,6 +1576,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.LocationNotEmpty": "You can't remove a location with an actor",
"CoC7.LocationInit": "You can't remove a starting location",
"CoC7.SomethingInTheWay": "There is something in the way",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.allActors": "All Actors",
"CoC7.restTargets": "Rest Targets",
"CoC7.startRest": "Start Rest",
@@ -1637,7 +1647,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## sv.json
418 untranslated strings
420 untranslated strings
```
"CoC7.ActorIsTokenHint": "Actor is a token",
"CoC7.ActorDataLinked": "Actor data are linked",
@@ -1807,6 +1817,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.",
"CoC7.AddBonusDie": "Add bonus die",
"CoC7.RemoveBonusDie": "Remove bonus die",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.DecreaseMovementAction": "Decrease movement action",
"CoC7.IncreaseMovementAction": "Increase movement action",
"CoC7.CautiousApproach": "Take cautious approach",
@@ -2059,7 +2071,7 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"TYPES.RegionBehavior.coc7ClickableEvents": "Clickable Events"
```
## zh-TW.json
79 untranslated strings
81 untranslated strings
```
"CoC7.CastHidden": "Cast Hidden",
"CoC7.EraRegency": "Regency Cthulhu - Standard",
@@ -2089,6 +2101,8 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry
"CoC7.SanityLossType": "Type",
"CoC7.SANLossPass": "pass",
"CoC7.SANLossFail": "fail",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.ErrorTokenIncorrect": "Unable to find selected token",
"CoC7.PersonalSpecialityPlaceholder": "other skill(s) as personal or era specialties",
"CoC7.InfoSkillAddedAtBase": "This skill {name} has been added at {percent}%",
10 changes: 10 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,16 @@ Happy gaming !

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

## Version 7.5

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

- Fix CoC ID not working if using fall back translations
- Fix manually adding sanity loss / immunity reasons
- Modify Roll to indicated active dice and success level
- Remove bonus/penalty slider from ranged combat chat message replace with buttons
- Update to French localization, thanks to @vonv #1634

## Version 7.4

When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01.
32 changes: 19 additions & 13 deletions .github/TRANSLATIONS.md
Original file line number Diff line number Diff line change
@@ -4,25 +4,25 @@ Thank you for being interested in making Call of Cthulhu 7th Edition for Foundry

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

[cn.json (450 untranslated strings)](./ABANDONED.md#cnjson)
[cn.json (452 untranslated strings)](./ABANDONED.md#cnjson)

[cs.json (635 untranslated strings)](./ABANDONED.md#csjson)
[cs.json (637 untranslated strings)](./ABANDONED.md#csjson)

[ko.json (232 untranslated strings)](./ABANDONED.md#kojson)
[ko.json (234 untranslated strings)](./ABANDONED.md#kojson)

[pt-BR.json (180 untranslated strings)](./ABANDONED.md#ptbrjson)
[pt-BR.json (182 untranslated strings)](./ABANDONED.md#ptbrjson)

[ru.json (102 untranslated strings)](./ABANDONED.md#rujson)
[ru.json (104 untranslated strings)](./ABANDONED.md#rujson)

[sv.json (418 untranslated strings)](./ABANDONED.md#svjson)
[sv.json (420 untranslated strings)](./ABANDONED.md#svjson)

[zh-TW.json (79 untranslated strings)](./ABANDONED.md#zhtwjson)
[zh-TW.json (81 untranslated strings)](./ABANDONED.md#zhtwjson)



|Key|de|es|fr|it|ja|pl|uk|
|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|**Remaining**:|**5**|**17**|**5**|**22**|**1**|**5**|**5**|
|**Remaining**:|**7**|**19**|**2**|**24**|**3**|**7**|**7**|
|[CoC7.ActorCoCIDItemsActorDirectory](#coc7actorcociditemsactordirectory)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.ActorCoCIDItemsActorSheets](#coc7actorcociditemsactorsheets)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.ActorCoCIDItemsBest](#coc7actorcociditemsbest)|✅|❌|✅|❌|✅|✅|✅|
@@ -34,18 +34,20 @@ The following translations have more than 50 untranslated strings [are you able
|[CoC7.ActorCoCIDItemsUpdate](#coc7actorcociditemsupdate)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.ActorCoCIDItemsWarning](#coc7actorcociditemswarning)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.ActorCoCIDItemsWhich](#coc7actorcociditemswhich)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.AdditionalBonusDie](#coc7additionalbonusdie)|❌|❌|❌|❌|❌|❌|❌|
|[CoC7.AdditionalPenaltyDie](#coc7additionalpenaltydie)|❌|❌|❌|❌|❌|❌|❌|
|[CoC7.CastHidden](#coc7casthidden)|✅|✅|✅|❌|✅|✅|✅|
|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|❌|❌|✅|❌|❌|
|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|❌|❌|✅|❌|❌|
|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|❌|❌|✅|❌|❌|
|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|❌|❌|✅|❌|❌|
|[CoC7.ClickableEvents.LeftClick.Title](#coc7clickableeventsleftclicktitle)|❌|❌|✅|❌|✅|❌|❌|
|[CoC7.ClickableEvents.MouseOver.Hint](#coc7clickableeventsmouseoverhint)|❌|❌|✅|❌|✅|❌|❌|
|[CoC7.ClickableEvents.MouseOver.Title](#coc7clickableeventsmouseovertitle)|❌|❌|✅|❌|✅|❌|❌|
|[CoC7.ClickableEvents.RightClick.Title](#coc7clickableeventsrightclicktitle)|❌|❌|✅|❌|✅|❌|❌|
|[CoC7.PauseName](#coc7pausename)|✅|❌|✅|❌|✅|✅|✅|
|[CoC7.PersonalSpecialityPlaceholder](#coc7personalspecialityplaceholder)|✅|✅|✅|✅|❌|✅|✅|
|[CoC7.SANLossFail](#coc7sanlossfail)|✅|✅|✅|❌|✅|✅|✅|
|[CoC7.SANLossPass](#coc7sanlosspass)|✅|✅|✅|❌|✅|✅|✅|
|[SETTINGS.allowMythosHardenedHint](#settingsallowmythoshardenedhint)|✅|✅|✅|❌|✅|✅|✅|
|[SETTINGS.allowMythosHardenedTitle](#settingsallowmythoshardenedtitle)|✅|✅|✅|❌|✅|✅|✅|
|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|❌|❌|✅|❌|❌|
|[TYPES.RegionBehavior.coc7ClickableEvents](#typesregionbehaviorcoc7clickableevents)|❌|❌|✅|❌|✅|❌|❌|
##### CoC7.ActorCoCIDItemsActorDirectory
``` "CoC7.ActorCoCIDItemsActorDirectory": "Update all Actors in directory",```
##### CoC7.ActorCoCIDItemsActorSheets
@@ -68,6 +70,10 @@ The following translations have more than 50 untranslated strings [are you able
``` "CoC7.ActorCoCIDItemsWarning": "This action can not be undone, please backup your world before updating your Actors",```
##### CoC7.ActorCoCIDItemsWhich
``` "CoC7.ActorCoCIDItemsWhich": "Check Item's CoC ID in active compendiums, world compendiums, and Items directory replacing the Actor's Items with the best choice based on these rules",```
##### CoC7.AdditionalBonusDie
``` "CoC7.AdditionalBonusDie": "Additional Bonus Die",```
##### CoC7.AdditionalPenaltyDie
``` "CoC7.AdditionalPenaltyDie": "Additional Penalty Die",```
##### CoC7.CastHidden
``` "CoC7.CastHidden": "Cast Hidden",```
##### CoC7.ClickableEvents.LeftClick.Title
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
@@ -725,6 +725,8 @@
"CoC7.OpenObstacleResolutionCard": "Start obstacle resolution flow card.",
"CoC7.AddBonusDie": "Add bonus die",
"CoC7.RemoveBonusDie": "Remove bonus die",
"CoC7.AdditionalBonusDie": "Additional Bonus Die",
"CoC7.AdditionalPenaltyDie": "Additional Penalty Die",
"CoC7.DecreaseMovementAction": "Decrease movement action",
"CoC7.IncreaseMovementAction": "Increase movement action",
"CoC7.CautiousApproach": "Take cautious approach",
8 changes: 7 additions & 1 deletion lang/fr.json
Original file line number Diff line number Diff line change
@@ -1364,5 +1364,11 @@
"CoC7.ErrorNoActorPermission": "Vous n'êtes pes le Proriétaire de cet Acteur",
"CoC7.ErrorCombinedRollsRequireSingleActor": "Vous ne pouvez pas avoir plus d'un acteur dans un jet combiné",
"CoC7.ErrorOpposedRollsLimitedToTwoActors": "Une carte de jet opposé demandes deux acteurs",
"CoC7.PauseName": "Time Stop"
"CoC7.PauseName": "Time Stop",

"CoC7.ClickableEvents.MouseOver.Title": "Permission de cliquer",
"CoC7.ClickableEvents.MouseOver.Hint": "Renvoie un booléen si le click est permis et affiche le curseur de la souris",
"CoC7.ClickableEvents.LeftClick.Title": "Script sur Click Gauche",
"CoC7.ClickableEvents.RightClick.Title": "Script sur Click Droit",
"TYPES.RegionBehavior.coc7ClickableEvents": "Evénements clicquables"
}
3 changes: 2 additions & 1 deletion module/apps/coc-id-batch.js
Original file line number Diff line number Diff line change
@@ -213,7 +213,8 @@ export class CoCIDBatch extends FormApplication {
for (const item of items) {
foundKeys[item.name] = item.flags.CoC7.cocidFlag.id
}
for (const key in foundry.utils.flattenObject(game.i18n.translations.CoC7.CoCIDFlag.keys ?? {})) {
const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}))
for (const key in CoCIDKeys) {
foundKeys[game.i18n.format('CoC7.CoCIDFlag.keys.' + key)] = key
}
for (const name in missingNames) {
2 changes: 1 addition & 1 deletion module/apps/coc-id-editor.js
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ export class CoCIDEditor extends FormApplication {
}
sheetData.eras.sort(CoC7Utilities.sortByNameKey)

const CoCIDKeys = foundry.utils.flattenObject(game.i18n.translations.CoC7.CoCIDFlag.keys ?? {})
const CoCIDKeys = Object.assign(foundry.utils.flattenObject(game.i18n._fallback.CoC7?.CoCIDFlag?.keys ?? {}), foundry.utils.flattenObject(game.i18n.translations.CoC7?.CoCIDFlag?.keys ?? {}))
const prefix = new RegExp('^' + CoC7Utilities.quoteRegExp(sheetData.idPrefix))
sheetData.existingKeys = Object.keys(CoCIDKeys).reduce((obj, k) => {
if (k.match(prefix)) {
2 changes: 1 addition & 1 deletion module/apps/create-mythos-encounters.js
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ export class CoC7CreateMythosEncounter extends FormApplication {
sanityLossEvents.sort(function (left, right) {
return left.type.localeCompare(right.type)
})
this.object.actor.update({ 'data.sanityLossEvents': sanityLossEvents })
this.object.actor.update({ 'system.sanityLossEvents': sanityLossEvents })
}
this.close()
}
35 changes: 11 additions & 24 deletions module/chat/rangecombat.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ export class CoC7RangeInitiator {
this.cover = false
this.surprised = false
this.autoSuccess = false
this.diceModifier = 0
this.messageId = null
this.targetCard = null
this.rolled = false
@@ -23,6 +22,10 @@ export class CoC7RangeInitiator {
this.fullAuto = false
this.tokenKey = null
this.aimed = false
this.bonusDieA = false
this.bonusDieB = false
this.penaltyDieA = false
this.penaltyDieB = false
this.totalBulletsFired = 0
this._targets = []
for (const t of [...game.user.targets]) {
@@ -318,7 +321,7 @@ export class CoC7RangeInitiator {
if (t.longRange) damage = this.weapon.system.range.long.damage
if (t.extremeRange) damage = this.weapon.system.range.extreme.damage
}
let modifier = parseInt(this.diceModifier, 10) + parseInt(target.modifier, 10)
let modifier = parseInt(target.modifier, 10)
let difficulty
this.weapon.system.properties.shotgun
? (difficulty = 1)
@@ -328,6 +331,10 @@ export class CoC7RangeInitiator {
if (this.reload) modifier--
if (this.multipleShots && !this.fullAuto) modifier--
if (this.fullAuto) modifier -= this.currentShotRank - 1
if (this.bonusDieA) modifier++
if (this.bonusDieB) modifier++
if (this.penaltyDieA) modifier--
if (this.penaltyDieB) modifier--
this._calculatedModifier = modifier
if (modifier < -2) {
const excess = Math.abs(modifier + 2)
@@ -436,10 +443,6 @@ export class CoC7RangeInitiator {
return 'systems/CoC7/templates/chat/combat/range-initiator.html'
}

get diceModifierDisplay () {
return Math.max(-2, Math.min(2, parseInt(this.diceModifier, 10)))
}

async createChatCard () {
this.calcTargetsDifficulty()
const html = await renderTemplate(this.template, this)
@@ -505,23 +508,7 @@ export class CoC7RangeInitiator {
this.burst = !this.burst
} else {
this[flag] = !this[flag]
}
switch (flag) {
case 'aiming':
if (this.currentShotRank === 1) {
this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? 1 : -1)
}
break
case 'multipleShots':
if (!this.fullAuto) {
this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? -1 : 1)
}
break
case 'fullAuto':
if (!this.fullAuto) {
this.diceModifier = parseInt(this.diceModifier, 10) + (this[flag] ? -(this.currentShotRank - 1) : (this.currentShotRank - 1))
}
break
console.log(flag, this[flag])
}
}

@@ -1073,7 +1060,7 @@ export class CoC7RangeTarget {
this.big = false
} else this.small = true
} else this[flag] = !this[flag]
if (flag === 'fast' && this.fast && !this.isFast) {
if (this.actor && flag === 'fast' && this.fast && !this.isFast) {
ui.notifications.warn(
game.i18n.format('CoC7.WarnFastTargetWithWrongMOV', {
mov: this.actor.mov
Loading

0 comments on commit f12185b

Please sign in to comment.