Skip to content

Commit

Permalink
Prep release v1.3
Browse files Browse the repository at this point in the history
Prep release v1.3
  • Loading branch information
Esrin authored Jan 16, 2021
2 parents 91955de + 2d14d47 commit c52e7b1
Show file tree
Hide file tree
Showing 81 changed files with 3,891 additions and 402 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ same branch and the PR will be updated.

[1]: https://chris.beams.io/posts/git-commit/#seven-rules
[2]: https://deepsource.io/blog/git-best-practices/


# Functional Tests

Uses mocha, and will only run in nodejs mode and on localhost.
Steps to Run:
1. `npm install` -> to grab dependencies.
2. Add `test:true` to system.json.
3. Start FoundryVTT as normal, locally.
4. Browse to localhost version `localhost:30000`
5. Log in as a GM, a new macro will be auto-generated for running functional tests.
6. Run macro to execute tests.

Examples of how to add tests:
see /tests/ffg-tests.js ==> this is the test runner.
see /tests/common.test.js ==> this is a unit/functional test
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ See our current production goals and progress [here](https://github.com/StarWars

Release `CHANGELOG` can be found [here](https://github.com/StarWarsFoundryVTT/StarWarsFFG/releases)

- 15/01/2021 - Cstadther - Added code to fix save/display issues with compendium items.
- 08/01/2021 - Cstadther - Added new paused image.
- 04/01/2021 - Cstadther - Fix for Melee-* skills not calculating damage correctly when based on Brawn.
- 04/01/2021 - Cstadther - Enhanced the enhancement provided by @wrycu, added localization, added sheet level options for talent sorting to override global setting, added localization.
- 04/01/2021 - Cstadther - Fix issue with Genesys Adversaries import.
- 03/01/2021 - Cstadther - Fix for rendering secrets in content.
- 02/01/2021 - Cstadther - Enhancement 593 - Added context to destiny point flip message, now with styling and lists what the pools changed to.
- 02/01/2021 - Cstadther - Enhancement 591 - Added `Source` to the description for all imported items.
- 31/12/2020 - Cstadther - Enhancement 529 - Added Restricted checkbox to items. Updated OggDude importer to import restricted data.
- 31/12/2020 - Cstadther - Fix 539 - Fixed issue where added skills were removed when duplicating an actor.
- 31/12/2020 - Cstadther - Enhancement 546 - Added `All Skills` to skill list modifier drop down, will apply the modifier to all skills.
- 31/12/2020 - Cstadther - Fix - Fixed issue with v2 styles cutting off. Fixed issue with Signature Abilities and Force Power Upgrades not being listed (from previous core update)
- 31/12/2020 - Cstadther - Enhancement - Added Terrinoth and Crucible skill sets, verified Android skill set. These will only be available in new worlds.
- 30/12/2020 - Cstadther - Enhancement 442 - Added v2 Character sheets with tabs broken out on the left.
- 30/12/2020 - Cstadther - Fix 568 - Changed the way skills are rendered, but spliting skills into two columns and rendering those columns.
- 28/12/2020 - Cstadther - Fix 569 - Fixed OggDude export with non-english characteristic names (now uses characteristic keys). Added compendium migrations, as new version (1.3) will change importid property from importid to ffgimportid to resolve issue with Core migration overwriting property.
- 28/12/2020 - Cstadther - Fix 553 - Fixed specialization link search for world compendiums that have been converted module compendiums.
- 28/12/2020 - Cstadther - Enhancement 570 - Added "Send to All" option for roll dialog.
- 22/12/2020 - Cstadther - Added Functional Testing.
- 21/12/2020 - Cstadther - Fix 562 - Fixed issue where multiple GMs were causing the Destiny Roll to be handled multiple times.
- 21/12/2020 - Cstadther - Multiple Fixes - Fixed issue with additionalFlavorText error on some rolls. Fixed issues with Dedication increasing stat out of control. Fixed issue with OggDude import failing when skills not selected. Moved import id to ffgimportid to resolve issue when compendiums are migrated from a core upgrade. Updated roll audiohelper call to push sound to all connected clients.
- 20/12/2020 - Cstadther - Added additional error handling for dice dialog error on `skills`
- 20/12/2020 - Cstadther - Fix 558 - Fixes issue where uploads to Forge were not working correctly and error out of code section.
- 20/12/2020 - Cstadther - Fix 556 - Fixed issue where title of intiative dialog was incorrect.
- 19/12/2020 - Cstadther - Enhancement - Changed variable name in macro generation to resolve issue where `The Furnace` module defines a variable as `actor`
- 18/12/2020 - Cstadther - Enhancement - Added ability to click on specialization talent header to edit attributes associated to that instance of the talent.
- 16/12/2020 - Cstadther - Fix 533 - Moved destiny rolls and flipping to queue model, and custom socket method.
Expand Down
3 changes: 3 additions & 0 deletions images/generic-die.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/paused.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 25 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"SWFFG.RollHigh": "High",
"SWFFG.TalentActivationsPassive": "Passive",
"SWFFG.TalentActivationsActiveIncidental": "Active (Incidental)",
"SWFFG.TalentActivationsActiveIncidentalOutofTurn": "Active (Incidental, Out of Turn)",
"SWFFG.TalentActivationsActiveIncidentalOutofTurn": "Active (Incidental, OOT)",
"SWFFG.TalentActivationsActiveAction": "Active (Action)",
"SWFFG.TalentActivationsActiveManeuver": "Active (Maneuver)",
"SWFFG.ModTypeCharacteristic": "Characteristic",
Expand Down Expand Up @@ -420,5 +420,28 @@
"SWFFG.EnableRollAudioPlaylist": "Roll - Playlist users use for roll audio",
"SWFFG.EnableRollAudioPlaylistHint": "This is the playlist that users are given access to, from which they can add audio to rolls.",
"SWFFG.SentDicePoolRoll": "Click here to roll the dice pool.",
"SWFFG.SentDicePoolRollHit": "Sent a dice pool for you to roll."
"SWFFG.SentDicePoolRollHint": "Sent a dice pool for you to roll.",
"SWFFG.TabGeneral": "Basic Information",
"SWFFG.TabObligationDutyMorality": "Obligation/Duty/Morality",
"SWFFG.SkillsNameKnowledgeAdventuring": "Adventuring",
"SWFFG.SkillsNameKnowledgeAdventuringAbbrev": "Adven",
"SWFFG.SkillsNameKnowledgeForbidden": "Forbidden",
"SWFFG.SkillsNameKnowledgeForbiddenAbbrev": "Frbdn",
"SWFFG.SkillsNameKnowledgeGeography": "Geography",
"SWFFG.SkillsNameKnowledgeGeographyAbbrev": "Geog",
"SWFFG.SkillsNameRunes": "Runes",
"SWFFG.SkillsNameVerse": "Verse",
"SWFFG.SkillsNameAember": "Æmbercraft",
"SWFFG.SkillsNameAemberAbbrev": "ÆmCrft",
"SWFFG.SkillsNameKnowledgeAember": "Æmber",
"SWFFG.SkillsNameKnowledgeCrucible": "Crucible",
"SWFFG.SkillsNameKnowledgeCulture": "Culture",
"SWFFG.ModifierAllSkills": "All Skills",
"SWFFG.IsRestricted": "Restricted?",
"SWFFG.EnableSortTalentsByActivationGlobal": "Sort Talents (Global)",
"SWFFG.EnableSortTalentsByActivation": "Sort Talents",
"SWFFG.EnableSortTalentsByActivationHint": "Enable grouping Talents by activation",
"SWFFG.UseGlobalSetting": "Use Global",
"SWFFG.OptionValueYes": "Yes",
"SWFFG.OptionValueNo": "No"
}
73 changes: 72 additions & 1 deletion lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,5 +349,76 @@
"SWFFG.DowngradeAbility": "Reducir Capacidad",
"SWFFG.DowngradeDifficulty": "Reducir Dificultad",
"SWFFG.SendToChat": "Enviar al Chat",
"SWFFG.ChooseInitiative": "Escoger Método Iniciativa"
"SWFFG.ChooseInitiative": "Escoger Método Iniciativa",
"SWFFG.ResetSkillList": "Reset Lista Hab.",
"SWFFG.Advantage": "Ventaja",
"SWFFG.Success": "Éxito",
"SWFFG.Threat": "Amenaza",
"SWFFG.Failure": "Fallo",
"SWFFG.SkillImportInstructions1": "Puedes <b>IMPORTAR</b> un fichero de datos JSON para añadir un tema nuevo o actualizar uno ya existente.",
"SWFFG.SkillImportInstructions2": "Puedes hacer un <b>RESET</b> que aplicará por defecto la lista base del sistema pulsando en <b>Reset Lista Hab.</b>.",
"SWFFG.SkillImportInstructions3": "Por favor revisa documentación del esquema habilidades",
"SWFFG.SkillImportSource": "Fichero fuente JSON Habilidades",
"SWFFG.SkillImportTheme": "Tema Hab.",
"SWFFG.SkillImportActive": "¿Activo?",
"SWFFG.SkillDownload": "Descarga",
"SWFFG.ModTypeSkillAddAdvantage": "Hab. Añade Ventaja",
"SWFFG.ModTypeSkillAddDark": "Hab. Añade Oscuridad",
"SWFFG.ModTypeSkillAddFailure": "Hab. Añáde Fallo",
"SWFFG.ModTypeSkillAddLight": "Hab. Añade Luz",
"SWFFG.ModTypeSkillAddSuccess": "Hab. Añade Éxito",
"SWFFG.ModTypeSkillAddThreat": "Hab. Añade Amenaza",
"SWFFG.SendForceRollToChat": "Tirar Poder Fuerza",
"SWFFG.InitiativeRoll": "Tirada Iniciativa",
"SWFFG.InitiativeRollResult": "tira su Iniciativa!",
"SWFFG.InitiativePoolSelectorHint": "Selecciona la habilidad de iniciativa a utilizar",
"SWFFG.InitiativePoolAddsHint": "Añade Éxito/Ventaja a la tirada. Botón Izq. incrementa el dado, botón Der. lo reduce.",
"SWFFG.RequestDestinyRoll": "Pedir Tirada",
"SWFFG.DestinyAlreadyRolled": "¡Ya has tirado la Reserva de Destino!",
"SWFFG.DestinyPoolRoll": "Pulsa aqui para tirar la Reserva de Destino",
"SWFFG.SkillAddAsInitiative": "Cambia para utilizar como iniciativa",
"SWFFG.ItemWeaponStatus" : "Estado",
"SWFFG.ItemStatusNone" : "Perfecto",
"SWFFG.ItemStatusMinor" : "Daño Menor",
"SWFFG.ItemStatusModerate" : "Daño Moderado",
"SWFFG.ItemStatusMajor" : "Daño Mayor",
"SWFFG.ItemTooDamagedToUse": "desperfectos excesivos para ser utilizada",
"SWFFG.RollResultSuccess" : "Éxitos",
"SWFFG.RollResultFailure" : "Fallos",
"SWFFG.RollResultAdvantage" : "Ventajas",
"SWFFG.RollResultThreat" : "Amenazas",
"SWFFG.RollResultTriumph" : "Triunfos",
"SWFFG.RollResultDespair" : "Desesperación",
"SWFFG.RollResultLight" : "Luminoso",
"SWFFG.RollResultDark" : "Oscuridad",
"SWFFG.Gender": "Sexo",
"SWFFG.Age": "Edad",
"SWFFG.Height": "Altura",
"SWFFG.Build": "Constitución",
"SWFFG.Hair": "Pelo",
"SWFFG.Eyes": "Ojos",
"SWFFG.NotableFeature": "Rasgo Principal",
"SWFFG.Notes": "Otras",
"SWFFG.Motivations": "Motivaciones",
"SWFFG.MotivationCategory": "Categoria",
"SWFFG.MotivationType": "Tipo",
"SWFFG.MotivationDescription": "Descripción",
"SWFFG.EmotionalStrength": "Fuerza Emocional",
"SWFFG.EmotionalWeakness": "Debilidad Emocional",
"SWFFG.Strength": "Fuerza",
"SWFFG.Flaw": "Defecto",
"SWFFG.Desire": "Deseo",
"SWFFG.Fear": "Miedo",
"SWFFG.Type": "Tipo",
"SWFFG.Magnitude": "Magnitud",
"SWFFG.AdversariesImportInstructions1" : "Importar datos en formato Stoogoff (http://swa.stoogoff.com/).",
"SWFFG.AdversariesImportInstructions2" : "Descargar la fuente completa como un fichero zip para su importación.",
"SWFFG.Skills": "Habilidades",
"SWFFG.GroupManager": "Gestor Grupo",
"SWFFG.EnableRollAudio": "Tirada - Permite al usuario añadir un sonido",
"SWFFG.EnableRollAudioHint": "Permite a los usuarios añadir efectos de sonido a las tiradas",
"SWFFG.EnableRollAudioPlaylist": "Tirada - Lista de sonidos a utilizar por el usuario",
"SWFFG.EnableRollAudioPlaylistHint": "Esta es la lista de reproducción permitida para los efectos de sonido.",
"SWFFG.SentDicePoolRoll": "Pulsa aquí para tirar la reserva de dados.",
"SWFFG.SentDicePoolRollHit": "Envía una reserva de dados para su tirada."
}
3 changes: 2 additions & 1 deletion modules/actors/actor-ffg-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class ActorOptions {
icon: '<i class="fas fa-check"></i>',
label: game.i18n.localize("SWFFG.ButtonAccept"),
callback: (html) => {
const controls = html.find("input");
const controls = html.find("input, select");

let updateObject = {};

Expand All @@ -46,6 +46,7 @@ export default class ActorOptions {
}

this.data.object.update(updateObject);
this.data.object.sheet.render(true);
},
},
two: {
Expand Down
48 changes: 47 additions & 1 deletion modules/actors/actor-ffg.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,12 @@ export class ActorFFG extends Actor {
});
}

data.talentList = globalTalentList;
// enable talent sorting if global to true and sheet is set to inherit or sheet is set to true.
if ((game.settings.get("starwarsffg", "talentSorting") && actorData.flags?.config?.talentSorting === "0") || actorData.flags?.config?.talentSorting === "1") {
data.talentList = globalTalentList.slice().sort(this._sortTalents);
} else {
data.talentList = globalTalentList;
}

if (data?.obligationlist && Object.keys(data.obligationlist).length > 0) {
let obligation = 0;
Expand Down Expand Up @@ -442,6 +447,47 @@ export class ActorFFG extends Actor {
return skills;
}

// group talents
_sortTalents(a, b) {
/*
Active (Out)
Active (Maneuver)
Active (Incidental)
Active
Passive
*/
if (a.activation.includes("Active") && a.activation.includes("Out")) {
return -1;
} else if (b.activation.includes("Active") && b.activation.includes("Out")) {
return 1;
}
if (a.activation.includes("Active") && a.activation.includes("Maneuver")) {
return -1;
} else if (b.activation.includes("Active") && b.activation.includes("Maneuver")) {
return 1;
}
if (a.activation.includes("Active") && a.activation.includes("Incidental")) {
return -1;
} else if (b.activation.includes("Active") && b.activation.includes("Incidental")) {
return 1;
}
if (a.activation.includes("Active") && a.activation.includes("Incidental")) {
return -1;
} else if (b.activation.includes("Active") && b.activation.includes("Incidental")) {
return 1;
}
if (a.activation.includes("Active")) {
return -1;
} else if (b.activation.includes("Active")) {
return 1;
}
if (a.activation.includes("Passive")) {
return -1;
} else if (b.activation.includes("Passive")) {
return 1;
}
}

/**
* Prepares the modifier data in the attributes object
*
Expand Down
29 changes: 29 additions & 0 deletions modules/actors/actor-sheet-ffg-v2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { ActorSheetFFG } from "./actor-sheet-ffg.js";

export class ActorSheetFFGV2 extends ActorSheetFFG {
constructor(...args) {
super(...args);
}

/** @override */
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["starwarsffg", "sheet", "actor", "v2"],
template: "systems/starwarsffg/templates/actors/ffg-character-sheet.html",
width: 710,
height: 650,
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "characteristics" }],
scrollY: [".tableWithHeader", ".tab", ".skillsGrid"],
});
}

getData() {
const data = super.getData();
return data;
}

/** @override */
activateListeners(html) {
super.activateListeners(html);
}
}
Loading

0 comments on commit c52e7b1

Please sign in to comment.