From bb5de747264b5eca498f173ebe687330f806ee28 Mon Sep 17 00:00:00 2001 From: mjeffw Date: Sat, 2 Nov 2024 15:37:18 -0400 Subject: [PATCH 01/18] Added plans document. --- plans.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plans.md diff --git a/plans.md b/plans.md new file mode 100644 index 00000000..12ef6c9e --- /dev/null +++ b/plans.md @@ -0,0 +1,31 @@ +## Metric Conversion + +For lengths, GCS can display feet & inches (5'3"), feet, yards, miles, centimeters, meters, and kilometers. + +For weights, pounds, onces, tons, kilograms and grams. There's also two variant suffixes that can be selected for both pounds ("lb", "#") and tones ("tn", "t"). + +``` +| Imperial | Game Metric | Real Metric | +| 1 inch (in.) | 2.5 cm | 2.54 cm | +| 1 foot (ft.) | 30 cm | 30.48 cm | +| 1 yard (yd.) | 1 meter | 0.914 meters | +| 1 mile (mi.) | 1.5 km | 1.609 km | +| 1 pound (lb.) | 0.5 kg | 0.454 kg | +| 1 ton | 1 metric ton | 0.907 metric tons | +| 1 gallon (gal.) | 4 liters | 3.785 liters | +| 1 quart (qt.) | 1 liter | 0.946 liters | +| 1 ounce (oz.) | 30 grams | 28.349 grams | +| 1 cubic inch (ci) | 16 cubic cm | 1 6.387 cu. cm | +| 1 cubic yard (cy) | 0.75 cubic m | 0.765 cubic m | +``` + +Temperature: When dealing with changes in temperature, one Fahrenheit degree is 5/9 the size of a degree Celsius. So a change of 45°F is equal to a change of 25°C. To convert actual thermometer readings, subtract 32 from the Fahrenheit temperature and multiply the result by 5/9. + +Weight conversion is as you noted: 1 lb = 0.5 kg. Length as well: 1 yd = 1 m. + +For consistency, all metric lengths are converted to meters, then to yards, rather than the variations at different lengths that the GURPS rules suggest. + +Same for weights: all metric weights are converted to kilograms, then to pounds. +(these are for when you enter them into a field...) + +https://github.com/richardwilkes/gcs/tree/master/model/fxp this directory has the various length & width code (fxp stands for fixed-point, since GCS tracks most everything using fixed-point values so that we get consistent output). From 09dcc1d74fe16d3b8e45ee8f408883fa1f4a366d Mon Sep 17 00:00:00 2001 From: mjeffw Date: Sat, 9 Nov 2024 11:13:22 -0500 Subject: [PATCH 02/18] update plans --- plans.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plans.md diff --git a/plans.md b/plans.md new file mode 100644 index 00000000..12ef6c9e --- /dev/null +++ b/plans.md @@ -0,0 +1,31 @@ +## Metric Conversion + +For lengths, GCS can display feet & inches (5'3"), feet, yards, miles, centimeters, meters, and kilometers. + +For weights, pounds, onces, tons, kilograms and grams. There's also two variant suffixes that can be selected for both pounds ("lb", "#") and tones ("tn", "t"). + +``` +| Imperial | Game Metric | Real Metric | +| 1 inch (in.) | 2.5 cm | 2.54 cm | +| 1 foot (ft.) | 30 cm | 30.48 cm | +| 1 yard (yd.) | 1 meter | 0.914 meters | +| 1 mile (mi.) | 1.5 km | 1.609 km | +| 1 pound (lb.) | 0.5 kg | 0.454 kg | +| 1 ton | 1 metric ton | 0.907 metric tons | +| 1 gallon (gal.) | 4 liters | 3.785 liters | +| 1 quart (qt.) | 1 liter | 0.946 liters | +| 1 ounce (oz.) | 30 grams | 28.349 grams | +| 1 cubic inch (ci) | 16 cubic cm | 1 6.387 cu. cm | +| 1 cubic yard (cy) | 0.75 cubic m | 0.765 cubic m | +``` + +Temperature: When dealing with changes in temperature, one Fahrenheit degree is 5/9 the size of a degree Celsius. So a change of 45°F is equal to a change of 25°C. To convert actual thermometer readings, subtract 32 from the Fahrenheit temperature and multiply the result by 5/9. + +Weight conversion is as you noted: 1 lb = 0.5 kg. Length as well: 1 yd = 1 m. + +For consistency, all metric lengths are converted to meters, then to yards, rather than the variations at different lengths that the GURPS rules suggest. + +Same for weights: all metric weights are converted to kilograms, then to pounds. +(these are for when you enter them into a field...) + +https://github.com/richardwilkes/gcs/tree/master/model/fxp this directory has the various length & width code (fxp stands for fixed-point, since GCS tracks most everything using fixed-point values so that we get consistent output). From e87ea523789f41341936d721af2c8eca9eb3ce89 Mon Sep 17 00:00:00 2001 From: mjeffw Date: Sun, 10 Nov 2024 08:51:56 +0100 Subject: [PATCH 03/18] Bugfix: Errors occurring when users drop damage onto mooks/NPCs #2024 --- module/actor/actor.js | 51 ++++++++++++++++++++++++--------- module/effects/active-effect.js | 20 ++++++++++--- module/effects/effects.js | 2 +- module/token.js | 5 ++-- 4 files changed, 58 insertions(+), 20 deletions(-) diff --git a/module/actor/actor.js b/module/actor/actor.js index ed672a26..5185dcec 100644 --- a/module/actor/actor.js +++ b/module/actor/actor.js @@ -259,7 +259,8 @@ export class GurpsActor extends Actor { if (!this.system.equippedblock) this.system.equippedblock = this.getEquippedBlock() // Catch for older actors that may not have these values set. if (!this.system.currentmove) this.system.currentmove = parseInt(this.system.basicmove.value.toString()) - if (!this.system.currentdodge && this.system.dodge.value) this.system.currentdodge = parseInt(this.system.dodge.value.toString()) + if (!this.system.currentdodge && this.system.dodge.value) + this.system.currentdodge = parseInt(this.system.dodge.value.toString()) if (!this.system.currentflight) this.system.currentflight = parseFloat(this.system.basicspeed.value.toString()) * 2 // Look for Defense bonuses. @@ -612,7 +613,7 @@ export class GurpsActor extends Actor { let inCombat = false try { inCombat = !!game.combat?.combatants.filter(c => c.actorId == this.id) - } catch (err) { } // During game startup, an exception is being thrown trying to access 'game.combat' + } catch (err) {} // During game startup, an exception is being thrown trying to access 'game.combat' let updateMove = game.settings.get(settings.SYSTEM_NAME, settings.SETTING_MANEUVER_UPDATES_MOVE) && inCombat let maneuver = this._getMoveAdjustedForManeuver(move, threshold) @@ -639,9 +640,9 @@ export class GurpsActor extends Actor { return !!adjustment ? adjustment : { - move: Math.max(1, Math.floor(move * threshold)), - text: i18n('GURPS.moveFull'), - } + move: Math.max(1, Math.floor(move * threshold)), + text: i18n('GURPS.moveFull'), + } } _adjustMove(move, threshold, value, reason) { @@ -711,9 +712,9 @@ export class GurpsActor extends Actor { return !!adjustment ? adjustment : { - move: Math.max(1, Math.floor(move * threshold)), - text: i18n('GURPS.moveFull'), - } + move: Math.max(1, Math.floor(move * threshold)), + text: i18n('GURPS.moveFull'), + } } _calculateRangedRanges() { @@ -880,6 +881,27 @@ export class GurpsActor extends Actor { await this.update(data, ctx) } + async toggleStatusEffect(statusId, { active, overlay = false } = {}) { + const status = CONFIG.statusEffects.find(e => e.id === statusId) + if (!status) throw new Error(`Invalid status ID "${statusId}" provided to Actor#toggleStatusEffect`) + + if (foundry.utils.getProperty(status, 'flags.gurps.effect.type') === 'posture') { + let existing = this.getAllActivePostureEffects() + existing = existing.filter(e => e.statuses.find(s => s !== statusId)) + + for (const it of existing) { + console.log(it) + await super.toggleStatusEffect(it.statuses.first()) + } + } + + await super.toggleStatusEffect(statusId, { active, overlay }) + } + + getAllActivePostureEffects() { + return this.effects.filter(e => e.getFlag('gurps', 'effect.type') === 'posture') + } + /** * This method is called when "system.conditions.maneuver" changes on the actor (via the update method) * @param {string} maneuverText @@ -894,7 +916,7 @@ export class GurpsActor extends Actor { if (tokens) for (const t of tokens) { let id = changeData === GURPS.StatusEffectStanding ? this.system.conditions.posture : changeData - await t.toggleEffect(GURPS.StatusEffect.lookup(id)) + await this.toggleStatusEffect(id) } } @@ -1206,8 +1228,10 @@ export class GurpsActor extends Actor { // add a new entry at the end. let empty = Object.values(moveData).length === 0 GURPS.put(move, { - mode: mode, basic: basic ?? this.system.basicmove.value * 2, - enhanced: enhanced, default: empty || isDefault + mode: mode, + basic: basic ?? this.system.basicmove.value * 2, + enhanced: enhanced, + default: empty || isDefault, }) // remove existing entries @@ -2658,8 +2682,9 @@ export class GurpsActor extends Actor { // Exclude than rewrite the hitlocations on Actor await this.internalUpdate({ 'system.-=hitlocations': null }) await this.update({ 'system.hitlocations': actorLocations }) - const msg = `${this.name}: DR ${drFormula} applied to ${affectedLocations.length > 0 ? affectedLocations.join(', ') : 'all locations' - }` + const msg = `${this.name}: DR ${drFormula} applied to ${ + affectedLocations.length > 0 ? affectedLocations.join(', ') : 'all locations' + }` return { changed, msg, info: msg } } } diff --git a/module/effects/active-effect.js b/module/effects/active-effect.js index 41f5647b..0cceb6f2 100644 --- a/module/effects/active-effect.js +++ b/module/effects/active-effect.js @@ -51,10 +51,9 @@ export default class GurpsActiveEffect extends ActiveEffect { * @param {*} _options * @param {*} _user */ - static async _apply(actor, change, _options, _user) { + static _apply(actor, change, _options, _user) { if (change.key === 'system.conditions.maneuver') actor.replaceManeuver(change.value) else if (change.key === 'system.conditions.posture') actor.replacePosture(change) - // else if (change.key === 'chat') change.effect.chat(actor, JSON.parse(change.value)) else console.debug(change) } @@ -76,7 +75,7 @@ export default class GurpsActiveEffect extends ActiveEffect { * @param {*} _userId */ static _delete(_effect, _data, _userId) { - console.debug('delete ' + _effect) + // console.debug('delete ' + _effect) } /** @@ -117,8 +116,21 @@ export default class GurpsActiveEffect extends ActiveEffect { this.context = context this.chatmessages = [] + } + + /** @inheritDoc */ + _onCreate(data, options, userId) { + super._onCreate(data, options, userId) + + if (game.users.get(userId).isSelf) { + if (!this.getFlag('gurps', 'duration')) this.setFlag('gurps', 'duration', { delaySeconds: null }) + } + } - if (!this.getFlag('gurps', 'duration')) this.setFlag('gurps', 'duration', { delaySeconds: null }) + async _preCreate(data, options, user) { + if (user.isSelf) { + console.log('preCreate', data, options, user) + } } get endCondition() { diff --git a/module/effects/effects.js b/module/effects/effects.js index 32b911c9..cd228df3 100644 --- a/module/effects/effects.js +++ b/module/effects/effects.js @@ -50,7 +50,7 @@ export class StatusEffect { }) Hooks.on('createActiveEffect', args => { - console.log(args) + // console.log(args) }) } diff --git a/module/token.js b/module/token.js index 6af1c2f5..5234e577 100644 --- a/module/token.js +++ b/module/token.js @@ -56,7 +56,7 @@ export default class GurpsToken extends Token { if (effects && effects.length > 0) { // restore the original token effects in case we've changed them // @ts-ignore - effects.forEach(it => (it.icon = it.getFlag('gurps', 'icon'))) + effects.forEach(it => (it.img = it.getFlag('gurps', 'icon'))) // GM and Owner always see the exact maneuver.. Otherwise: if (!game.user?.isGM && !this.isOwner) { @@ -97,6 +97,7 @@ export default class GurpsToken extends Token { } /** + * Deprecated -- in favor of Actor.toggleStatusEffect * @override * @param {*} effect * @param {*} options @@ -124,7 +125,7 @@ export default class GurpsToken extends Token { } isPostureEffect(effect) { - return effect.img && foundry.utils.getProperty(effect, 'flags.gurps.effect.type') === 'posture' + return effect?.img && foundry.utils.getProperty(effect, 'flags.gurps.effect.type') === 'posture' } async setEffectActive(name, active) { From bd20163d6e76892d5805bf603df0b78c3ac1feb1 Mon Sep 17 00:00:00 2001 From: mjeffw Date: Tue, 19 Nov 2024 23:47:44 +0100 Subject: [PATCH 04/18] Bugfix: Large fonts prevent Tabbed Sheet users from seeing the Skills tab. --- changelog.md | 4 +++- lang/en.json | 2 +- styles/simple.css | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 541184d6..22704557 100644 --- a/changelog.md +++ b/changelog.md @@ -2,7 +2,9 @@ Release 0.17.16 -- Feature: Multiple actor import. Import multiple GCS and GCA files with one command. +- Feature: Multiple actor import. Import multiple GCS and GCA files with one command. #1994 +- Bugfix: Errors occurring when users drop damage onto mooks/NPCs #2024 +- Bugfix: Large fonts prevent Tabbed Sheet users from seeing the Skills tab. Release 0.17.15 10/31/2024 diff --git a/lang/en.json b/lang/en.json index 597b41b1..8b1ff8ca 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1008,7 +1008,7 @@ "GURPS.addSpell": "Add a Spell", "GURPS.advantage": "Advantage", "GURPS.advantages": "Advantages", - "GURPS.advantagesTab": "Advantages and Disadvantages", + "GURPS.advantagesTab": "Traits", "GURPS.aim": "Aim", "GURPS.allDamage": "ALL DAMAGE", "GURPS.allOutDefense": "All-Out Defense", diff --git a/styles/simple.css b/styles/simple.css index 69129ba7..4f8b1284 100755 --- a/styles/simple.css +++ b/styles/simple.css @@ -2209,7 +2209,7 @@ div#other { .gurps-sheet-tabs { display: block; font-size: 110%; - height: 32px; + /* height: 32px; */ border-bottom: 1px solid #333; flex-grow: 0; } From 28b26f056044e737b33c1dc70e529d070eb27a1a Mon Sep 17 00:00:00 2001 From: mjeffw Date: Wed, 20 Nov 2024 01:53:42 +0100 Subject: [PATCH 05/18] start on refactoring language files --- lang/de.json | 32 +- lang/en.json | 40 +- lang/fr.json | 40 +- lang/pt_br.json | 41 +- lang/ru.json | 37 +- lib/change-log.js | 2 +- module/gurps.js | 17 +- templates/actor/actor-tab-sheet.hbs | 2 +- templates/actor/npc-input.hbs | 4 +- templates/actor/npc-sheet-ci.hbs | 4 +- templates/actor/sections/footer.hbs | 2 +- templates/actor/sections/identity.hbs | 8 +- templates/actor/sections/miscellaneous.hbs | 8 +- templates/actor/sections/portrait.hbs | 2 +- templates/changelog.html | 4 +- templates/inventory-sheet.html | 36 +- utils/diff-en-de.txt | 276 ----------- utils/diff-en-pt_br.txt | 106 ---- utils/diff-en-ru.txt | 540 --------------------- 19 files changed, 164 insertions(+), 1037 deletions(-) delete mode 100644 utils/diff-en-de.txt delete mode 100644 utils/diff-en-pt_br.txt delete mode 100644 utils/diff-en-ru.txt diff --git a/lang/de.json b/lang/de.json index 76577c67..3bd8899d 100644 --- a/lang/de.json +++ b/lang/de.json @@ -1,19 +1,29 @@ { "__NOTE TO TRANSLATOR__": "If a given text is the same as the English (en.json), there is no need to include it here. It will fallback to en.json.", - "GURPS.changelog": "LIESMICH", - "GURPS.DontShowAgain": "Zeige LIESMICH nicht noch einmal", + "gurps": { + "changelog": { + "readme": "LIESMICH", + "dontShowAgain": "Zeige LIESMICH nicht noch einmal" + }, + "sheet": { + "personal": { + "tab": "Persönlich", + "portrait": "Portrait", + "identity": "Identität", + "name": "Name", + "player": "Spieler", + "title": "Titel", + "miscellaneous": "Sonstiges", + "created": "Erstellt", + "modified": "Modifiziert", + "options": "Optionen" + } + } + }, "__Char Sheet__": "=========", - "GURPS.personalTab": "Persönlich", "GURPS.resourcesModsTab": "Ressourcen und Modifikatoren", "__Character Sheet Identity__": "=========", - "GURPS.identity": "Identität", - "GURPS.identityPlayer": "Spieler", - "GURPS.identityTitle": "Titel", "__Character Sheet Miscellaneous__": "=========", - "GURPS.miscellaneous": "Sonstiges", - "GURPS.miscellaneousCreated": "Erstellt", - "GURPS.miscellaneousModified": "Modifiziert", - "GURPS.miscellaneousOptions": "Optionen", "__Character Description__": "=========", "GURPS.description": "Beschreibung", "GURPS.descriptionAge": "Alter", @@ -944,4 +954,4 @@ "GURPS.effectModNoTokenSelected": "Kein Token ausgewählt", "GURPS.settingActiveEffects": "Aktive Effekte einschalten", "GURPS.settingHintActiveEffects": "Erlaubt der SL, Aktive Effekte zu erstellen und anzuwenden" -} \ No newline at end of file +} diff --git a/lang/en.json b/lang/en.json index 8b1ff8ca..7236fae2 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1,23 +1,33 @@ { - "GURPS.title": "GURPS", - "GURPS.changelog": "README", - "GURPS.DontShowAgain": "Don't show README again", - "GURPS.copyrightGURPS": "GURPS is a trademark of Steve Jackson Games, and its rules and art are copyrighted by Steve Jackson Games. All rights are reserved by Steve Jackson Games. This game aid is the original creation of Chris Normand/Nose66 and is released for free distribution, and not for resale, under the permissions granted by http://www.sjgames.com/general/online_policy.html", - "GURPS.copyrightGCS": "GCS is copyrighted 1998-2020 by Richard A. Wilkes. All rights reserved ", + "gurps": { + "copyright": "GURPS is a trademark of Steve Jackson Games, and its rules and art are copyrighted by Steve Jackson Games. All rights are reserved by Steve Jackson Games. This game aid is the original creation of Chris Normand/Nose66 and is released for free distribution, and not for resale, under the permissions granted by http://www.sjgames.com/general/online_policy.html", + "changelog": { + "readme": "README", + "title": "GURPS", + "dontShowAgain": "Don't show README again" + }, + "sheet": { + "personal": { + "tab": "Personal", + "portrait": "Portrait", + "identity": "Identity", + "name": "Name", + "player": "Player", + "title": "Title", + "miscellaneous": "Miscellaneous", + "created": "Created", + "modified": "Modified", + "options": "Options" + }, + "gcs": { + "copyright": "GCS is copyrighted 1998-2024 by Richard A. Wilkes. All rights reserved." + } + } + }, "__Char Sheet__": "=========", - "GURPS.portrait": "Portrait", - "GURPS.personalTab": "Personal", "GURPS.resourcesModsTab": "Resources and Modifiers", "__Character Sheet Identity__": "=========", - "GURPS.identity": "Identity", - "GURPS.identityName": "Name", - "GURPS.identityPlayer": "Player", - "GURPS.identityTitle": "Title", "__Character Sheet Miscellaneous__": "=========", - "GURPS.miscellaneous": "Miscellaneous", - "GURPS.miscellaneousCreated": "Created", - "GURPS.miscellaneousModified": "Modified", - "GURPS.miscellaneousOptions": "Options", "__Character Description__": "=========", "GURPS.description": "Description", "GURPS.descriptionAge": "Age", diff --git a/lang/fr.json b/lang/fr.json index 153ae513..e238c3a5 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,23 +1,31 @@ { - "GURPS.title": "GURPS", - "GURPS.changelog": "LISEZ-MOI", - "GURPS.DontShowAgain": "Ne plus montrer le Lisez-moi", - "GURPS.copyrightGURPS": "GURPS est une marque déposée de Steve Jackson Games, et ses règles et illustrations sont protégées par leurs droits d'auteur. Tous les droits sont réservés à Steve Jackson Games. Cette aide de jeu est la création originale de Chris Normand/Nose66 et est distribuée gratuitement et non revendable, avec la permission gracieuse de http://www.sjgames.com/general/online_policy.html", - "GURPS.copyrightGCS": "GCS is une marque déposée (1998-2020) par Richard A. Wilkes. Tous droits réservés", + "gurps": { + "copyright": "GURPS est une marque déposée de Steve Jackson Games, et ses règles et illustrations sont protégées par leurs droits d'auteur. Tous les droits sont réservés à Steve Jackson Games. Cette aide de jeu est la création originale de Chris Normand/Nose66 et est distribuée gratuitement et non revendable, avec la permission gracieuse de http://www.sjgames.com/general/online_policy.html", + "changelog": { + "readme": "LISEZ-MOI", + "dontShowAgain": "Ne plus montrer le Lisez-moi" + }, + "sheet": { + "personal": { + "tab": "Personnel", + "identity": "Identité", + "name": "Nom", + "player": "Joueur", + "title": "Titre", + "miscellaneous": "Divers", + "created": "Créé", + "modified": "Modifié" + }, + "gcs": { + "copyright": "GCS is une marque déposée (1998-2024) par Richard A. Wilkes. Tous droits réservés." + } + } + }, + "__Char Sheet__": "=========", - "GURPS.portrait": "Portrait", - "GURPS.personalTab": "Personnel", "GURPS.resourcesModsTab": "Ressources et Modificateurs", "__Character Sheet Identity__": "=========", - "GURPS.identity": "Identité", - "GURPS.identityName": "Nom", - "GURPS.identityPlayer": "Joueur", - "GURPS.identityTitle": "Titre", "__Character Sheet Miscellaneous__": "=========", - "GURPS.miscellaneous": "Divers", - "GURPS.miscellaneousCreated": "Créé", - "GURPS.miscellaneousModified": "Modifié", - "GURPS.miscellaneousOptions": "Options", "__Character Description__": "=========", "GURPS.description": "Description", "GURPS.descriptionAge": "Age", @@ -1125,4 +1133,4 @@ "GURPS.parentItemTooltip": "De {type}: {name}", "GURPS.cannotDropItemAlreadyExists": "Vous avez déjà cet objet.", "GURPS.droppingItemNotification": "{actorName} reçoit {itemName}" -} \ No newline at end of file +} diff --git a/lang/pt_br.json b/lang/pt_br.json index cbd13594..53a60806 100644 --- a/lang/pt_br.json +++ b/lang/pt_br.json @@ -1,24 +1,33 @@ { "__NOTE TO TRANSLATOR__": "If a given text is the same as the English (en.json), there is no need to include it here. It will fallback to en.json.", - "GURPS.title": "GURPS", - "GURPS.changelog": "LEIA-ME", - "GURPS.DontShowAgain": "Não exibir LEIA-ME novamente", - "GURPS.copyrightGURPS": "GURPS é marca registrada da Steve Jackson Games, que também detém direitos autorais sobre suas regras e arte. Todos os direitos reservados pela Steve Jackson Games. Este auxílio de jogo é criação original de Chris Normand/Nose66 e é distribuído gratuitamente, sendo vetada a venda, ver permissões em http://www.sjgames.com/general/online_policy.html", - "GURPS.copyrightGCS": "GCS© Todos os Direitos Reservados 1998-2020 Richard A. Wilkes.", + "gurps": { + "copyright": "GURPS é marca registrada da Steve Jackson Games, que também detém direitos autorais sobre suas regras e arte. Todos os direitos reservados pela Steve Jackson Games. Este auxílio de jogo é criação original de Chris Normand/Nose66 e é distribuído gratuitamente, sendo vetada a venda, ver permissões em http://www.sjgames.com/general/online_policy.html", + "changelog": { + "readme": "LEIA-ME", + "dontShowAgain": "Não exibir LEIA-ME novamente" + }, + "sheet": { + "personal": { + "tab": "Pessoal", + "portrait": "Retrato", + "identity": "Identidade", + "name": "Nome", + "player": "Jogador(a)", + "title": "Título", + "miscellaneous": "Diversos", + "created": "Criação", + "modified": "Modificação", + "options": "Opções" + }, + "gcs": { + "copyright": "GCS© Todos os Direitos Reservados 1998-2024 Richard A. Wilkes." + } + } + }, "__Char Sheet__": "=========", - "GURPS.portrait": "Retrato", - "GURPS.personalTab": "Pessoal", "GURPS.resourcesModsTab": "Recursos e Modificadores", "__Character Sheet Identity__": "=========", - "GURPS.identity": "Identidade", - "GURPS.identityName": "Nome", - "GURPS.identityPlayer": "Jogador(a)", - "GURPS.identityTitle": "Título", "__Character Sheet Miscellaneous__": "=========", - "GURPS.miscellaneous": "Diversos", - "GURPS.miscellaneousCreated": "Criação", - "GURPS.miscellaneousModified": "Modificação", - "GURPS.miscellaneousOptions": "Opções", "__Character Description__": "=========", "GURPS.description": "Descrição", "GURPS.descriptionAge": "Idade", @@ -1203,4 +1212,4 @@ "GURPS.rollMissedBy": "Margem de fracasso {margin}.", "GURPS.rollTotalHits": "{rofrcl} acertos possíveis ({link})
devido à CdT ({rof}) e o RCO ({rcl}).", "GURPS.rollTotal": "Resultado da rolagem ({rolls}) = {rtotal}." -} \ No newline at end of file +} diff --git a/lang/ru.json b/lang/ru.json index 8b322621..66056568 100644 --- a/lang/ru.json +++ b/lang/ru.json @@ -1,21 +1,34 @@ { "__NOTE TO TRANSLATOR__": "If a given text is the same as the English (en.json), there is no need to include it here. It will fallback to en.json.", - "GURPS.DontShowAgain": "Не показывать README снова", - "GURPS.copyrightGCS": "Права на GCS принадлежат Richard A. Wilkes, 1998-2020. Все права защищены", + "gurps": { + "copyright": "GURPS is a trademark of Steve Jackson Games, and its rules and art are copyrighted by Steve Jackson Games. All rights are reserved by Steve Jackson Games. This game aid is the original creation of Chris Normand/Nose66 and is released for free distribution, and not for resale, under the permissions granted by http://www.sjgames.com/general/online_policy.html", + "changelog": { + "dontShowAgain": "Не показывать README сноваn" + "readme": "README", + "title": "GURPS", + }, + "sheet": { + "personal": { + "tab": "Личное", + "portrait": "Изображение", + "identity": "Личность", + "name": "Имя", + "player": "Игрок", + "title": "Статус", + "miscellaneous": "Разное", + "created": "Создан", + "modified": "Изменён", + "options": "Настройки" + }, + "gcs": { + "copyright": "Права на GCS принадлежат Richard A. Wilkes, 1998-2024. Все права защищены." + } + } + }, "__Char Sheet__": "=========", - "GURPS.portrait": "Изображение", - "GURPS.personalTab": "Личное", "GURPS.resourcesModsTab": "Ресурсы и Модификаторы", "__Character Sheet Identity__": "=========", - "GURPS.identity": "Личность", - "GURPS.identityName": "Имя", - "GURPS.identityTitle": "Статус", - "GURPS.identityPlayer": "Игрок", "__Character Sheet Miscellaneous__": "=========", - "GURPS.miscellaneous": "Разное", - "GURPS.miscellaneousCreated": "Создан", - "GURPS.miscellaneousModified": "Изменён", - "GURPS.miscellaneousOptions": "Настройки", "__Character Description__": "=========", "GURPS.description": "Описание", "GURPS.descriptionGender": "Пол", diff --git a/lib/change-log.js b/lib/change-log.js index 7e8255ee..66490be0 100755 --- a/lib/change-log.js +++ b/lib/change-log.js @@ -21,7 +21,7 @@ export class ChangeLogWindow extends FormApplication { } get title() { - return `${game.i18n.localize('GURPS.title')} ~ ${game.i18n.localize('GURPS.changelog')}` + return `${game.i18n.localize('gurps.changelog.title')} ~ ${game.i18n.localize('gurps.changelog.readme')}` } async getData() { diff --git a/module/gurps.js b/module/gurps.js index b3be4984..673b6f4a 100644 --- a/module/gurps.js +++ b/module/gurps.js @@ -2104,7 +2104,6 @@ if (!globalThis.GURPS) { // html.find('.directory-footer').append(button) - // we need a special case to handle the markdown editor module because it changes the chat textarea with an EasyMDEContainer const hasMeme = game.modules.get('markdown-editor')?.active const chat = html[0]?.querySelector(hasMeme ? '.EasyMDEContainer' : '#chat-message') @@ -2254,7 +2253,7 @@ if (!globalThis.GURPS) {
-
${game.i18n.localize('GURPS.copyrightGURPS')}
+
${game.i18n.localize('gurps.copyright')}

Like our work? Consider supporting us:
@@ -2282,11 +2281,11 @@ if (!globalThis.GURPS) { resourceTrackers.forEach(it => (GURPS.DamageTables.damageTypeMap[it.alias] = it.alias)) resourceTrackers.forEach( it => - (GURPS.DamageTables.woundModifiers[it.alias] = { - multiplier: 1, - label: it.name, - resource: true, - }) + (GURPS.DamageTables.woundModifiers[it.alias] = { + multiplier: 1, + label: it.name, + resource: true, + }) ) // Sorry, removed the ts-ignores during editing. @@ -2331,8 +2330,8 @@ if (!globalThis.GURPS) { content: `Merge both macros into this:

${oldmacro.command.split('\n').join('
')}
${cmd .split('\n') .join('
')}


Or just replace current macro with:

${c - .split('\n') - .join('
')}

 
`, + .split('\n') + .join('
')}
 
`, buttons: { one: { icon: '', diff --git a/templates/actor/actor-tab-sheet.hbs b/templates/actor/actor-tab-sheet.hbs index 98ba47fd..65808548 100644 --- a/templates/actor/actor-tab-sheet.hbs +++ b/templates/actor/actor-tab-sheet.hbs @@ -33,7 +33,7 @@