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
@@ -25,9 +25,10 @@ public sealed class SceneInventory
|
||||
public void SetState(int group, int item, int state) => states[Offset(group, item)] = state;
|
||||
|
||||
/// <summary>
|
||||
/// Jimmy PostLoad423DEF..423EC1: enable these eight owned gadgets, then
|
||||
/// disable them in numeric VR01..VR08. State4 is unavailable ownership,
|
||||
/// distinct from unowned0. Other wire values and item8 remain unchanged.
|
||||
/// Jimmy PostLoad: enable eight owned gadgets, disable them in VR01..08,
|
||||
/// then re-enable that tutorial's gadget in the later level-specific tail.
|
||||
/// LV1B disables gadgets1/7. Other level-specific tails remain unported.
|
||||
/// State4 is unavailable ownership, distinct from unowned0.
|
||||
/// </summary>
|
||||
public void ApplyLevelAvailability(string levelCode)
|
||||
{
|
||||
@@ -38,8 +39,19 @@ public sealed class SceneInventory
|
||||
// Exactly the eight original FourCC values in the source numeric range.
|
||||
if (levelCode.Length == 4 && levelCode.StartsWith("VR0", StringComparison.Ordinal)
|
||||
&& levelCode[3] is >= '1' and <= '8')
|
||||
{
|
||||
foreach (var item in items)
|
||||
if (states[item] == 1) states[item] = 4;
|
||||
//4242AF..424400: each practice scene enables its matching gadget.
|
||||
var practiceItem = levelCode[3] - '1';
|
||||
if (states[practiceItem] == 4) states[practiceItem] = 1;
|
||||
}
|
||||
else if (levelCode == "LV1B")
|
||||
{
|
||||
//424102: lab restrictions follow the common enable pass.
|
||||
foreach (var item in new[] { 1, 7 })
|
||||
if (states[item] == 1) states[item] = 4;
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectGadget(int item)
|
||||
|
||||
Reference in new issue
Block a user