Fix native progression routes around scenery and narrow depth views

This commit is contained in:
NINI
2026-10-10 11:21:44 +09:00
parent 8728660288
commit 2a59c4e8eb
3 changed files with 214 additions and 11 deletions
+8 -4
View File
@@ -44,14 +44,11 @@ function NativeMoveAndHold([string]$Name,$Board,[string]$Id,[int[]]$End) {
Step $Name @() 2500
return Save "$Name-dropped"
}
function AssertNativeMerge([string]$Name,$Before,$After,[string]$SourceId,[int]$TargetCount=0) {
function AssertNativeTranslation([string]$Name,$Before,$After,[string]$SourceId) {
$idsBefore=@($Before.balls.id|Sort-Object);$idsAfter=@($After.balls.id|Sort-Object)
Check "$Name-exact-original-ids" (Same $idsBefore $idsAfter) 'No lost, duplicated or substituted IDs after actual native input'
Check "$Name-manual-camera-preserved" (Same $Before.camera $After.camera) 'Automatic assistance never persists as the manual camera'
$source=@($Before.groups|Where-Object {$_.ballIds-contains$SourceId})[0]
$merged=@($After.groups|Where-Object {$_.ballIds-contains$SourceId})[0]
$targets=@($Before.groups|Where-Object {$_.id-ne$source.id-and@($_.ballIds|Where-Object {$merged.ballIds-notcontains$_}).Count-eq0})
Check "$Name-actual-source-and-target-membership" ($targets.Count-eq1-and$merged.ballIds.Count-eq($source.ballIds.Count+$targets[0].ballIds.Count)-and@($source.ballIds|Where-Object {$merged.ballIds-notcontains$_}).Count-eq0-and($TargetCount-eq0-or$targets[0].ballIds.Count-eq$TargetCount)) 'Grabbed source plus exactly one actual foreign group; requested target size retained'
$firstBefore=@($Before.balls|Where-Object id -eq $SourceId)[0].position
$firstAfter=@($After.balls|Where-Object id -eq $SourceId)[0].position
$delta=[Numerics.Vector3]::new($firstAfter.x-$firstBefore.x,$firstAfter.y-$firstBefore.y,$firstAfter.z-$firstBefore.z)
@@ -63,6 +60,13 @@ function AssertNativeMerge([string]$Name,$Before,$After,[string]$SourceId,[int]$
Check "$Name-rigid-source-$($ball.id)" (($movement-$delta).Length()-lt.0001) 'Every source member shares the same actual translation'
}else{Check "$Name-stationary-foreign-$($ball.id)" (Same $ball.position $actual) 'Unselected foreign balls retain exact saved positions'}
}
}
function AssertNativeMerge([string]$Name,$Before,$After,[string]$SourceId,[int]$TargetCount=0) {
AssertNativeTranslation $Name $Before $After $SourceId
$source=@($Before.groups|Where-Object {$_.ballIds-contains$SourceId})[0]
$merged=@($After.groups|Where-Object {$_.ballIds-contains$SourceId})[0]
$targets=@($Before.groups|Where-Object {$_.id-ne$source.id-and@($_.ballIds|Where-Object {$merged.ballIds-notcontains$_}).Count-eq0})
Check "$Name-actual-source-and-target-membership" ($targets.Count-eq1-and$merged.ballIds.Count-eq($source.ballIds.Count+$targets[0].ballIds.Count)-and@($source.ballIds|Where-Object {$merged.ballIds-notcontains$_}).Count-eq0-and($TargetCount-eq0-or$targets[0].ballIds.Count-eq$TargetCount)) 'Grabbed source plus exactly one actual foreign group; requested target size retained'
$distance=[double]::PositiveInfinity
foreach($sid in $source.ballIds){foreach($tid in $targets[0].ballIds){
$s=@($After.balls|Where-Object id -eq $sid)[0].position;$t=@($After.balls|Where-Object id -eq $tid)[0].position