using System.Linq; using UnityEngine; using UnityEngine.InputSystem.LowLevel; namespace Auralis { public sealed partial class PrototypeQA { LittleFoeGroup pilotFerryCopper; bool pilotFerryWayBellObserved,pilotFerryWayBellCompleted,pilotFerryMenuConfirmed; float pilotFerryWayBellStarted,pilotFerryWayBellObservedSeconds,pilotFerryMenuStarted,pilotFerryMenuPulse; int pilotFerryCourseSelections; float pilotFerrySubmitObserveUntil,pilotFerrySubmitMaxDeckGap; // This route observes authored components, but every action below is an // ordinary virtual-gamepad state. U06 and the high pennant remain open. void PilotFerryTick() { var landing=FerryLanding.I;var crane=FerryCraneYard.I;var pennant=FerryPennantWalk.I; var bell=FerryWayBell.I;var repair=ShipyardSailRepair.I;var tower=FerryTowerLanding.I; if(!landing||!crane||!pennant||!bell||!repair||!tower||!landing.Ferry) {PilotStop("A required authored ferry component is missing");return;} var ferry=landing.Ferry; float now=Time.realtimeSinceStartup; if(WayBellSequence.Active) { if(!pilotFerryWayBellObserved) { pilotFerryWayBellObserved=true;pilotFerryWayBellStarted=now; PilotEvent("Actual grounded approach began the way-bell world change; all inputs remain neutral until its natural completion."); PilotCapture("waybell-natural-start"); } pilotFerryWayBellObservedSeconds=Mathf.Max(pilotFerryWayBellObservedSeconds,WayBellSequence.Active.Age); PilotQueue(new GamepadState(),"unskipped way-bell world change / neutral"); if(now-pilotFerryWayBellStarted>60)PilotStop("Actual way-bell world change did not finish within 60 seconds"); return; } if(pilotFerryWayBellObserved&&!pilotFerryWayBellCompleted&&g.Playing) { if(!bell.Silenced||pilotFerryWayBellObservedSeconds100)PilotStop("Unexpected modal during the ordinary ferry route"); } return; } if(pilotFerryMenuStarted>0) { if(pilotFerryMenuConfirmed){pilotFerrySubmitObserveUntil=now+.4f;pilotFerrySubmitMaxDeckGap=0;} pilotFerryMenuStarted=0;pilotFerryMenuConfirmed=false; } if(pilotFerrySubmitObserveUntil>0) { pilotFerrySubmitMaxDeckGap=Mathf.Max(pilotFerrySubmitMaxDeckGap,Mathf.Abs(g.Player.transform.position.y-ferry.transform.position.y)); if(now>=pilotFerrySubmitObserveUntil) { bool stayed=pilotFerrySubmitMaxDeckGap<.25f; CheckResult("Ferry course confirmation "+pilotFerryCourseSelections+" keeps the neutral passenger on deck",stayed,"maximum deck gap="+pilotFerrySubmitMaxDeckGap); pilotFerrySubmitObserveUntil=0; if(!stayed){PilotStop("Course-menu confirmation displaced the neutral passenger from the ferry deck");return;} } } if(g.Player.EnteringDoor||g.Player.Rescuing||RewardCeremony.Active) {PilotQueue(new GamepadState(),"ferry ordinary doorway or recovery / neutral");return;} if(g.Deaths!=pilotSeenDeaths) { PilotEvent("Ordinary ferry death and checkpoint recovery: "+pilotSeenDeaths+" -> "+g.Deaths+", checkpoint="+g.Save.Data.checkpoint); pilotSeenDeaths=g.Deaths; PilotStop("Ordinary ferry death preserved for diagnosis; no replacement fixture or free recovery was applied");return; } if(pilotRecovery){PilotFerryRecoveryTick();return;} if(now-pilotStageStarted>100){PilotStop("No expected ferry progress within the bounded step: "+pilot.stage);return;} Vector2 feet=g.Player.transform.position; // A missed jump can use the actual permanent maintenance route. // Resume before its unfinished encounter or crossing, never after it. if(g.Player.Grounded&&!ferry.Moving) { if(pilotStage<=11&&feet.y<-1) {PilotFerryRecover(pilotStage>=8?landing.EastReturn:landing.WestReturn,pilotStage>=8?9:4,"first ferry gap -> permanent maintenance ladder");return;} if(pilotStage>=12&&pilotStage<=32&&feet.y<2) {bool east=pilotStage>=25;PilotFerryRecover(east?crane.EastReturn:crane.WestReturn,east?25:12,"crane fall -> fixed ladder before the unfinished route");return;} if(pilotStage>=33&&pilotStage<=39&&feet.y<7) {PilotFerryRecover(pennant.WestReturn,34,"pennant main-bank fall -> western return ladder");return;} if(pilotStage>=42&&pilotStage<=54&&feet.y<5) { bool outer=pilotStage>=45&&pilotStage<=48; PilotFerryRecover(outer?bell.EastReturn:bell.WestReturn,outer?(repair.Repaired?47:46):43,"way-bell gap -> actual sheltered maintenance ladder");return; } if(pilotStage>=55&&pilotStage<=58&&feet.y<5) {PilotFerryRecover(bell.EastReturn,55,"outer boarding miss -> actual outer return ladder");return;} if(pilotStage>=61&&feet.y<10) {PilotFerryRecover(tower.WestReturn,62,"tower disembarkation miss -> fixed tower return ladder");return;} } var input=new GamepadState();pilotInput="ferry neutral / observe ordinary world"; switch(pilotStage) { case 0: input=PilotWalk(landing.At(495,537)); if(PilotAt(landing.At(495,537)))PilotAdvance(1,"3-3 / fixed ladder to the first towline"); break; case 1: input=PilotClimb(landing.WorkLadder); if(PilotFerryAtTop(landing.WorkLadder))PilotAdvance(2,"3-3 / approach first towline on its work gallery"); break; case 2: input=PilotWalk(landing.At(495,425)); if(PilotAt(landing.At(495,425)))PilotAdvance(3,"3-3 / ordinary RB at the first towline"); break; case 3: input=PilotControls(Vector2.zero,weave:!ferry.Linked&&PilotPulse()); if(ferry.Linked){PilotEvent("First towline earned through RB; ferry stop="+ferry.Stop+", moving="+ferry.Moving);PilotAdvance(4,"3-3 / return on foot to the lower boarding bank");} break; case 4: input=PilotWalk(ferry.LowerCall); if(PilotAt(ferry.LowerCall))PilotAdvance(5,"3-3 / actual boarding jump at the lower ferry"); break; case 5: input=PilotHop(PilotFerryHelmFeet(ferry)); if(ferry.OnBoard&&PilotAt(PilotFerryHelmFeet(ferry)))PilotAdvance(6,"3-3 / Y at the first ferry helm"); break; case 6: input=PilotFerryInteract("ordinary Y / depart from the lower ferry helm"); if(ferry.Moving&&ferry.DestinationStop==1)PilotAdvance(7,"3-3 / ride the actual ferry to its upper stop"); break; case 7: if(!ferry.Moving&&ferry.Stop==1&&ferry.OnBoard) {PilotEvent("Actual passenger arrival at upper ferry stop.");PilotAdvance(8,"3-3 / disembark onto the upper work path");} break; case 8: input=PilotHop(landing.At(895,396)); if(PilotAt(landing.At(895,396))&&!ferry.OnBoard)PilotAdvance(9,"3-3 / finite Copperpick pair through normal arrows"); break; case 9: if(!pilotFerryCopper)pilotFerryCopper=FindObjectsByType(FindObjectsSortMode.None).FirstOrDefault(x=>x.Id=="pop46-shipyard-copper-workbank"); if(!pilotFerryCopper){PilotStop("Authored ferry Copperpick pair is missing");break;} if(pilotFerryCopper.Cleared){PilotEvent("Finite ferry Copperpick pair cleared naturally.");PilotAdvance(10,"3-3 / collect work-path funds and reach the upper rest");break;} var little=pilotFerryCopper.Members.FirstOrDefault(x=>x&&x.Alive&&x.Emerged&&x.Stage!=LittleFoeStage.Emerging); if(little)input=PilotBow(little.Target,landing.At(860,396).x,landing.At(1160,396).x); break; case 10: input=PilotWalk(PilotFerryRest(1)); if(PilotAt(PilotFerryRest(1)))PilotAdvance(11,"3-3 / ordinary Y rest on the first upper bank"); break; case 11: input=PilotFerryInteract("ordinary Y / upper work-path lantern"); if(PilotFerryRested(1))PilotAdvance(12,"3-3 / walk into the authored crane approach"); break; case 12: input=PilotWalk(crane.At(404,538)); if(PilotAt(crane.At(404,538)))PilotAdvance(13,"3-3 / jump onto the short crane step"); break; case 13: // Land on the exposed left end: a full jump directly under // the ladder lands on the overlapping higher bank instead. input=PilotHop(crane.At(460,514)); if(PilotAt(crane.At(460,514)))PilotAdvance(14,"3-3 / climb the short workbank ladder"); break; case 14: var shortLadder=ClimbableLadder.All.FirstOrDefault(x=>x&&Mathf.Abs(x.X-crane.At(530,514).x)<.1f&&Mathf.Abs(x.Top-crane.At(530,445).y)<.1f); if(!shortLadder){PilotStop("Actual short crane ladder is missing");break;} input=PilotClimb(shortLadder); if(PilotFerryAtTop(shortLadder))PilotAdvance(15,"3-3 / workbank wind reserve before the crab"); break; case 15: input=PilotWalk(crane.At(570,445)); if(PilotAt(crane.At(570,445)))PilotAdvance(16,"3-3 / finite workbank crab through normal arrows"); break; case 16: if(PilotRouteDefeated("shipyard-workbank-crab")){PilotAdvance(17,"3-3 / approach the clear bank before the swinging cargo");break;} var crab=PilotEnemy("shipyard-workbank-crab"); if(crab&&crab.Alive)input=PilotBow(crab.Target,crane.At(540,445).x,crane.At(790,445).x); break; case 17: input=PilotFerryCrouchWalk(crane.At(820,445)); if(PilotAt(crane.At(820,445)))PilotAdvance(18,"3-3 / ordinary RB for the sloped crane thread"); break; case 18: input=PilotControls(Vector2.zero,weave:!crane.Thread.Active&&PilotPulse()); if(crane.Thread.Active)PilotAdvance(19,"3-3 / observe cargo clearance before mounting the slope"); break; case 19: input=PilotControls(Vector2.down,weave:crane.Thread.Remaining<4&&PilotPulse()); // Take off left of the load, so the ordinary jump rises // above it before the feet reach its actual collision box. // A historical far-left swing is not a prerequisite: that // initial motion may have damped during this continuous run. var cargoBounds=crane.Cargo.GetComponent().bounds; if(cargoBounds.min.x>feet.x+1.4f&&cargoBounds.max.x<39.35f&&cargoBounds.max.y3) {PilotEvent("Observed cargo clearance for the normal jump: bounds="+cargoBounds+", velocity="+crane.Cargo.Body.linearVelocity);PilotAdvance(20,"3-3 / jump over the cargo and land on the real rising light thread");} break; case 20: var slopeFeet=new Vector2(39.8f,crane.Thread.StandingY(39.8f,g.Player.GetComponent().size.x*.5f)+.01f); input=PilotHop(slopeFeet); if(PilotAt(slopeFeet)&&crane.Thread.Active)PilotAdvance(21,"3-3 / walk up the physical thread onto the high bank"); break; case 21: input=PilotWalk(crane.At(1345,324)); if(PilotAt(crane.At(1345,324)))PilotAdvance(22,"3-3 / ordinary RB at the second towline"); break; case 22: input=PilotControls(Vector2.zero,weave:!crane.Linked&&PilotPulse()); if(crane.Linked){PilotEvent("Crane towline earned after the actual sloped crossing.");PilotAdvance(23,"3-3 / high crane checkpoint lantern");} break; case 23: input=PilotWalk(PilotFerryRest(2)); if(PilotAt(PilotFerryRest(2)))PilotAdvance(24,"3-3 / ordinary rest at the high crane checkpoint"); break; case 24: input=PilotFerryInteract("ordinary Y / high crane lantern"); if(PilotFerryRested(2))PilotAdvance(25,"3-3 / approach the actual crane recall bell"); break; case 25: input=PilotWalk(crane.RecallPoint); if(PilotAt(crane.RecallPoint))PilotAdvance(26,"3-3 / Y at the crane recall bell"); break; case 26: input=PilotFerryInteract("ordinary Y / recall ferry to the high crane berth"); if(ferry.Moving||ferry.Stop==2)PilotAdvance(27,"3-3 / wait for the empty ferry to reach the real crane berth"); break; case 27: if(!ferry.Moving&&ferry.Stop==2)PilotAdvance(28,"3-3 / actual jump from crane bank onto the waiting ferry"); break; case 28: input=PilotHop(PilotFerryHelmFeet(ferry)); if(ferry.OnBoard&&PilotAt(PilotFerryHelmFeet(ferry)))PilotAdvance(29,"3-3 / ordinary return voyage before choosing the forward crane course"); break; case 29: input=PilotFerryInteract("ordinary Y / return from crane berth to the upper stop"); if(ferry.Moving&&ferry.DestinationStop==1) {PilotEvent("Crane recall brought the boat here empty; take its real return voyage to demonstrate the forward course as a passenger.");PilotAdvance(30,"3-3 / real passenger return voyage to the upper stop");} break; case 30: if(!ferry.Moving&&ferry.Stop==1&&ferry.OnBoard)PilotAdvance(31,"3-3 / ordinary ferry course menu toward the high crane berth"); break; case 31: input=PilotFerryInteract("ordinary Y / open forward ferry course at upper helm"); if(ferry.Moving&&ferry.DestinationStop==2)PilotAdvance(32,"3-3 / actual forward passenger voyage over the crane"); break; case 32: if(!ferry.Moving&&ferry.Stop==2&&ferry.OnBoard) {PilotEvent("Forward crane course completed with the actual passenger on board.");PilotAdvance(33,"3-3 / jump from ferry to the real pennant main bank");} break; case 33: input=PilotHop(pennant.At(90,552)); if(PilotAt(pennant.At(90,552))&&!ferry.OnBoard)PilotAdvance(34,"3-3 / reach the protected observation-bank lantern"); break; case 34: input=PilotWalk(PilotFerryRest(3)); if(PilotAt(PilotFerryRest(3)))PilotAdvance(35,"3-3 / real observation-bank rest"); break; case 35: input=PilotFerryInteract("ordinary Y / observation-bank lantern"); if(PilotFerryRested(3))PilotAdvance(36,"3-3 / approach the finite return-path Flatterer"); break; case 36: input=PilotWalk(pennant.At(415,552)); if(PilotAt(pennant.At(415,552)))PilotAdvance(37,"3-3 / return-path Flatterer through ordinary arrows"); break; case 37: if(PilotRouteDefeated("pop46-shipyard-return-flier")){PilotAdvance(38,"3-3 / approach the fixed Windray lane");break;} var flier=PilotEnemy("pop46-shipyard-return-flier"); if(flier&&flier.Alive)input=PilotBow(flier.Target,pennant.At(395,552).x,pennant.At(620,552).x); break; case 38: input=PilotWalk(pennant.At(620,552)); if(PilotAt(pennant.At(620,552)))PilotAdvance(39,"3-3 / release the two Windray knots through ordinary arrows"); break; case 39: if(pennant.Ray.Freed){PilotEvent("Actual Windray knots released through normal arrows.");PilotAdvance(40,"3-3 / reach the lantern before the way-bell approach");break;} input=PilotBow(pennant.Ray.transform.position,pennant.At(620,552).x,pennant.At(1210,552).x); break; case 40: input=PilotWalk(PilotFerryRest(4)); if(PilotAt(PilotFerryRest(4)))PilotAdvance(41,"3-3 / ordinary rest before the way-bell world change"); break; case 41: input=PilotFerryInteract("ordinary Y / way-bell lantern"); if(PilotFerryRested(4))PilotAdvance(42,"3-3 / actual grounded way-bell approach and complete world change"); break; case 42: input=PilotWalk(bell.SafeBank+Vector2.right*.35f); if(pilotFerryWayBellCompleted&&repair.Released)PilotAdvance(43,"3-3 / walk to the actual outer-island takeoff"); break; case 43: input=PilotWalk(bell.At(1040,494)); if(PilotAt(bell.At(1040,494)))PilotAdvance(44,"3-3 / observe a calm interval before the outer glide"); break; case 44: if(repair.WindStrength<.1f&&repair.WindSignal<.5f)PilotAdvance(45,"3-3 / actual jump and glide to the outer sail bank"); break; case 45: input=PilotHop(repair.AnchorFeet); if(PilotAt(repair.AnchorFeet))PilotAdvance(46,"3-3 / ordinary RB secures the loose sail sheet"); break; case 46: input=PilotControls(Vector2.zero,weave:!repair.Repaired&&PilotPulse()); if(repair.Repaired){PilotEvent("Side sail repaired through actual outer-anchor RB.");PilotAdvance(47,"3-3 / ordinary second RB weaves the sloped return thread");} break; case 47: input=PilotControls(Vector2.zero,weave:!repair.ReturnThread.Active&&PilotPulse()); if(repair.ReturnThread.Active)PilotAdvance(48,"3-3 / walk left on the real return thread to the high bank"); break; case 48: input=PilotWalk(bell.At(1010,494)); if(PilotAt(bell.At(1010,494))&&repair.Returned) {PilotEvent("Required sail return earned by an actual grounded leftward crossing.");PilotAdvance(49,"3-3 / return on foot to checkpoint four before the final crossing");} break; case 49: input=PilotWalk(PilotFerryRest(4)); if(PilotAt(PilotFerryRest(4)))PilotAdvance(50,"3-3 / real checkpoint-four rest after the sail return"); break; case 50: input=PilotFerryInteract("ordinary Y / checkpoint-four rest after the real sail return"); if(PilotFerryRested(4))PilotAdvance(51,"3-3 / return on foot toward the final outer crossing"); break; case 51: input=PilotWalk(bell.At(1040,494)); if(PilotAt(bell.At(1040,494)))PilotAdvance(52,"3-3 / refresh the real return thread before crossing outward again"); break; case 52: input=PilotControls(Vector2.zero,weave:repair.ReturnThread.Remaining<5&&PilotPulse()); if(repair.ReturnThread.Remaining>=5)PilotAdvance(53,"3-3 / walk the sloped thread back to the outer bank"); break; case 53: input=PilotWalk(repair.AnchorFeet); if(PilotAt(repair.AnchorFeet))PilotAdvance(54,"3-3 / ordinary RB links the final ferry route from the broad bank"); break; case 54: input=PilotControls(Vector2.zero,weave:!tower.Linked&&PilotPulse()); if(tower.Linked) { PilotEvent("Final towline earned on the actual broad outer bank. U06 is untouched/open; this section follows the main ferry route only and does not complete the planned optional dungeon loop."); PilotAdvance(55,"3-3 / walk to the outer recall bell"); } break; case 55: input=PilotWalk(tower.OuterCall); if(PilotAt(tower.OuterCall))PilotAdvance(56,"3-3 / actual Y at the outer ferry recall bell"); break; case 56: input=PilotFerryInteract("ordinary Y / recall the same ferry to the outer berth"); if(ferry.Moving||ferry.Stop==3)PilotAdvance(57,"3-3 / wait for the real outer ferry recall"); break; case 57: if(!ferry.Moving&&ferry.Stop==3)PilotAdvance(58,"3-3 / actual outer-bank boarding jump"); break; case 58: input=PilotHop(PilotFerryHelmFeet(ferry)); if(ferry.OnBoard&&PilotAt(PilotFerryHelmFeet(ferry)))PilotAdvance(59,"3-3 / actual helm menu for the quiet tower crossing"); break; case 59: input=PilotFerryInteract("ordinary Y / open the tower course at the outer helm"); if(ferry.Moving&&ferry.DestinationStop==4)PilotAdvance(60,"3-3 / ride the actual quiet ferry crossing to the tower"); break; case 60: if(!ferry.Moving&&ferry.Stop==4&&ferry.OnBoard) {PilotEvent("Actual passenger arrival at the tower berth; course menus selected="+pilotFerryCourseSelections);PilotAdvance(61,"3-3 / actual jump from ferry to the tower bank");} break; case 61: input=PilotHop(tower.TowerCall); if(PilotAt(tower.TowerCall)&&!ferry.OnBoard)PilotAdvance(62,"3-3 / walk into the protected tower arrival and lantern"); break; case 62: input=PilotWalk(PilotFerryRest(5)); if(PilotAt(PilotFerryRest(5))&&tower.Arrived&&g.Save.Data.Progress.completed)PilotAdvance(63,"3-3 / ordinary final lantern rest before the tower gate"); break; case 63: input=PilotFerryInteract("ordinary Y / tower-bank lantern"); if(PilotFerryRested(5))PilotAdvance(64,"3-3 / approach the real short tower steps"); break; case 64: input=PilotWalk(tower.At(570,540)); if(PilotAt(tower.At(570,540)))PilotAdvance(65,"3-3 / jump onto the real stone entrance steps"); break; case 65: input=PilotHop(tower.At(660,502)); if(PilotAt(tower.At(660,502)))PilotAdvance(66,"3-3 / reach the actual raised tower forecourt"); break; case 66: input=PilotHop(tower.At(805,490)); if(PilotAt(tower.At(805,490)))PilotAdvance(67,"3-3 / walk to the actual large tower gate"); break; case 67: input=PilotWalk(tower.TowerDoor.transform.position); if(PilotAt(tower.TowerDoor.transform.position))PilotAdvance(68,"3-3 -> 3-4 / Up at the actual animated tower gate"); break; case 68: if(!tower.TowerDoor.CanEnter){PilotStop("Actual tower gate remains locked after the ordinary ferry route");break;} input=PilotControls(Vector2.up); break; default:PilotStop("Unknown ferry pilot step "+pilotStage);break; } if(!pilotFailed)PilotQueue(input,pilotInput); } Vector2 PilotFerryRest(int index)=>WorldBuilder.Checkpoint(index)-Vector2.up*.08f; bool PilotFerryRested(int index)=>Time.realtimeSinceStartup-pilotStageStarted>1&&g.Save.Data.checkpoint==index&&g.Player.HealthHearts>=g.Save.Data.healthCapacity; bool PilotFerryAtTop(ClimbableLadder ladder)=>g.Player.Grounded&&!g.Player.Climbing&&Mathf.Abs(g.Player.transform.position.y-ladder.Top)<.2f; Vector2 PilotFerryHelmFeet(WindFerry ferry)=>(Vector2)ferry.transform.position+Vector2.right*.7f; GamepadState PilotFerryInteract(string description) { float cycle=Mathf.Repeat(Time.realtimeSinceStartup-pilotStageStarted,1.3f);bool press=cycle>.25f&&cycle<.4f; pilotInput=press?description:"ordinary Y release / observe actual ferry or lantern response"; return press?new GamepadState().WithButton(GamepadButton.North):new GamepadState(); } GamepadState PilotFerryCrouchWalk(Vector2 destination) { float dx=destination.x-g.Player.transform.position.x; return PilotControls(new Vector2(Mathf.Abs(dx)<.13f?0:Mathf.Sign(dx),-1)); } void PilotFerryCourseMenu(string expected) { float now=Time.realtimeSinceStartup; if(pilotFerryMenuStarted==0) {pilotFerryMenuStarted=now;pilotFerryMenuPulse=now+.35f;PilotEvent("Actual ferry helm opened its normal course menu; expected selected action: "+expected);PilotCapture("ferry-course-menu");} if(now-pilotFerryMenuStarted>15){PilotStop("Ordinary ferry course menu did not close after controller selection");return;} var selected=UnityEngine.EventSystems.EventSystem.current?UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject:null; var label=selected?selected.GetComponentInChildren():null; var input=new GamepadState();string description="ferry course menu / neutral release"; if(!pilotFerryMenuConfirmed&&now>=pilotFerryMenuPulse) { if(!label||label.text!=expected){PilotStop("Unexpected selected ferry course: "+(label?label.text:"none")+"; expected "+expected);return;} input=input.WithButton(GamepadButton.South);pilotFerryMenuConfirmed=true;pilotFerryCourseSelections++; description="ordinary A on ferry course: "+expected;PilotEvent(description); } PilotQueue(input,description); } void PilotFerryRecover(ClimbableLadder ladder,int resume,string reason) { if(!ladder){PilotStop("Missing fixed ferry recovery ladder: "+reason);return;} pilotRecovery=ladder;pilotRecoveryResume=resume;pilotRecoveryStarted=Time.realtimeSinceStartup; PilotEvent("Ordinary ferry maintenance recovery: "+reason);PilotCapture("ferry-maintenance-recovery"); PilotQueue(new GamepadState(),"ferry maintenance recovery / neutral release"); } void PilotFerryRecoveryTick() { if(Time.realtimeSinceStartup-pilotRecoveryStarted>65){PilotStop("Actual ferry maintenance ladder recovery did not finish");return;} if(PilotFerryAtTop(pilotRecovery)) { int resume=pilotRecoveryResume;pilotRecovery=null;PilotAdvance(resume,"3-3 / resume actual route after the fixed maintenance ladder"); PilotQueue(new GamepadState(),"ferry maintenance recovery complete / neutral");return; } var input=PilotClimb(pilotRecovery);PilotQueue(input,pilotInput); } } }