fix: HUD-Klicks (Dialogebene schluckte sie); Musik durch CC0-Titel ersetzt

This commit is contained in:
torsten 2026-11-17 19:52:05 +01:00
parent a622c7c238
commit e213a7477a
109 changed files with 274 additions and 441 deletions

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ddi6d1xkv0l4k"
path="res://.godot/imported/musik_kampf.ogg-662f0754fefdcd83ae4f03638b8002c6.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_kampf.ogg"
dest_files=["res://.godot/imported/musik_kampf.ogg-662f0754fefdcd83ae4f03638b8002c6.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cjsq6tduve40g"
path="res://.godot/imported/musik_kampf.wav-ab481ac0856e989d3e966bca35987c07.sample"
[deps]
source_file="res://assets/audio/musik/musik_kampf.wav"
dest_files=["res://.godot/imported/musik_kampf.wav-ab481ac0856e989d3e966bca35987c07.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://c0ihc4ovg6rnm"
path="res://.godot/imported/musik_krypta.ogg-0329a89e70d1c32ff9c4fdca005feeec.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_krypta.ogg"
dest_files=["res://.godot/imported/musik_krypta.ogg-0329a89e70d1c32ff9c4fdca005feeec.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://d0iyq6an7faxc"
path="res://.godot/imported/musik_krypta.wav-98278fc00add013f65fca259ee2d1814.sample"
[deps]
source_file="res://assets/audio/musik/musik_krypta.wav"
dest_files=["res://.godot/imported/musik_krypta.wav-98278fc00add013f65fca259ee2d1814.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://cex4srv6kdxr5"
path="res://.godot/imported/musik_land.ogg-9620ed28e300b4d2742d86200f40baa5.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_land.ogg"
dest_files=["res://.godot/imported/musik_land.ogg-9620ed28e300b4d2742d86200f40baa5.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cv6xqfnomf08h"
path="res://.godot/imported/musik_land.wav-8c5303f75d52dbfe181e8d693fa9441b.sample"
[deps]
source_file="res://assets/audio/musik/musik_land.wav"
dest_files=["res://.godot/imported/musik_land.wav-8c5303f75d52dbfe181e8d693fa9441b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View file

@ -0,0 +1,19 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://dwbrqucmflk5m"
path="res://.godot/imported/musik_stadt.ogg-c8da8dc186e3fd741a77f10a93d6958c.oggvorbisstr"
[deps]
source_file="res://assets/audio/musik/musik_stadt.ogg"
dest_files=["res://.godot/imported/musik_stadt.ogg-c8da8dc186e3fd741a77f10a93d6958c.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View file

@ -1,24 +0,0 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bdmambyl2770b"
path="res://.godot/imported/musik_stadt.wav-2448a512acdf2ec5793a765250610a5b.sample"
[deps]
source_file="res://assets/audio/musik/musik_stadt.wav"
dest_files=["res://.godot/imported/musik_stadt.wav-2448a512acdf2ec5793a765250610a5b.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 1,004 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 569 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 579 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 556 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 605 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 431 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 397 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 416 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,003 B

After

Width:  |  Height:  |  Size: 942 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

After

Width:  |  Height:  |  Size: 979 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 B

After

Width:  |  Height:  |  Size: 565 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

After

Width:  |  Height:  |  Size: 718 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

After

Width:  |  Height:  |  Size: 558 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 697 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 522 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 688 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 526 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 731 B

After

Width:  |  Height:  |  Size: 684 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 546 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 748 B

After

Width:  |  Height:  |  Size: 693 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 B

After

Width:  |  Height:  |  Size: 508 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

After

Width:  |  Height:  |  Size: 708 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 602 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

After

Width:  |  Height:  |  Size: 776 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

After

Width:  |  Height:  |  Size: 586 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 823 B

After

Width:  |  Height:  |  Size: 753 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 593 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 B

After

Width:  |  Height:  |  Size: 760 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

After

Width:  |  Height:  |  Size: 590 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 755 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

After

Width:  |  Height:  |  Size: 603 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 B

After

Width:  |  Height:  |  Size: 788 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 622 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 871 B

After

Width:  |  Height:  |  Size: 804 B

Before After
Before After

View file

@ -960,6 +960,10 @@ func _dialog_bauen() -> void:
var wurzel := Control.new()
wurzel.theme = THEME.baue()
wurzel.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
# Der Dialog liegt auf einer höheren Ebene als das HUD. Ein Control mit
# Standard-Filter (STOP) über den ganzen Bildschirm schluckt jeden Klick —
# Inventar und Ton wären dann tot, obwohl der Dialog unsichtbar ist.
wurzel.mouse_filter = Control.MOUSE_FILTER_IGNORE
ebene.add_child(wurzel)
var schild := PanelContainer.new()
@ -981,6 +985,8 @@ func _dialog_bauen() -> void:
_dialog_text.autowrap_mode = TextServer.AUTOWRAP_WORD
_dialog.add_child(_dialog_text)
_dialog.mouse_filter = Control.MOUSE_FILTER_IGNORE
schild.mouse_filter = Control.MOUSE_FILTER_IGNORE
_dialog.visible = false
schild.visible = false
_dialog.set_meta("schild", schild)

View file

@ -1,8 +1,8 @@
extends Node
## Audio: Musik, Effekte und die zwei Schalter aus den Einstellungen.
##
## Autoload `Audio`. Die Klänge selbst sind synthetisiert
## (`art/tools/klaenge.py`, `art/tools/musik.py`) — keine Lizenzfrage.
## Autoload `Audio`. Effekte sind synthetisiert (`art/tools/klaenge.py`),
## die Musik ist CC0 von OpenGameArt (Quellen im Lizenzlog).
##
## Aufbau:
## * zwei Musikspieler für die Überblendung (alter Titel aus, neuer ein),
@ -95,7 +95,7 @@ func musik(name: String) -> void:
if musik_an and not _musik[_musik_aktiv].playing:
_musik[_musik_aktiv].play()
return
var pfad := MUSIK_PFAD + "musik_%s.wav" % name
var pfad := MUSIK_PFAD + "musik_%s.ogg" % name
if not ResourceLoader.exists(pfad):
push_warning("Musik fehlt: " + pfad)
return
@ -141,15 +141,20 @@ func _musik_db() -> float:
return linear_to_db(maxf(musik_laut, 0.0001)) - 6.0
## WAV-Schleife zur Laufzeit setzen: die Importdateien kennen kein Loop-Flag,
## und Musik ohne Schleife wäre nach 30 Sekunden still.
## Schleife zur Laufzeit setzen: die Importdateien kennen kein Loop-Flag, und
## Musik ohne Schleife wäre nach zwei Minuten still.
func _schleife(stream: AudioStream) -> AudioStream:
if stream is AudioStreamWAV:
if stream is AudioStreamOggVorbis:
(stream as AudioStreamOggVorbis).loop = true
(stream as AudioStreamOggVorbis).loop_offset = 0.0
elif stream is AudioStreamWAV:
var w := stream as AudioStreamWAV
if w.loop_mode == AudioStreamWAV.LOOP_DISABLED:
w.loop_mode = AudioStreamWAV.LOOP_FORWARD
w.loop_begin = 0
w.loop_end = int(w.data.size() / 2.0)
elif stream is AudioStreamMP3:
(stream as AudioStreamMP3).loop = true
return stream

View file

@ -40,9 +40,9 @@ func _ready() -> void:
var musik: AudioStreamPlayer = Audio.get("_musik")[Audio.get("_musik_aktiv")]
ok("Musik läuft", musik.playing)
var stream := musik.stream
ok("Musik ist WAV", stream is AudioStreamWAV)
ok("Musik schleift", stream is AudioStreamWAV
and (stream as AudioStreamWAV).loop_mode == AudioStreamWAV.LOOP_FORWARD)
ok("Musik ist Ogg Vorbis", stream is AudioStreamOggVorbis)
ok("Musik schleift", stream is AudioStreamOggVorbis
and (stream as AudioStreamOggVorbis).loop)
Audio.musik("kampf")
ok("Titelwechsel", str(Audio.get("_musik_name")) == "kampf")

90
game/tools/probe_klick.gd Normal file
View file

@ -0,0 +1,90 @@
extends Node
## Prüft, ob die Knöpfe im Karten-HUD wirklich Klicks bekommen.
##
## godot --path game res://tools/probe_klick.tscn -- --ohne-erstellung
##
## Kein `--check`: das Hauptprogramm deutet den Schalter als eigene
## Selbstprüfung und beendet sich, bevor die Probe klicken kann. Die Probe
## beendet sich selbst mit Exit-Code 1 bei Fehlern.
##
## Hintergrund: die Dialogebene lag mit einem bildschirmgroßen Control über dem
## HUD und schluckte jeden Klick — Inventar und Ton waren tot, obwohl der
## Dialog unsichtbar war. Die Probe hält das fest.
var fehler := 0
var _haupt: Node
func _ready() -> void:
_haupt = load("res://main.tscn").instantiate()
add_child(_haupt)
await get_tree().create_timer(1.4).timeout
_haupt._gebiet_betreten("garana")
await get_tree().create_timer(1.2).timeout
await _pruefe("garana", "Stadt")
_haupt._gebiet_betreten("westmark")
await get_tree().create_timer(1.2).timeout
await _pruefe("westmark", "Land")
print("\nProbe: %s" % ("bestanden" if fehler == 0 else "FEHLGESCHLAGEN"))
get_tree().quit(0 if fehler == 0 else 1)
func _pruefe(karte: String, name: String) -> void:
var g: Node = _haupt._aktuell
ok("%s geladen" % name, str(g.get("karte_id")) == karte)
var inventar := _finde(g.get("_ui"), "INVENTAR")
ok("%s: Inventar-Knopf da" % name, inventar != null)
if inventar == null:
return
await _klick(inventar.get_global_rect().get_center())
ok("%s: Inventar öffnet per Klick" % name, g.get("_inventar") != null)
g.call("_inventar_schliessen")
await get_tree().process_frame
var ton := _finde(g.get("_ui"), "TON")
ok("%s: Ton-Knopf da" % name, ton != null)
if ton == null:
return
await _klick(ton.get_global_rect().get_center())
await get_tree().process_frame
ok("%s: Ton-Fenster öffnet per Klick" % name, g.get("_ton") != null)
g.call("_einstellungen_schliessen")
await get_tree().process_frame
func _finde(eltern: Node, text: String) -> Button:
if eltern == null:
return null
for kind in eltern.get_children():
if kind is Button and (kind as Button).text == text:
return kind
var treffer := _finde(kind, text)
if treffer != null:
return treffer
return null
func _klick(pos: Vector2) -> void:
var m := InputEventMouseMotion.new()
m.position = pos
m.global_position = pos
Input.parse_input_event(m)
await get_tree().process_frame
for gedrueckt in [true, false]:
var e := InputEventMouseButton.new()
e.position = pos
e.global_position = pos
e.button_index = MOUSE_BUTTON_LEFT
e.pressed = gedrueckt
Input.parse_input_event(e)
await get_tree().process_frame
await get_tree().process_frame
func ok(name: String, wahr: bool) -> void:
if not wahr:
fehler += 1
print(" %s %s" % [("ok " if wahr else "FEHL"), name])

View file

@ -0,0 +1 @@
uid://b8vf85qymh122

View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://tools/probe_klick.gd" id="1_klick"]
[node name="ProbeKlick" type="Node"]
script = ExtResource("1_klick")