Files
zombie-fps/tools/export_weapons.gd
T
enne2 956a15a525 Add industrial metal soundtrack with seamless loop
- assets/audio/music/zombie_industrial_loop.ogg: 57.60 s Ogg Vorbis loop
  generated locally with YuE2-3B on the Tesla V100 (score written for this
  track; vocals removed with HTDemucs). The loop is spliced at the track's
  structural repeat with a 0.6 s crossfade: measured seam dip <= 1.6 dB.
- scripts/main.gd: "Music" AudioStreamPlayer at -11 dB, started at boot on
  desktop and on the start click on Web (browser autoplay policy). It forces
  stream.loop at runtime because the Web staging step re-imports the OGG with
  loop=false.
- tools/test_music.gd: soundtrack test (loop, length, volume, playback,
  still playing after player death).
- docs/MUSIC.md: source, loop construction, verification, licence.
- docs/WEB-DEPLOY.md: release ab6054111f5919a8 notes.

Initial commit of the project.
2026-10-10 23:11:13 +02:00

24 lines
1.0 KiB
GDScript

extends SceneTree
## Persist imported assets as native Godot scenes, independent of import extension at runtime.
func _initialize() -> void:
for name in ["v_9mmar", "w_9mmar", "p_9mmar"]:
var scene: PackedScene = load("res://assets/weapons/" + name + ".mdl")
assert(scene != null)
assert(ResourceSaver.save(scene, "res://assets/weapons/" + name + ".scn") == OK)
var node := scene.instantiate()
var textures := 0
for mesh in node.find_children("*", "MeshInstance3D", true, false):
for i in mesh.mesh.get_surface_count():
var material = mesh.mesh.surface_get_material(i)
assert(material is StandardMaterial3D and material.albedo_texture != null)
textures += 1
assert(textures > 0)
if name == "v_9mmar":
var animation: AnimationPlayer = node.get_node("AnimationPlayer")
for expected in ["deploy", "reload", "shoot", "idle1"]:
assert(animation.has_animation(expected))
assert(animation.get_animation(expected).get_track_count() > 0)
print("EXPORT VERIFIED ", name, " textured surfaces=", textures)
node.free()
quit()