feat: Artistic als eigener Programmtyp prüfen
Die Fachgruppe hat entschieden: die Punktwertung von Artistic ist zweitrangig, Länge und Begrenzungen sollen geprüft werden. Artistic ist deshalb ein schmaler Modus, kein zweites Regelwerk. - Routine.program_type (free/artistic), Schema 8. Kategorie-Lookups verlangen den Programmtyp als Parameter, damit "Gold" nicht versehentlich gegen die Grenzen der falschen Disziplin läuft. - adult.json beider Saisons: je fünf Artistic-Kategorien mit `scored: false`, Mindestanzahlen (1–2 Sprünge, 1–2 Pirouetten), 1:30 bzw. 2:00 ±10 s, keine Kombinationen, kein Axel in Bronze/Silver/Gold. - Validator prüft Mindest- und Höchstanzahlen. Level und Features bleiben unangetastet, weil sie in Artistic nicht gewertet werden. - Statusleiste: Programmtyp-Dropdown; Prüfkopf nennt "Gold · Artistic · 1:30 ±10 s"; statt der Punktschätzung steht der Hinweis, dass Artistic nur über die Programmkomponenten bewertet wird. - PDF-Kopf nennt Artistic. - Der Zwischenhinweis "Kategorie-Grenzen gelten nur für die Kür" entfällt. Nicht modelliert: Pair Artistic, Eistanz und Synchro.
This commit is contained in:
parent
1b5649e7dd
commit
795d04a05b
20 changed files with 749 additions and 72 deletions
|
|
@ -309,7 +309,7 @@ Features definieren, aber Level 4 bei vier verlangen.
|
|||
|
||||
| ID | Prüfung | Schwere |
|
||||
| :-- | :--- | :--- |
|
||||
| D1 | `code` eindeutig, `name` nicht leer, `duration_seconds` 60–300 | Fehler |
|
||||
| D1 | `code` je Programmtyp eindeutig, `name` nicht leer, `duration_seconds` 60–300 | Fehler |
|
||||
| D2 | `forbidden_jumps` ⊆ Katalog-Codes vom Typ `jump` | Fehler |
|
||||
| D3 | `allowed_rotations` ⊆ {`single`, `double`, `triple`, `quad`} | Fehler |
|
||||
| D4 | `required_axel` ⇒ `allow_axel` | Fehler |
|
||||
|
|
@ -318,7 +318,7 @@ Features definieren, aber Level 4 bei vier verlangen.
|
|||
| D7 | `required_*` ≤ `max_*` (Schrittsequenz, Choreo-Sequenz) | Fehler |
|
||||
| D8 | `max_jumps_per_combination` ≥ 2, sobald `max_jump_combinations` > 0 | Fehler |
|
||||
| D9 | `requires_choreographic_spin` ⇒ `ChSp` existiert im Katalog | Fehler |
|
||||
| D10 | `pcs_factor` > 0, `fall_deduction` ≥ 0 | Fehler |
|
||||
| D10 | `pcs_factor` > 0 (außer `scored: false`), `fall_deduction` ≥ 0 | Fehler |
|
||||
| D11 | `max_jumps_per_combination` ≤ `max_jump_elements` | Fehler |
|
||||
|
||||
D5 ist absichtlich nur eine Warnung: In Gold stehen `2F`, `2Lz` und `2A` in
|
||||
|
|
|
|||
|
|
@ -167,7 +167,15 @@ Features pro Fuß“ und die Feature-Positionsregeln sind noch nicht umgesetzt.
|
|||
Die Adult-Regeln liegen als eigene Datei aus dem IAFSC Technical Announcement
|
||||
2026/27. Das Announcement hat bei Konflikten Vorrang vor den allgemeinen
|
||||
ISU-Regeln. Die Kategorie wird über `Routine.adult_category` an der Kür
|
||||
gespeichert und in der Statusleiste gewählt.
|
||||
gespeichert und in der Statusleiste gewählt; der Programmtyp steht in
|
||||
`Routine.program_type`.
|
||||
|
||||
Jede Kategorie existiert zweimal – einmal für die **Kür** (`"program_type":
|
||||
"free"`) und einmal für **Artistic** (`"artistic"`, Feld `scored: false`).
|
||||
Die Tabellen unten gelten für die Kür; Artistic prüft nur Dauer und
|
||||
Begrenzungen (1–2 Sprünge, 1–2 Pirouetten, kein Axel in Bronze/Silver/Gold,
|
||||
keine Doppel/Dreifach, keine Kombinationen, 1:30 bzw. 2:00 ±10 s) und zeigt
|
||||
keine Punktschätzung.
|
||||
|
||||
| | Gold | Silver | Bronze |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
|
|
|
|||
|
|
@ -362,13 +362,11 @@ Für Pirouetten und Schrittsequenzen gilt:
|
|||
## Adult-Kategorien
|
||||
|
||||
Die Kategorie wird in der Statusleiste gewählt und mit der Kür gespeichert.
|
||||
Daneben steht der **Programmtyp**: **Kür** oder **Artistic**. Beide haben
|
||||
dieselben Kategorienamen (Bronze, Silver, Gold, Masters, Masters Elite), aber
|
||||
unterschiedliche Grenzen.
|
||||
|
||||
**Die Grenzen gelten für die Kür (Free Skating).** Bei der ISU Adult
|
||||
Competition gibt es daneben ein eigenes Artistic-Programm mit anderen
|
||||
Anforderungen (1:30 bzw. 2:00, 1–2 Sprünge, 1–2 Pirouetten, kein Axel in
|
||||
Bronze/Silver/Gold, keine Sturzabzüge). Der Rinkplanner prüft es noch nicht;
|
||||
für ein Artistic-Programm sind die Kategorie-Befunde deshalb nicht
|
||||
aussagekräftig. Siehe Roadmap, „Artistic Free Skating – Entscheidung offen".
|
||||
**Kür (Free Skating):**
|
||||
|
||||
| | Gold | Silver | Bronze |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
|
|
@ -381,6 +379,22 @@ aussagekräftig. Siehe Roadmap, „Artistic Free Skating – Entscheidung offen"
|
|||
| PCS-Faktor | 2,67 | 2,00 | 2,00 |
|
||||
| Sturzabzug | 1,0 | 0,5 außerhalb Elemente | 0,5 außerhalb Elemente |
|
||||
|
||||
**Artistic (Artistic Free Skating):**
|
||||
|
||||
| | Bronze / Silver / Gold | Masters / Masters Elite |
|
||||
| :--- | :--- | :--- |
|
||||
| Dauer | 1:30 ±10 s | 2:00 ±10 s |
|
||||
| Sprünge | 1–2, nur Einfach, **kein Axel** | 1–2, nur Einfach, Axel erlaubt |
|
||||
| Pirouetten | 1–2 | 1–2 |
|
||||
| Kombinationen | keine | keine |
|
||||
| Wertung | nur Programmkomponenten, kein technischer Wert | dito |
|
||||
|
||||
Artistic wird ausschließlich über die Programmkomponenten bewertet. Der
|
||||
Rinkplanner prüft deshalb **Dauer und Begrenzungen**, zeigt aber **keine
|
||||
Punktschätzung** – eine Basiswertsumme gäbe es dort nicht. Jeder Verstoß
|
||||
(zu viele Elemente, fehlendes Pflichtelement) kostet laut Announcement 1,0
|
||||
Punkte; die App weist darauf hin, rechnet ihn aber nicht ein.
|
||||
|
||||
Masters und Masters Elite sind ebenfalls wählbar. Grundlage ist das IAFSC
|
||||
Technical Announcement 2026/27; es hat bei Konflikten Vorrang vor allgemeinen
|
||||
ISU-Regeln.
|
||||
|
|
|
|||
|
|
@ -178,15 +178,11 @@ OAuth-App ist nicht veröffentlicht. Google Drive und OneDrive stehen unter
|
|||
entfallen", „Dauer jetzt 10 s zu lang"), ohne die Kür zu ändern
|
||||
- [ ] Max. zwei Features pro Fuß und Feature-Positionsregeln
|
||||
(als Policy in den Daten, nicht als Codebedingung)
|
||||
- [ ] Artistic Free Skating – **Entscheidung offen**, Rückmeldung der
|
||||
Fachgruppe steht aus (2026-11-13). Fakten für beide Saisons liegen vor:
|
||||
nur Komponentenwertung (Composition 1,0 · Presentation 1,2 · Skating Skills
|
||||
1,0), kein technisches Panel, 1–2 Einzelsprünge (Waltz zählt nicht) und
|
||||
1–2 Pirouetten, Bronze/Silver/Gold ohne Axel, Dauer 1:30 ±10 s
|
||||
(Gold/Silver/Bronze) bzw. 2:00 ±10 s (Masters/Elite), keine Sturzabzüge.
|
||||
Wenn ja: `program_type` als zweite Achse (Kür/Artistic), keine
|
||||
Punktschätzung, Level/Features im Inspector ausblenden. Solange nicht
|
||||
gebaut: die Kategorie-Grenzen gelten nur für die Kür, im Handbuch vermerken.
|
||||
- [x] Artistic Free Skating als schmaler Modus (Entscheidung der Fachgruppe
|
||||
2026-11-13: Punktwertung nicht wichtig, Länge und Begrenzungen schon).
|
||||
`program_type` als zweite Achse, Kategorien je Programmtyp, keine
|
||||
Punktschätzung für Artistic. Nicht modelliert: Pair Artistic, Eistanz,
|
||||
Synchro.
|
||||
- [x] Wiederholungsregeln (max. 2-mal pro gelistetem Sprung)
|
||||
- [x] Kombinationsgrenzen (Anzahl, Folgen, max. Sprünge pro Kombination)
|
||||
- [x] Strukturierte Sprungkombinationen/-folgen (erster Sprung + bis zu zwei weitere)
|
||||
|
|
|
|||
|
|
@ -782,10 +782,13 @@
|
|||
"Keine Elemente mit Base Value.","Keine Elemente mit Base Value.","No elements with a base value."
|
||||
"Befunde bei Prüfung gegen %s","Befunde bei Prüfung gegen %s","Findings when checked against %s"
|
||||
"ⓘ Gegen andere Saison prüfen …","ⓘ Gegen andere Saison prüfen …","ⓘ Check against another season …"
|
||||
"Die Kategorie-Grenzen gelten für die Kür; Artistic wird nicht geprüft.","Die Kategorie-Grenzen gelten für die Kür; Artistic wird nicht geprüft.","The category limits apply to free skating; artistic is not checked."
|
||||
"Saison-Vergleich","Saison-Vergleich","Season comparison"
|
||||
"Auf Saison umstellen","Auf Saison umstellen","Switch season"
|
||||
"Prüfen ändert nichts. Umstellen übernimmt nur die Saison, keine Elemente.","Prüfen ändert nichts. Umstellen übernimmt nur die Saison, keine Elemente.","Checking changes nothing. Switching applies only the season, not the elements."
|
||||
"Summe","Summe","Total"
|
||||
"Level","Level","Level"
|
||||
"Features","Features","Features"
|
||||
"Artistic","Artistic","Artistic"
|
||||
"Artistic wird nur über die Programmkomponenten bewertet; keine Punktschätzung.","Artistic wird nur über die Programmkomponenten bewertet; keine Punktschätzung.","Artistic is judged on the programme components only; no score estimate."
|
||||
"Sprungelemente min.","Sprungelemente min.","Jump elements min."
|
||||
"Pirouetten min.","Pirouetten min.","Spins min."
|
||||
|
|
|
|||
|
|
|
@ -784,6 +784,12 @@ custom_minimum_size = Vector2(190, 48)
|
|||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 15
|
||||
|
||||
[node name="ProgramOption" type="OptionButton" parent="Layout/StatusBar/StatusBarContent"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(120, 48)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 15
|
||||
|
||||
[node name="AdultCategoryOption" type="OptionButton" parent="Layout/StatusBar/StatusBarContent"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(170, 48)
|
||||
|
|
|
|||
|
|
@ -176,6 +176,8 @@ static func decode_json(text: String) -> Dictionary:
|
|||
_text(data, "adult_category", "").left(MAX_TEXT_LENGTH)
|
||||
)
|
||||
routine.season = _text(data, "season", "").left(MAX_TEXT_LENGTH)
|
||||
var program := _text(data, "program_type", "free").left(MAX_TEXT_LENGTH)
|
||||
routine.program_type = "artistic" if program.to_lower() == "artistic" else "free"
|
||||
routine.assumed_pcs_average = clampf(
|
||||
_number(data, "assumed_pcs_average", 5.0),
|
||||
0.0,
|
||||
|
|
@ -284,6 +286,7 @@ static func encode(routine: Routine) -> String:
|
|||
"music_file": safe_music_file_name(routine.music_file),
|
||||
"adult_category": routine.adult_category,
|
||||
"season": routine.season,
|
||||
"program_type": routine.program_type,
|
||||
"assumed_pcs_average": routine.assumed_pcs_average,
|
||||
"assumed_falls": routine.assumed_falls,
|
||||
"timeline_labels": _encode_timeline_labels(routine.timeline_labels),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ extends Resource
|
|||
## Root aggregate of a choreography. Pure data: no rendering, no input, no
|
||||
## timing state. The whiteboard view and the future 3D layer both consume it.
|
||||
|
||||
const CURRENT_SCHEMA_VERSION := 7
|
||||
const CURRENT_SCHEMA_VERSION := 8
|
||||
|
||||
@export var schema_version: int = CURRENT_SCHEMA_VERSION
|
||||
@export var routine_id: String = ""
|
||||
|
|
@ -22,6 +22,9 @@ const CURRENT_SCHEMA_VERSION := 7
|
|||
## Adult competition category code (e.g. "gold", "silver", "bronze"). Empty
|
||||
## means no category-specific validation.
|
||||
@export var adult_category: String = ""
|
||||
## Competition type the category limits belong to: "free" (Kür) or "artistic"
|
||||
## (Artistic Free Skating). Empty is treated as "free" for old files.
|
||||
@export var program_type: String = "free"
|
||||
## Season whose rule package this routine is checked against ("2026/27").
|
||||
## Empty means the season was never assigned; the app then cannot validate the
|
||||
## elements and says so instead of guessing. The season is part of the file
|
||||
|
|
|
|||
|
|
@ -10,10 +10,21 @@ extends RefCounted
|
|||
|
||||
const SUPPORTED_SCHEMA_VERSION := 1
|
||||
const ROTATION_NAMES := ["", "single", "double", "triple", "quad"]
|
||||
const PROGRAM_FREE := "free"
|
||||
const PROGRAM_ARTISTIC := "artistic"
|
||||
const PROGRAM_TYPES := [PROGRAM_FREE, PROGRAM_ARTISTIC]
|
||||
|
||||
class Category extends RefCounted:
|
||||
var code: String = ""
|
||||
var name: String = ""
|
||||
## "free" (Kür) or "artistic" (Artistic Free Skating). The same category
|
||||
## name exists in both programs with different limits.
|
||||
var program_type: String = PROGRAM_FREE
|
||||
## False when the programme is judged on components only, so the app must
|
||||
## not pretend to estimate a score.
|
||||
var scored: bool = true
|
||||
var min_jump_elements: int = 0
|
||||
var min_spins: int = 0
|
||||
var duration_seconds: int = 0
|
||||
var duration_tolerance_seconds: int = 10
|
||||
var max_jump_elements: int = 0
|
||||
|
|
@ -75,8 +86,14 @@ class Category extends RefCounted:
|
|||
errors.append("code must not be empty")
|
||||
if name.strip_edges().is_empty():
|
||||
errors.append("name must not be empty")
|
||||
if not PROGRAM_TYPES.has(program_type):
|
||||
errors.append("unknown program type '%s'" % program_type)
|
||||
if duration_seconds <= 0:
|
||||
errors.append("duration_seconds must be positive")
|
||||
if min_jump_elements < 0 or min_jump_elements > max_jump_elements:
|
||||
errors.append("min_jump_elements is out of range")
|
||||
if min_spins < 0 or min_spins > max_spins:
|
||||
errors.append("min_spins is out of range")
|
||||
for rotation: String in allowed_rotations:
|
||||
if not ROTATION_NAMES.has(rotation):
|
||||
errors.append("unknown jump rotation '%s'" % rotation)
|
||||
|
|
@ -104,18 +121,35 @@ static func load_from(path: String) -> AdultCategoryRules:
|
|||
return rules
|
||||
|
||||
|
||||
func get_categories() -> Array[Category]:
|
||||
## All categories of one programme type ("free" or "artistic").
|
||||
func get_categories(program_type: String) -> Array[Category]:
|
||||
var copy: Array[Category] = []
|
||||
for category: Category in _categories:
|
||||
if category.program_type == program_type:
|
||||
copy.append(category)
|
||||
return copy
|
||||
|
||||
|
||||
## Every category of every programme type, in file order. Used by the audit.
|
||||
func get_all_categories() -> Array[Category]:
|
||||
var copy: Array[Category] = []
|
||||
copy.assign(_categories)
|
||||
return copy
|
||||
|
||||
|
||||
func get_category(code: String) -> Category:
|
||||
return _by_code.get(code.strip_edges().to_lower(), null)
|
||||
## Looks up one category inside a programme type. The type is required on
|
||||
## purpose: "gold" exists twice with different limits, and a silent default
|
||||
## would validate an artistic programme against the free-skating rules.
|
||||
func get_category(code: String, program_type: String) -> Category:
|
||||
return _by_code.get(_key(code, program_type), null)
|
||||
|
||||
|
||||
func has_category(code: String) -> bool:
|
||||
return get_category(code) != null
|
||||
func has_category(code: String, program_type: String) -> bool:
|
||||
return get_category(code, program_type) != null
|
||||
|
||||
|
||||
static func _key(code: String, program_type: String) -> String:
|
||||
return "%s|%s" % [program_type.strip_edges().to_lower(), code.strip_edges().to_lower()]
|
||||
|
||||
|
||||
func get_errors() -> PackedStringArray:
|
||||
|
|
@ -180,9 +214,12 @@ func _parse_root(data: Dictionary) -> void:
|
|||
continue
|
||||
for message: String in category.validate():
|
||||
_errors.append("%s: %s" % [category.code, message])
|
||||
var key := category.code.to_lower()
|
||||
var key := _key(category.code, category.program_type)
|
||||
if _by_code.has(key):
|
||||
_errors.append("duplicate adult category '%s'" % category.code)
|
||||
_errors.append(
|
||||
"duplicate adult category '%s' (%s)"
|
||||
% [category.code, category.program_type]
|
||||
)
|
||||
continue
|
||||
_by_code[key] = category
|
||||
_categories.append(category)
|
||||
|
|
@ -192,6 +229,11 @@ func _parse_category(entry: Dictionary) -> Category:
|
|||
var category := Category.new()
|
||||
category.code = str(entry.get("code", "")).strip_edges()
|
||||
category.name = str(entry.get("name", "")).strip_edges()
|
||||
var program := str(entry.get("program_type", PROGRAM_FREE)).strip_edges()
|
||||
category.program_type = program.to_lower()
|
||||
category.scored = bool(entry.get("scored", true))
|
||||
category.min_jump_elements = int(entry.get("min_jump_elements", 0))
|
||||
category.min_spins = int(entry.get("min_spins", 0))
|
||||
category.duration_seconds = int(entry.get("duration_seconds", 0))
|
||||
category.duration_tolerance_seconds = int(
|
||||
entry.get("duration_tolerance_seconds", 10)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
{
|
||||
"code": "bronze",
|
||||
"name": "Bronze",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 100,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 4,
|
||||
|
|
@ -33,6 +34,7 @@
|
|||
{
|
||||
"code": "silver",
|
||||
"name": "Silver",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 4,
|
||||
|
|
@ -59,6 +61,7 @@
|
|||
{
|
||||
"code": "gold",
|
||||
"name": "Gold",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 170,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
|
|
@ -90,6 +93,7 @@
|
|||
{
|
||||
"code": "masters",
|
||||
"name": "Masters",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 180,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
|
|
@ -117,6 +121,7 @@
|
|||
{
|
||||
"code": "masters_elite",
|
||||
"name": "Masters Elite",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 180,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
|
|
@ -141,6 +146,156 @@
|
|||
"max_sequence_level": 4,
|
||||
"pcs_factor": 2.67,
|
||||
"fall_deduction": 1.0
|
||||
},
|
||||
{
|
||||
"code": "bronze",
|
||||
"name": "Bronze",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "silver",
|
||||
"name": "Silver",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "gold",
|
||||
"name": "Gold",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "masters",
|
||||
"name": "Masters",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "masters_elite",
|
||||
"name": "Masters Elite",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,13 @@
|
|||
{
|
||||
"code": "bronze",
|
||||
"name": "Bronze",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 100,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 4,
|
||||
"allowed_rotations": ["single"],
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
|
|
@ -31,10 +34,13 @@
|
|||
{
|
||||
"code": "silver",
|
||||
"name": "Silver",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 4,
|
||||
"allowed_rotations": ["single"],
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
|
|
@ -55,12 +61,20 @@
|
|||
{
|
||||
"code": "gold",
|
||||
"name": "Gold",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 170,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
"allowed_rotations": ["single", "double"],
|
||||
"allowed_rotations": [
|
||||
"single",
|
||||
"double"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": ["2F", "2Lz", "2A"],
|
||||
"forbidden_jumps": [
|
||||
"2F",
|
||||
"2Lz",
|
||||
"2A"
|
||||
],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 2,
|
||||
"max_jump_sequences": 1,
|
||||
|
|
@ -79,10 +93,14 @@
|
|||
{
|
||||
"code": "masters",
|
||||
"name": "Masters",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 180,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
"allowed_rotations": ["single", "double"],
|
||||
"allowed_rotations": [
|
||||
"single",
|
||||
"double"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": true,
|
||||
|
|
@ -103,10 +121,15 @@
|
|||
{
|
||||
"code": "masters_elite",
|
||||
"name": "Masters Elite",
|
||||
"program_type": "free",
|
||||
"duration_seconds": 180,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"max_jump_elements": 5,
|
||||
"allowed_rotations": ["single", "double", "triple"],
|
||||
"allowed_rotations": [
|
||||
"single",
|
||||
"double",
|
||||
"triple"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": true,
|
||||
|
|
@ -123,6 +146,156 @@
|
|||
"max_sequence_level": 4,
|
||||
"pcs_factor": 2.67,
|
||||
"fall_deduction": 1.0
|
||||
},
|
||||
{
|
||||
"code": "bronze",
|
||||
"name": "Bronze",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "silver",
|
||||
"name": "Silver",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "gold",
|
||||
"name": "Gold",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 90,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": false,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "masters",
|
||||
"name": "Masters",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
},
|
||||
{
|
||||
"code": "masters_elite",
|
||||
"name": "Masters Elite",
|
||||
"program_type": "artistic",
|
||||
"scored": false,
|
||||
"duration_seconds": 120,
|
||||
"duration_tolerance_seconds": 10,
|
||||
"min_jump_elements": 1,
|
||||
"max_jump_elements": 2,
|
||||
"allowed_rotations": [
|
||||
"single"
|
||||
],
|
||||
"allow_axel": true,
|
||||
"forbidden_jumps": [],
|
||||
"required_axel": false,
|
||||
"max_jump_combinations": 0,
|
||||
"max_jump_sequences": 0,
|
||||
"max_jumps_per_combination": 2,
|
||||
"min_spins": 1,
|
||||
"max_spins": 2,
|
||||
"max_step_sequences": 99,
|
||||
"max_choreographic_sequences": 99,
|
||||
"required_step_sequences": 0,
|
||||
"required_choreographic_sequences": 0,
|
||||
"requires_choreographic_spin": false,
|
||||
"max_spin_level": 4,
|
||||
"max_sequence_level": 4,
|
||||
"pcs_factor": 0.0,
|
||||
"fall_deduction": 0.0
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,10 @@ func _validate_category(
|
|||
var category_code := routine.adult_category.strip_edges()
|
||||
if category_code.is_empty() or _adult_rules == null:
|
||||
return
|
||||
var category := _adult_rules.get_category(category_code)
|
||||
var category := _adult_rules.get_category(
|
||||
category_code,
|
||||
routine.program_type
|
||||
)
|
||||
if category == null:
|
||||
_add(
|
||||
report,
|
||||
|
|
@ -216,6 +219,7 @@ func _validate_category(
|
|||
report,
|
||||
"category_jumps",
|
||||
jumps,
|
||||
category.min_jump_elements,
|
||||
category.max_jump_elements,
|
||||
"Sprungelemente",
|
||||
category.name
|
||||
|
|
@ -224,6 +228,7 @@ func _validate_category(
|
|||
report,
|
||||
"category_spins",
|
||||
spins,
|
||||
category.min_spins,
|
||||
category.max_spins,
|
||||
"Pirouetten",
|
||||
category.name
|
||||
|
|
@ -414,10 +419,12 @@ func _check_category_count(
|
|||
report: ValidationReport,
|
||||
check_code: String,
|
||||
count: int,
|
||||
minimum: int,
|
||||
maximum: int,
|
||||
label: String,
|
||||
category_name: String
|
||||
) -> void:
|
||||
var failed := false
|
||||
if count > maximum:
|
||||
_append(
|
||||
report,
|
||||
|
|
@ -425,6 +432,16 @@ func _check_category_count(
|
|||
"%s: %d, erlaubt sind max. %d (%s)."
|
||||
% [label, count, maximum, category_name]
|
||||
)
|
||||
failed = true
|
||||
if count < minimum:
|
||||
_append(
|
||||
report,
|
||||
ValidationIssue.Severity.WARNING,
|
||||
"%s: %d, mindestens %d (%s)."
|
||||
% [label, count, minimum, category_name]
|
||||
)
|
||||
failed = true
|
||||
if failed:
|
||||
_fail(report, check_code, false)
|
||||
else:
|
||||
_pass(report, check_code)
|
||||
|
|
|
|||
|
|
@ -554,10 +554,16 @@ static func _audit_adults(
|
|||
max_level = maxi(max_level, int(threshold["level"]))
|
||||
|
||||
var seen: Dictionary[String, bool] = {}
|
||||
for category: AdultCategoryRules.Category in rules.get_categories():
|
||||
var key := category.code.to_lower()
|
||||
for category: AdultCategoryRules.Category in rules.get_all_categories():
|
||||
var key := "%s|%s" % [category.program_type, category.code.to_lower()]
|
||||
if seen.has(key):
|
||||
_error(report, season, "D1", "Kategorie '%s' ist doppelt" % category.code)
|
||||
_error(
|
||||
report,
|
||||
season,
|
||||
"D1",
|
||||
"Kategorie '%s' (%s) ist doppelt"
|
||||
% [category.code, category.program_type]
|
||||
)
|
||||
seen[key] = true
|
||||
if category.duration_seconds < 60 or category.duration_seconds > 300:
|
||||
_error(
|
||||
|
|
@ -668,15 +674,18 @@ static func _audit_adults(
|
|||
report,
|
||||
season,
|
||||
"D9",
|
||||
"Kategorie '%s' verlangt ChSp, das der Katalog nicht kennt"
|
||||
% category.code
|
||||
"Kategorie '%s' (%s) verlangt ChSp, das der Katalog nicht kennt"
|
||||
% [category.code, category.program_type]
|
||||
)
|
||||
if category.pcs_factor <= 0.0 or category.fall_deduction < 0.0:
|
||||
if (category.scored and category.pcs_factor <= 0.0) or (
|
||||
category.fall_deduction < 0.0
|
||||
):
|
||||
_error(
|
||||
report,
|
||||
season,
|
||||
"D10",
|
||||
"Kategorie '%s' hat unplausible Faktoren" % category.code
|
||||
"Kategorie '%s' (%s) hat unplausible Faktoren"
|
||||
% [category.code, category.program_type]
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -193,19 +193,19 @@ static func _compare_category(
|
|||
return
|
||||
var new_category: AdultCategoryRules.Category = null
|
||||
if target.adult != null:
|
||||
new_category = target.adult.get_category(code)
|
||||
new_category = target.adult.get_category(code, routine.program_type)
|
||||
if new_category == null:
|
||||
_add(
|
||||
report,
|
||||
KIND_CATEGORY_MISSING,
|
||||
_category_name(code, source),
|
||||
_category_name(code, routine.program_type, source),
|
||||
"",
|
||||
""
|
||||
)
|
||||
return
|
||||
if source == null or source.adult == null:
|
||||
return
|
||||
var old_category := source.adult.get_category(code)
|
||||
var old_category := source.adult.get_category(code, routine.program_type)
|
||||
if old_category == null:
|
||||
return
|
||||
|
||||
|
|
@ -221,12 +221,24 @@ static func _compare_category(
|
|||
str(old_category.max_jump_elements),
|
||||
str(new_category.max_jump_elements)
|
||||
)
|
||||
_compare_field(
|
||||
report,
|
||||
I18n.t("Sprungelemente min."),
|
||||
str(old_category.min_jump_elements),
|
||||
str(new_category.min_jump_elements)
|
||||
)
|
||||
_compare_field(
|
||||
report,
|
||||
I18n.t("Pirouetten max."),
|
||||
str(old_category.max_spins),
|
||||
str(new_category.max_spins)
|
||||
)
|
||||
_compare_field(
|
||||
report,
|
||||
I18n.t("Pirouetten min."),
|
||||
str(old_category.min_spins),
|
||||
str(new_category.min_spins)
|
||||
)
|
||||
_compare_field(
|
||||
report,
|
||||
I18n.t("Schrittsequenzen max."),
|
||||
|
|
@ -301,9 +313,13 @@ static func _add(
|
|||
report.changes.append(change)
|
||||
|
||||
|
||||
static func _category_name(code: String, source: RulesPackage) -> String:
|
||||
static func _category_name(
|
||||
code: String,
|
||||
program_type: String,
|
||||
source: RulesPackage
|
||||
) -> String:
|
||||
if source != null and source.adult != null:
|
||||
var category := source.adult.get_category(code)
|
||||
var category := source.adult.get_category(code, program_type)
|
||||
if category != null:
|
||||
return category.name
|
||||
return code.capitalize()
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ const UPDATE_FILE_NAMES := {
|
|||
@onready var element_feature_menu: PopupMenu = %ElementFeatureMenu
|
||||
@onready var validation_button: Button = %ValidationButton
|
||||
@onready var season_option: OptionButton = %SeasonOption
|
||||
@onready var program_option: OptionButton = %ProgramOption
|
||||
@onready var adult_category_option: OptionButton = %AdultCategoryOption
|
||||
@onready var validation_dialog: AcceptDialog = %ValidationDialog
|
||||
@onready var upgrade_dialog: AcceptDialog = %UpgradeDialog
|
||||
|
|
@ -453,6 +454,7 @@ func _ready() -> void:
|
|||
_setup_timing_controls()
|
||||
_setup_element_controls()
|
||||
_setup_season_controls()
|
||||
_setup_program_controls()
|
||||
_setup_upgrade_controls()
|
||||
_setup_adult_category_controls()
|
||||
_setup_export_controls()
|
||||
|
|
@ -919,22 +921,19 @@ func _render_validation_dialog() -> void:
|
|||
and not _routine.adult_category.is_empty()
|
||||
and _adult_rules != null
|
||||
):
|
||||
category = _adult_rules.get_category(_routine.adult_category)
|
||||
category = _adult_rules.get_category(
|
||||
_routine.adult_category,
|
||||
_routine.program_type
|
||||
)
|
||||
var category_name := "Ohne Kategorie"
|
||||
if category != null:
|
||||
category_name = "%s · %s ±%d s" % [
|
||||
category_name = "%s · %s · %s ±%d s" % [
|
||||
category.name,
|
||||
_program_label(category.program_type),
|
||||
_format_duration(category.duration_seconds),
|
||||
category.duration_tolerance_seconds,
|
||||
]
|
||||
lines.append("[b]Kategorie: %s[/b]" % category_name)
|
||||
if category != null:
|
||||
lines.append(
|
||||
"[color=#94a3b8]%s[/color]"
|
||||
% I18n.t(
|
||||
"Die Kategorie-Grenzen gelten für die Kür; Artistic wird nicht geprüft."
|
||||
)
|
||||
)
|
||||
lines.append("")
|
||||
lines.append(
|
||||
"[b]Basiswert: %s[/b]" % _format_base_value(report.base_value_total)
|
||||
|
|
@ -956,7 +955,7 @@ func _render_validation_dialog() -> void:
|
|||
if _show_score_info:
|
||||
lines.append("")
|
||||
lines.append_array(_score_info_lines())
|
||||
if category != null:
|
||||
if category != null and category.scored:
|
||||
var pcs_total := (
|
||||
_routine.assumed_pcs_average * 3.0 * category.pcs_factor
|
||||
)
|
||||
|
|
@ -992,6 +991,15 @@ func _render_validation_dialog() -> void:
|
|||
"[url=score_assumptions][color=#60a5fa]%s[/color][/url]"
|
||||
% assumptions_label
|
||||
)
|
||||
elif category != null:
|
||||
lines.append("")
|
||||
lines.append("[b]Punktschätzung[/b]")
|
||||
lines.append(
|
||||
"[color=#94a3b8]%s[/color]"
|
||||
% I18n.t(
|
||||
"Artistic wird nur über die Programmkomponenten bewertet; keine Punktschätzung."
|
||||
)
|
||||
)
|
||||
else:
|
||||
lines.append(
|
||||
"[color=#94a3b8]PCS und Abzüge: Kategorie wählen.[/color]"
|
||||
|
|
@ -2866,7 +2874,9 @@ func _setup_adult_category_controls() -> void:
|
|||
adult_category_option.add_item("Ohne Kategorie", 0)
|
||||
adult_category_option.set_item_metadata(0, "")
|
||||
if _adult_rules != null:
|
||||
for category: AdultCategoryRules.Category in _adult_rules.get_categories():
|
||||
for category: AdultCategoryRules.Category in _adult_rules.get_categories(
|
||||
_program_type()
|
||||
):
|
||||
var index := adult_category_option.item_count
|
||||
adult_category_option.add_item(category.name, index)
|
||||
adult_category_option.set_item_metadata(index, category.code)
|
||||
|
|
@ -2877,6 +2887,72 @@ func _setup_adult_category_controls() -> void:
|
|||
_sync_adult_category_option()
|
||||
|
||||
|
||||
## Programme type of the current routine: "free" (Kür) or "artistic".
|
||||
func _program_type() -> String:
|
||||
if _routine == null:
|
||||
return AdultCategoryRules.PROGRAM_FREE
|
||||
return _routine.program_type
|
||||
|
||||
|
||||
func _setup_program_controls() -> void:
|
||||
if program_option == null:
|
||||
return
|
||||
program_option.clear()
|
||||
program_option.add_item(I18n.t("Kür"), 0)
|
||||
program_option.set_item_metadata(0, AdultCategoryRules.PROGRAM_FREE)
|
||||
program_option.add_item(I18n.t("Artistic"), 1)
|
||||
program_option.set_item_metadata(1, AdultCategoryRules.PROGRAM_ARTISTIC)
|
||||
if not program_option.item_selected.is_connected(_on_program_selected):
|
||||
program_option.item_selected.connect(_on_program_selected)
|
||||
_sync_program_option()
|
||||
|
||||
|
||||
func _sync_program_option() -> void:
|
||||
if program_option == null:
|
||||
return
|
||||
var program := _program_type()
|
||||
for index: int in range(program_option.item_count):
|
||||
if str(program_option.get_item_metadata(index)) == program:
|
||||
program_option.select(index)
|
||||
return
|
||||
program_option.select(0)
|
||||
|
||||
|
||||
func _on_program_selected(index: int) -> void:
|
||||
set_program_type(str(program_option.get_item_metadata(index)))
|
||||
|
||||
|
||||
## Switches between Kür and Artistic. The category code stays; the limits of
|
||||
## the selected programme type apply from now on.
|
||||
func set_program_type(program_type: String) -> bool:
|
||||
if _routine == null:
|
||||
return false
|
||||
var cleaned := program_type.strip_edges().to_lower()
|
||||
if not AdultCategoryRules.PROGRAM_TYPES.has(cleaned):
|
||||
return false
|
||||
if _routine.program_type == cleaned:
|
||||
return false
|
||||
_record_undo()
|
||||
_routine.program_type = cleaned
|
||||
_sync_program_option()
|
||||
_setup_adult_category_controls()
|
||||
_mark_dirty()
|
||||
_update_status()
|
||||
if validation_dialog != null and validation_dialog.visible:
|
||||
_render_validation_dialog()
|
||||
return true
|
||||
|
||||
|
||||
func get_program_type() -> String:
|
||||
return _program_type()
|
||||
|
||||
|
||||
func _program_label(program_type: String) -> String:
|
||||
if program_type == AdultCategoryRules.PROGRAM_ARTISTIC:
|
||||
return I18n.t("Artistic")
|
||||
return I18n.t("Kür")
|
||||
|
||||
|
||||
func _on_adult_category_selected(index: int) -> void:
|
||||
set_adult_category(str(adult_category_option.get_item_metadata(index)))
|
||||
|
||||
|
|
@ -2887,7 +2963,10 @@ func set_adult_category(code: String) -> bool:
|
|||
var cleaned := code.strip_edges().to_lower()
|
||||
if (
|
||||
not cleaned.is_empty()
|
||||
and (_adult_rules == null or not _adult_rules.has_category(cleaned))
|
||||
and (
|
||||
_adult_rules == null
|
||||
or not _adult_rules.has_category(cleaned, _program_type())
|
||||
)
|
||||
):
|
||||
return false
|
||||
if _routine.adult_category == cleaned:
|
||||
|
|
@ -5855,6 +5934,7 @@ func _install_routine(
|
|||
segment.normalize_jump_combination()
|
||||
_apply_rules_for_season(_routine.season)
|
||||
_sync_season_option()
|
||||
_sync_program_option()
|
||||
_setup_adult_category_controls()
|
||||
|
||||
var valid_sections: Array[RoutineSection] = []
|
||||
|
|
|
|||
|
|
@ -336,6 +336,8 @@ static func _routine_subtitle(routine: Routine, section_count: int) -> String:
|
|||
var skater := routine.skater_name.strip_edges()
|
||||
if not skater.is_empty():
|
||||
parts.append(skater)
|
||||
if routine.program_type == AdultCategoryRules.PROGRAM_ARTISTIC:
|
||||
parts.append(I18n.t("Artistic"))
|
||||
var category := routine.adult_category.strip_edges()
|
||||
if not category.is_empty():
|
||||
parts.append("Kategorie: %s" % category.capitalize())
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ func _init() -> void:
|
|||
_validator = RoutineValidatorScript.new(_catalog, _rules, _adult)
|
||||
|
||||
_test_metadata()
|
||||
_test_artistic_categories()
|
||||
_test_artistic_validation()
|
||||
_test_category_fields()
|
||||
_test_jump_permissions()
|
||||
_test_gold_limits()
|
||||
|
|
@ -48,16 +50,118 @@ func _test_metadata() -> void:
|
|||
_check(_adult.season == "2026/27", "adult rules season is 2026/27")
|
||||
_check(_adult.source.contains("Adult"), "adult rules name the adult announcement")
|
||||
_check(
|
||||
_adult.get_categories().size() == 5,
|
||||
_adult.get_categories("free").size() == 5,
|
||||
"five adult categories are available"
|
||||
)
|
||||
_check(_adult.has_category("gold"), "Gold category exists")
|
||||
_check(_adult.has_category("silver"), "Silver category exists")
|
||||
_check(_adult.has_category("bronze"), "Bronze category exists")
|
||||
_check(_adult.has_category("gold", "free"), "Gold category exists")
|
||||
_check(_adult.has_category("silver", "free"), "Silver category exists")
|
||||
_check(_adult.has_category("bronze", "free"), "Bronze category exists")
|
||||
|
||||
|
||||
func _test_artistic_categories() -> void:
|
||||
_check(
|
||||
_adult.get_categories("artistic").size() == 5,
|
||||
"five artistic categories are available"
|
||||
)
|
||||
var gold := _adult.get_category("gold", "artistic")
|
||||
_check(gold != null, "artistic Gold exists")
|
||||
if gold == null:
|
||||
return
|
||||
_check(not gold.scored, "artistic is not scored")
|
||||
_check(gold.duration_seconds == 90, "artistic Gold lasts 1:30")
|
||||
_check(
|
||||
gold.min_jump_elements == 1 and gold.max_jump_elements == 2,
|
||||
"artistic Gold allows one or two jumps"
|
||||
)
|
||||
_check(
|
||||
gold.min_spins == 1 and gold.max_spins == 2,
|
||||
"artistic Gold allows one or two spins"
|
||||
)
|
||||
_check(not gold.allow_axel, "artistic Gold forbids the axel")
|
||||
_check(
|
||||
gold.max_jump_combinations == 0,
|
||||
"artistic Gold forbids combinations"
|
||||
)
|
||||
var masters := _adult.get_category("masters", "artistic")
|
||||
_check(masters != null, "artistic Masters exists")
|
||||
if masters != null:
|
||||
_check(masters.allow_axel, "artistic Masters allows the axel")
|
||||
_check(masters.duration_seconds == 120, "artistic Masters lasts 2:00")
|
||||
var free_gold := _adult.get_category("gold", "free")
|
||||
_check(
|
||||
free_gold != null and free_gold.scored and free_gold.duration_seconds == 170,
|
||||
"the free-skating Gold is unchanged"
|
||||
)
|
||||
_check(gold != free_gold, "the two Gold categories are distinct")
|
||||
|
||||
|
||||
func _test_artistic_validation() -> void:
|
||||
# A routine without elements misses the required jump and spin.
|
||||
var empty := _make_routine("gold")
|
||||
empty.program_type = "artistic"
|
||||
_check(
|
||||
_has_message(_validator.validate_report(empty), "mindestens 1"),
|
||||
"artistic requires at least one jump and one spin"
|
||||
)
|
||||
|
||||
# One or two single jumps and spins are fine.
|
||||
var valid := _make_routine("gold")
|
||||
valid.program_type = "artistic"
|
||||
_add_jump(valid.sections[0], "1T")
|
||||
_add_jump(valid.sections[0], "1S")
|
||||
_add_spin(valid.sections[0], "spin-1", "USp", 0)
|
||||
_add_spin(valid.sections[0], "spin-2", "LSp", 0)
|
||||
var valid_report := _validator.validate_report(valid)
|
||||
_check(
|
||||
not _has_message(valid_report, "nicht erlaubt"),
|
||||
"artistic Gold allows single jumps"
|
||||
)
|
||||
_check(
|
||||
not _has_message(valid_report, "erlaubt sind max. 2"),
|
||||
"two jumps and two spins stay within the limit"
|
||||
)
|
||||
|
||||
var axel := _make_routine("gold")
|
||||
axel.program_type = "artistic"
|
||||
_add_jump(axel.sections[0], "1A")
|
||||
_check(
|
||||
_has_message(_validator.validate_report(axel), "nicht erlaubt"),
|
||||
"artistic Gold forbids the axel"
|
||||
)
|
||||
|
||||
var doubled := _make_routine("gold")
|
||||
doubled.program_type = "artistic"
|
||||
_add_jump(doubled.sections[0], "2T")
|
||||
_check(
|
||||
_has_message(_validator.validate_report(doubled), "nicht erlaubt"),
|
||||
"artistic forbids double jumps"
|
||||
)
|
||||
|
||||
var combination := _make_routine("gold")
|
||||
combination.program_type = "artistic"
|
||||
_add_jump(
|
||||
combination.sections[0],
|
||||
"1T",
|
||||
PathSegment.JumpKind.COMBINATION,
|
||||
["1S"]
|
||||
)
|
||||
_check(
|
||||
_has_message(_validator.validate_report(combination), "Sprungkombinationen"),
|
||||
"artistic forbids jump combinations"
|
||||
)
|
||||
|
||||
var masters := _make_routine("masters")
|
||||
masters.program_type = "artistic"
|
||||
_add_jump(masters.sections[0], "1A")
|
||||
_add_spin(masters.sections[0], "spin-1", "USp", 0)
|
||||
_check(
|
||||
not _has_message(_validator.validate_report(masters), "nicht erlaubt"),
|
||||
"artistic Masters allows the axel"
|
||||
)
|
||||
|
||||
|
||||
func _test_category_fields() -> void:
|
||||
var gold := _adult.get_category("gold")
|
||||
var gold := _adult.get_category("gold", "free")
|
||||
_check(gold.duration_seconds == 170, "Gold lasts 2:50")
|
||||
_check(gold.max_jump_elements == 5, "Gold allows five jump elements")
|
||||
_check(gold.max_spins == 3, "Gold allows three spins")
|
||||
|
|
@ -69,7 +173,7 @@ func _test_category_fields() -> void:
|
|||
_check_approx(gold.pcs_factor, 2.67, "Gold PCS factor")
|
||||
_check_approx(gold.fall_deduction, 1.0, "Gold fall deduction")
|
||||
|
||||
var silver := _adult.get_category("silver")
|
||||
var silver := _adult.get_category("silver", "free")
|
||||
_check(silver.duration_seconds == 120, "Silver lasts 2:00")
|
||||
_check(silver.max_spins == 2, "Silver allows two spins")
|
||||
_check(silver.max_choreographic_sequences == 1, "Silver uses a choreo sequence")
|
||||
|
|
@ -77,7 +181,7 @@ func _test_category_fields() -> void:
|
|||
_check(silver.max_spin_level == 2, "Silver caps spins at Level 2")
|
||||
_check_approx(silver.pcs_factor, 2.0, "Silver PCS factor")
|
||||
|
||||
var bronze := _adult.get_category("bronze")
|
||||
var bronze := _adult.get_category("bronze", "free")
|
||||
_check(bronze.duration_seconds == 100, "Bronze lasts 1:40")
|
||||
_check(not bronze.allow_axel, "Bronze forbids Axel jumps")
|
||||
_check(bronze.max_jump_combinations == 1, "Bronze allows one jump combination")
|
||||
|
|
@ -85,27 +189,27 @@ func _test_category_fields() -> void:
|
|||
|
||||
|
||||
func _test_jump_permissions() -> void:
|
||||
var bronze := _adult.get_category("bronze")
|
||||
var bronze := _adult.get_category("bronze", "free")
|
||||
_check(bronze.is_jump_allowed("1T"), "Bronze allows 1T")
|
||||
_check(not bronze.is_jump_allowed("1A"), "Bronze forbids 1A")
|
||||
_check(not bronze.is_jump_allowed("2T"), "Bronze forbids doubles")
|
||||
|
||||
var silver := _adult.get_category("silver")
|
||||
var silver := _adult.get_category("silver", "free")
|
||||
_check(silver.is_jump_allowed("1A"), "Silver allows 1A")
|
||||
_check(not silver.is_jump_allowed("2T"), "Silver forbids doubles")
|
||||
|
||||
var gold := _adult.get_category("gold")
|
||||
var gold := _adult.get_category("gold", "free")
|
||||
_check(gold.is_jump_allowed("1A"), "Gold allows 1A")
|
||||
_check(gold.is_jump_allowed("2T"), "Gold allows 2T")
|
||||
_check(not gold.is_jump_allowed("2Lz"), "Gold forbids 2Lz")
|
||||
_check(not gold.is_jump_allowed("2A"), "Gold forbids 2A")
|
||||
_check(not gold.is_jump_allowed("3T"), "Gold forbids triples")
|
||||
|
||||
var masters := _adult.get_category("masters")
|
||||
var masters := _adult.get_category("masters", "free")
|
||||
_check(masters.is_jump_allowed("2A"), "Masters allows 2A")
|
||||
_check(not masters.is_jump_allowed("3T"), "Masters forbids triples")
|
||||
|
||||
var elite := _adult.get_category("masters_elite")
|
||||
var elite := _adult.get_category("masters_elite", "free")
|
||||
_check(elite.is_jump_allowed("3T"), "Masters Elite allows triples")
|
||||
_check(not elite.is_jump_allowed("4T"), "Masters Elite forbids quads")
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ func _test_json_roundtrip() -> void:
|
|||
)
|
||||
_check(loaded.adult_category == routine.adult_category, "category survives")
|
||||
_check(loaded.season == routine.season, "season survives")
|
||||
_check(loaded.program_type == routine.program_type, "programme type survives")
|
||||
_check_approx(
|
||||
loaded.assumed_pcs_average,
|
||||
routine.assumed_pcs_average,
|
||||
|
|
@ -380,6 +381,7 @@ func _make_routine() -> Routine:
|
|||
]
|
||||
routine.adult_category = "gold"
|
||||
routine.season = "2026/27"
|
||||
routine.program_type = "artistic"
|
||||
routine.assumed_pcs_average = 4.75
|
||||
routine.assumed_falls = 1
|
||||
routine.rink = RinkDimensions.new()
|
||||
|
|
|
|||
|
|
@ -192,8 +192,8 @@ func _test_season_pair_difference() -> void:
|
|||
)
|
||||
|
||||
# The two documented adult differences between the seasons.
|
||||
var old_gold := older.adult.get_category("gold")
|
||||
var new_gold := newer.adult.get_category("gold")
|
||||
var old_gold := older.adult.get_category("gold", "free")
|
||||
var new_gold := newer.adult.get_category("gold", "free")
|
||||
_check(
|
||||
old_gold != null and not old_gold.requires_choreographic_spin,
|
||||
"2025/26 Gold does not require a choreographic spin"
|
||||
|
|
|
|||
|
|
@ -1791,6 +1791,50 @@ func _run() -> void:
|
|||
controller.upgrade_dialog.hide()
|
||||
controller.validation_dialog.hide()
|
||||
|
||||
# Programmtyp: Artistic hat eigene Grenzen und keine Punktschätzung.
|
||||
controller.new_routine()
|
||||
_check(
|
||||
controller.get_program_type() == "free",
|
||||
"a new routine is a free-skating programme"
|
||||
)
|
||||
_check(
|
||||
controller.set_adult_category("gold"),
|
||||
"Gold is available for free skating"
|
||||
)
|
||||
controller.open_validation_dialog()
|
||||
_check(
|
||||
controller.validation_text.text.contains("Geschätzte Summe"),
|
||||
"free skating shows a score estimate"
|
||||
)
|
||||
controller.validation_dialog.hide()
|
||||
|
||||
_check(
|
||||
controller.set_program_type("artistic"),
|
||||
"the programme type can be switched to artistic"
|
||||
)
|
||||
_check(
|
||||
controller.get_program_type() == "artistic",
|
||||
"the routine stores the programme type"
|
||||
)
|
||||
controller.open_validation_dialog()
|
||||
_check(
|
||||
controller.validation_text.text.contains("keine Punktschätzung"),
|
||||
"artistic shows no score estimate"
|
||||
)
|
||||
_check(
|
||||
controller.validation_text.text.contains("Gold · Artistic"),
|
||||
"the header names the programme type"
|
||||
)
|
||||
_check(
|
||||
controller.validation_text.text.contains("mindestens 1"),
|
||||
"artistic reports the required minimum"
|
||||
)
|
||||
controller.validation_dialog.hide()
|
||||
_check(
|
||||
not controller.set_program_type("ballett"),
|
||||
"unknown programme types are rejected"
|
||||
)
|
||||
|
||||
controller.new_routine()
|
||||
|
||||
# Structured jump combination in the element dialog.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue