OverTheHedge.asl 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. state("hedge")
  2. {
  3. int levels : 0x3338B4;
  4. byte loading1 : 0x358CD4;
  5. byte endsplit : 0x2E5BA4; //11
  6. }
  7. startup
  8. {
  9. settings.Add("l1", true, "Missions");
  10. vars.missions5 = new Dictionary<string,string>
  11. {
  12. {"4","Inside Gladys' House"},
  13. {"5","Escape!"},
  14. {"6","Caught in the Hedge!"},
  15. {"7","Night Streets"},
  16. {"8","Projector Heist"},
  17. {"9","Martin Heist, Pt. 1"},
  18. {"10","Martin Heist, Pt. 2"},
  19. {"11","Martin House"},
  20. {"12","Martin House Escape"},
  21. {"13","Steam Train"},
  22. {"14","Shooting Gallery"},
  23. {"15","Maintenance Room"},
  24. {"16","Smith Birthday Party"},
  25. {"17","Smith Heist, Pt. 2"},
  26. {"18","Smith House"},
  27. {"19","Smith House Escape"},
  28. {"20","Cave Interiors"},
  29. {"21","Below Vincent's Den"},
  30. {"22","Mountain Paths"},
  31. {"23","Vincent's Den"},
  32. {"24","Conner Heist, Pt. 1"},
  33. {"25","Conner Heist, Pt. 2"},
  34. {"26","Conner Heist, Pt. 3"},
  35. {"27","Conner House"},
  36. {"28","Conner House Escape"},
  37. {"29","Mini-Golf Course"},
  38. {"30","Roller Coaster Tracks"},
  39. {"31","Roller Coaster Escape"},
  40. {"32","Gladys Heist, Pt. 1"},
  41. {"33","Gladys Heist, Pt. 2"},
  42. {"34","Gladys Heist Escape"},
  43. {"35","Protect The Woods!"},
  44. {"36","Vermtech Heist"},
  45. {"37","Rescue Heather!"},
  46. };
  47. foreach (var Tag in vars.missions5)
  48. {
  49. settings.Add(Tag.Key, true, Tag.Value, "l1");
  50. };
  51. vars.onStart = (EventHandler)((s, e) => // thanks gelly for this, it's basically making sure it always clears the vars no matter how livesplit starts
  52. {
  53. vars.doneMaps.Clear();
  54. });
  55. timer.OnStart += vars.onStart;
  56. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  57. {
  58. var timingMessage = MessageBox.Show (
  59. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  60. "LiveSplit is currently set to show Real Time (RTA).\n"+
  61. "Would you like to set the timing method to Game Time? This will make verification easier",
  62. "LiveSplit | Over The Hedge",
  63. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  64. );
  65. if (timingMessage == DialogResult.Yes)
  66. {
  67. timer.CurrentTimingMethod = TimingMethod.GameTime;
  68. }
  69. }
  70. }
  71. init
  72. {
  73. vars.doneMaps = new List<string>(); // Can accidently enter a previous level, doneMaps needed
  74. }
  75. start
  76. {
  77. if ((current.levels == 3) && (current.loading1 == 1))
  78. {
  79. vars.doneMaps.Clear();
  80. return true;
  81. }
  82. }
  83. split
  84. {
  85. string currentMap = current.levels.ToString();
  86. if ((current.levels != old.levels) && (settings[currentMap]) && ((!vars.doneMaps.Contains(currentMap))))
  87. {
  88. vars.doneMaps.Add(currentMap);
  89. return true;
  90. }
  91. if ((current.levels == 37) && (current.endsplit == 11))
  92. {
  93. return true;
  94. }
  95. }
  96. reset
  97. {
  98. return (current.levels == 2);
  99. }
  100. isLoading
  101. {
  102. return (current.loading1 == 0);
  103. }
  104. exit
  105. {
  106. timer.OnStart -= vars.onStart;
  107. }