Skip to content

Commit

Permalink
Add option to override lock symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
otacke committed Apr 10, 2024
1 parent a233dcf commit e8b1d84
Show file tree
Hide file tree
Showing 16 changed files with 73 additions and 15 deletions.
4 changes: 4 additions & 0 deletions language/.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Connected stages"
},
Expand Down
11 changes: 8 additions & 3 deletions language/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@
{
"label": "Anzahl der Extrazeit in Sekunden",
"description": "Lege fest, wie viele Sekunden die Nutzenden für ihre Gesamtzeit erhalten, wenn sie diese Etappe öffnen."
}, {
},
{
"label": "Immer sichtbar",
"description": "Wenn gewählt, wird diese Etappe immer sichtbar sein. Dies gilt auch dann, wenn die Einstellungen zur Sichtreichweite der Karte anderes vorgeben."
},
{
"label": "Überschreibe das Schlosssymbol",
"description": "Wenn gewählt, verwenden verschlossene Etappen nicht das Schlosssymbol, sondern das Symbol für den Spezialetappentyp."
},
{
"label": "Verbundene Etappen"
},
Expand Down Expand Up @@ -305,8 +310,8 @@
"description": "Wird abgespielt, wenn eine Aufgabe geöffnet wird."
},
{
"label": "Aufgabe geschlossen",
"description": "Wird abgespielt, wenn eine Aufgabe geschlossen wird."
"label": "Aufgabe verschlossen",
"description": "Wird abgespielt, wenn eine Aufgabeverschlossen ist."
},
{
"label": "Zeige Dialog",
Expand Down
4 changes: 4 additions & 0 deletions language/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Συνδεδεμένα επίπεδα"
},
Expand Down
4 changes: 4 additions & 0 deletions language/es-mx.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Etapas conectadas"
},
Expand Down
4 changes: 4 additions & 0 deletions language/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Etapas conectadas"
},
Expand Down
4 changes: 4 additions & 0 deletions language/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Lotutako etapak"
},
Expand Down
4 changes: 4 additions & 0 deletions language/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Etapas conectadas"
},
Expand Down
4 changes: 4 additions & 0 deletions language/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Connected stages"
},
Expand Down
4 changes: 4 additions & 0 deletions language/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Connected stages"
},
Expand Down
4 changes: 4 additions & 0 deletions language/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Verbonden fases"
},
Expand Down
4 changes: 4 additions & 0 deletions language/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "Povezane stopnje"
},
Expand Down
4 changes: 4 additions & 0 deletions language/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "连接的关卡"
},
Expand Down
4 changes: 4 additions & 0 deletions language/zh-hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "连接的关卡"
},
Expand Down
4 changes: 4 additions & 0 deletions language/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@
"label": "Always visible",
"description": "If checked, this stage will always be visible, even if the map's visibility range settings dictate otherswise."
},
{
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type."
},
{
"label": "连接的关卡"
},
Expand Down
10 changes: 9 additions & 1 deletion semantics.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@
"default": false,
"optional": true
},
{
"name": "overrideSymbol",
"type": "boolean",
"label": "Override lock symbol",
"description": "If checked, locked stages will not use the lock symbol, but the symbol for the special stage type.",
"default": false,
"optional": true
},
{
"name": "neighbors",
"type": "select",
Expand Down Expand Up @@ -1298,4 +1306,4 @@
}
]
}
]
]
15 changes: 4 additions & 11 deletions src/scripts/models/stages.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export default class Stages {
visuals: this.params.visuals,
visible: stageState?.visible,
alwaysVisible: elementParams.alwaysVisible,
overrideSymbol: elementParams.overrideSymbol,
...(stageState?.state && { state: stageState?.state })
};

Expand Down Expand Up @@ -127,17 +128,9 @@ export default class Stages {
}
};

let newStage;
if (!elementParams.specialStageType) {
newStage = new Stage(stageParams, stageCallbacks);
}
else {
if (stageParams.alwaysVisible) {
stageParams.overrideSymbol = true;
}

newStage = new SpecialStage(stageParams, stageCallbacks);
}
const newStage = (!elementParams.specialStageType) ?
new Stage(stageParams, stageCallbacks) :
new SpecialStage(stageParams, stageCallbacks);

stages.push(newStage);
}
Expand Down

0 comments on commit e8b1d84

Please sign in to comment.