Loadout-Katalog im Kern, Himmel zuerst aus dem Projekt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
slyphax 2026-11-01 19:34:04 +01:00
parent d0388d243b
commit d196086cce
3 changed files with 3212 additions and 2 deletions

3206
library/loadout_katalog.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -9,9 +9,9 @@ extends RefCounted
## — Aufsatz-Text nur mit Abweichungen vom Standard (Draht-Format wie im Client).
## In beiden Modi optional: grenades:{id: anzahl} und mines:anzahl = Vorrat pro
## Leben für Spieler und Bots; fehlen sie, gilt der Standard des Servers.
## Katalog-Quelle: library/loadout_katalog.json (tools/sync_loadout_katalog.py).
## Katalog-Quelle: core/library/loadout_katalog.json (tools/sync_loadout_katalog.py).
const PATH := "res://library/loadout_katalog.json"
const PATH := "res://core/library/loadout_katalog.json"
const MODE_FIXED := "fixed"
const MODE_PLAYER := "player"

View file

@ -68,6 +68,10 @@ static func textur_rel(id: String) -> String:
## Absoluter Pfad im Nachbar-Klon ("" = ID unbekannt oder kein Client-Klon).
static func textur_pfad(id: String) -> String:
# Im Spiel liegen die Himmel im eigenen Projekt.
var im_projekt := "res://" + textur_rel(id)
if not textur_rel(id).is_empty() and ResourceLoader.exists(im_projekt):
return im_projekt
var rel := textur_rel(id)
if rel.is_empty():
return ""