Skip to content

Commit

Permalink
feat: Allow suppressing elements of the matrix for specific languages
Browse files Browse the repository at this point in the history
  • Loading branch information
ursjoss committed Jan 8, 2024
1 parent ab7ec29 commit 75c841c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zz_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function Draw_Results_Organ(a_data) {
str_row += '<td class="td_effekt_typ left">';

for (var j = 0; j < arrEffekte.length; j++) {
objEffekt = Get_Organ_Effekt_Noxe_Zeit(a_data[i].organ, a_data[i].effekt_de, arrEffekte[j], glb_Zeit);
objEffekt = Get_Organ_Effekt_Noxe_Zeit(a_data[i].organ, a_data[i].effekt_de, arrEffekte[j], glb_Zeit, glb_Lang);

if (glb_isMobile == false) {
str_row += '<td class="td_effekt_typ">';
Expand Down Expand Up @@ -462,7 +462,7 @@ function Get_Organ_Effekte(a_organ) {
} // Get_Organ_Effekte


function Get_Organ_Effekt_Noxe_Zeit(a_organ, a_effekt, a_noxe, a_noxe_zeit) {
function Get_Organ_Effekt_Noxe_Zeit(a_organ, a_effekt, a_noxe, a_noxe_zeit, a_lang) {
// Alle passenden Einträge aus json_matrix.arrMatrix
//console.log("Filter_Noxe_Zeit_Organ: "+ a_noxe + " / " + a_noxe_zeit);

Expand All @@ -478,6 +478,9 @@ function Get_Organ_Effekt_Noxe_Zeit(a_organ, a_effekt, a_noxe, a_noxe_zeit) {
jsonData = $(jsonData).filter(function (i, n) {
return n.organ == a_organ
});
jsonData = $(jsonData).filter(function (i, n) {
return !JSON.stringify(n).includes("suppress") || n.suppress.indexOf(a_lang) === -1
});

//console.log(jsonData);

Expand Down

0 comments on commit 75c841c

Please sign in to comment.