Import current DEMON v0.19 source, assets and development handoff

This commit is contained in:
JariKo
2026-10-28 15:39:06 +02:00
commit 2b9ae06592
347 changed files with 14404 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
extends RefCounted
var failures=0
func check(ok,label):
if not ok:failures+=1;push_error("FLIGHT/CAMERA QA: "+label)
func run(g):
await g.get_tree().create_timer(.3).timeout
g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false
var w=g.workshop;g.coins=2000;w.toggle_build()
for rank in range(1,4):
w.expansion_button.grab_focus();w.expansion_button.pressed.emit()
check(w.expansion_level==rank and not w.expansion_button.has_focus(),"expansion button callback releases keyboard focus")
g.orbit.pan=Vector3(16,0,0);var before=g.camera.position
g.orbit.keys[KEY_D]=true;w.update(1);g.orbit.keys.clear()
check(g.orbit.pan.x>16 and g.camera.position.distance_to(before)>.1,"camera travels beyond old boundary at rank %d"%rank)
var middle=InputEventMouseButton.new();middle.button_index=MOUSE_BUTTON_MIDDLE;middle.pressed=true;g.orbit.input(middle)
check(g.orbit.dragging,"middle mouse works over expansion menu")
var motion=InputEventMouseMotion.new();motion.relative=Vector2(40,8);var yaw=g.orbit.yaw;g.orbit.input(motion);w.update(.1)
check(g.orbit.yaw!=yaw,"camera rotates after expansion")
g.orbit.stop()
w.toggle_build();g.paused=false;g.hud.hide();g.player.hide()
DirAccess.make_dir_recursive_absolute("res://captures/flight")
for kind in range(10):
var actor=g.make_person(false,kind);g.add_child(actor);actor.set_process(false);actor.following=true
actor._process(.04)
check(actor.cloth.strips.size()==3,"three small cloth scraps %d"%kind)
check(actor.cloth.strips.all(func(strip):return strip.node.mesh.get_aabb().size.y<.30 and strip.material.shader==preload("res://soul_cloth.gdshader")),"cloth size and flutter shader %d"%kind)
if kind>=5:
actor.restore_flight_pose();var upright=actor.bone_local("head")
actor._process(.04)
check(actor.bone_local("head").z>upright.z+.03,"male hunched posture %d"%kind)
var previous=actor.bone_local("wrist.L")
var motion_range=0.0
for i in range(40):
actor._process(.04);motion_range=maxf(motion_range,actor.bone_local("wrist.L").distance_to(previous))
check(motion_range>.005 and motion_range<.08,"gentle hand animation %d"%kind)
check(actor.cloth.strips.all(func(strip):return strip.material.get_shader_parameter("flutter")==1.0),"cloth flutters while following")
var cloth_clock=actor.cloth.clock;g.paused=true;actor._process(.05);g.paused=false
check(actor.cloth.clock==cloth_clock,"cloth pauses with soul")
if kind>=5:
for i in range(200):actor._process(.04)
check(actor.bone_local("head").y>actor.bone_local("root").y+.40,"hunch does not accumulate or fold model %d"%kind)
for side in ["L","R"]:
var shoulder=actor.bone_local("upperarm01."+side);var elbow=actor.bone_local("lowerarm01."+side);var hand=actor.bone_local("wrist."+side)
check(hand.y<elbow.y and elbow.y<shoulder.y,"hands down along body %d %s"%[kind,side])
check(Vector2(hand.x-shoulder.x,hand.z-shoulder.z).length()<.085,"no bent-out arms %d %s"%[kind,side])
if kind in [0,5]:
g.camera.position=Vector3(2,2,4);g.camera.look_at(Vector3(0,1.25,0));g.camera.size=3.7
await g.get_tree().process_frame;await RenderingServer.frame_post_draw
g.get_viewport().get_texture().get_image().save_png("res://captures/flight/soul-%d.png"%kind)
actor.mount_station(4);actor.update_torture(.1,false)
check(actor.mounted and not actor.following,"apparatus pose takes priority")
actor.unmount_station();actor.following=true;actor._process(.04)
check(actor.bone_local("wrist.L").y<actor.bone_local("lowerarm01.L").y,"arms recover after apparatus")
actor.queue_free();await g.get_tree().process_frame
print("FLIGHT/CAMERA QA ","PASSED" if failures==0 else "FAILED",": all expansions, pan and orbit over menu, ten souls, relaxed hands, animation and apparatus transitions")
g.get_tree().quit(1 if failures else 0)