Recover retained route state and complete PostLoad availability tails
This commit is contained in:
1 parent
1dddfefc68
commit
9ad5a8ef6b
36 files changed
+1559
-32
No files matched your search
@@ -162,15 +162,17 @@ foreach (var state in new[] { int.MinValue, -1, 0, 1, 2, 3, 4, 5, int.MaxValue }
|
||||
var availability = new SceneInventory(Enumerable.Repeat(state, 19));
|
||||
availability.ApplyLevelAvailability(tutorial);
|
||||
var disabled = state is 1 or 4 ? 4 : state;
|
||||
Check(Enumerable.Range(0, 8).All(i => availability.State(0, i) == disabled),
|
||||
"Tutorial PostLoad only disables owned states1/4");
|
||||
var practiceItem = tutorial[3] - '1';
|
||||
Check(Enumerable.Range(0, 8).All(i => availability.State(0, i)
|
||||
== (i == practiceItem && state is 1 or 4 ? 1 : disabled)),
|
||||
"Complete tutorial PostLoad re-enables its practice gadget after the common disable pass");
|
||||
Check(availability.State(0, 8) == state && Enumerable.Range(0, 10).All(i => availability.State(1, i) == state),
|
||||
"PostLoad availability preserves gadget8 and the independent inventory group");
|
||||
var carried = OriginalSave.Parse((original with { InventoryStates = availability.Snapshot() }).Encode());
|
||||
var returned = new SceneInventory(carried.InventoryStates);
|
||||
returned.ApplyLevelAvailability("LV1B");
|
||||
Check(Enumerable.Range(0, 8).All(i => returned.State(0, i) == (state is 1 or 4 ? 1 : state)),
|
||||
"Serialized tutorial state returns to enabled owned gadgets in lab");
|
||||
Check(Enumerable.Range(0, 8).All(i => returned.State(0, i) == (state is 1 or 4 ? i is 1 or 7 ? 4 : 1 : state)),
|
||||
"Serialized tutorial state returns to lab-specific owned gadget availability");
|
||||
}
|
||||
}
|
||||
foreach (var normal in new[] { "LV1B", "LEV1", "VR00", "VR09", "vr04" })
|
||||
@@ -181,7 +183,7 @@ foreach (var normal in new[] { "LV1B", "LEV1", "VR00", "VR09", "vr04" })
|
||||
"Normal/fourcc-boundary PostLoad enables selected owned gadgets only");
|
||||
}
|
||||
Check(JetpackBurst.CanStart("VR04", -1, 4, 20), "Tutorial jetpack bypass still works with disabled inventory state4");
|
||||
Console.WriteLine("PASS source PostLoad gadget availability, tutorial boundaries and lab RETURN round-trip");
|
||||
Console.WriteLine("PASS complete route/tutorial PostLoad availability tails, unknown states and lab RETURN round-trip");
|
||||
|
||||
// Independently recover the original SCENE setter's two dispatch tables rather
|
||||
// than testing the port's switch against another manually copied switch.
|
||||
|
||||
Reference in new issue
Block a user