DieHard.asl 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. state("Lithtech")
  2. {
  3. string30 map : 0x000D739C, 0x30, 0x54, 0x48, 0x120, 0x20, 0x4;
  4. bool isLoading : 0xE1AF8;
  5. }
  6. startup
  7. {
  8. settings.Add("diehardbro", true, "Levels List");
  9. vars.missions5 = new Dictionary<string,string>
  10. {
  11. {@"ds\map1.aiw","Level 1: Makatomi Plaza"},
  12. {@"ds\32-1.aiw","Level 2: False Alarm"},
  13. {@"ds\39-1.aiw","Level 3: The Bomber"},
  14. {@"ds\roof-1.aiw","Level 4: On the Roof"},
  15. {@"ds\39-2.aiw","Level 5: Down the Shaft"},
  16. {@"ds\38-2.aiw","Level 6: Welcome to the party"},
  17. {@"ds\basement-1.aiw","Level 7: High Maintenance"},
  18. {@"ds\parkade-1.aiw","Level 8: Argyte's Run"},
  19. {@"ds\basement-2.aiw","Level 9: PLayin' The Hero"},
  20. {@"ds\subbasement-1.aiw","Level 10: One of the Terrorists"},
  21. {@"ds\sewer-1.aiw","Level 11: Not my Day"},
  22. {@"ds\subbasement-2.aiw","Level 12: Aftermath"},
  23. {@"ds\4-1.aiw","Level 13: Clearing the Bird's Nest"},
  24. {@"ds\21-1.aiw","Level 14: Unexpected Friend"},
  25. {@"ds\20-1.aiw","Level 15: The Architect"},
  26. {@"ds\5-1.aiw","Level 16: In the Vents"},
  27. {@"ds\33-1.aiw","Level 17: Send in the Car"},
  28. {@"ds\23-1.aiw","Level 18: Backup Arrives"},
  29. {@"ds\39-3.aiw","Level 19: The FBI Arrives"},
  30. {@"ds\33-2.aiw","Level 20: Bill Clay"},
  31. {@"ds\34-1.aiw","Level 21: Coulda Used his Shoes"},
  32. {@"ds\34-2.aiw","Level 22: I hate the Dark"},
  33. {@"ds\35-1.aiw","Level 23: R&D Lab"},
  34. {@"ds\subbasement-3.aiw","Level 24: Fumbling in the Dark"},
  35. {@"ds\elevator-3.aiw","Level 25: A Fish in the Barrel"},
  36. {@"ds\39-4.aiw","Level 26: Karl's Revenge"},
  37. {@"ds\roof-2.aiw","Level 27: Everyone on the Roof"},
  38. {@"ds\30-4.aiw","Level 28: Just Like Saigon"},
  39. {@"ds\31-1.aiw","Level 39: Running the Gauntlet"},
  40. {@"ds\vault-2.aiw", "Level 30: Still the Cowboy"}
  41. };
  42. foreach (var Tag in vars.missions5)
  43. {
  44. settings.Add(Tag.Key, true, Tag.Value, "diehardbro");
  45. };
  46. vars.onStart = (EventHandler)((s, e) => // thanks gelly for this, it's basically making sure it always clears the vars no matter how livesplit starts
  47. {
  48. vars.doneMaps.Clear();
  49. vars.doneMaps.Add(current.map);
  50. });
  51. timer.OnStart += vars.onStart;
  52. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  53. {
  54. var timingMessage = MessageBox.Show (
  55. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  56. "LiveSplit is currently set to show Real Time (RTA).\n"+
  57. "Would you like to set the timing method to Game Time? This will make verification easier",
  58. "LiveSplit | Die Hard Nakatomi Plaza",
  59. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  60. );
  61. if (timingMessage == DialogResult.Yes)
  62. {
  63. timer.CurrentTimingMethod = TimingMethod.GameTime;
  64. }
  65. }
  66. }
  67. init
  68. {
  69. vars.doneMaps = new List<string>(); // You can accidently checkpoint yourself back to a previous level, so doneMaps needed
  70. }
  71. start
  72. {
  73. if ((current.map == @"ds\map1.aiw") && (current.isLoading == false))
  74. {
  75. vars.doneMaps.Clear();
  76. vars.doneMaps.Add(current.map);
  77. return true;
  78. }
  79. }
  80. split
  81. {
  82. if ((current.map != old.map) && (settings[current.map]))
  83. {
  84. vars.doneMaps.Add(old.map);
  85. return true;
  86. }
  87. }
  88. isLoading
  89. {
  90. return current.isLoading;
  91. }
  92. exit
  93. {
  94. timer.OnStart -= vars.onStart;
  95. }