예제 #1
0
 public void onSplashDamageHook(EventReport data)
 {
     KDMXHandler.handleHook("onSplashDamage");
 }
예제 #2
0
 public void onPartUndockHook(Part data)
 {
     KDMXHandler.handleHook("onPartUndock");
 }
예제 #3
0
 public void onSameVesselUndockHook(GameEvents.FromToAction <ModuleDockingNode, ModuleDockingNode> data)
 {
     KDMXHandler.handleHook("onSameVesselUndock");
 }
예제 #4
0
 public void onCrashHook(EventReport data)
 {
     KDMXHandler.handleHook("onCrash");
 }
예제 #5
0
 public void onPartExplodeHook(GameEvents.ExplosionReaction data)
 {
     KDMXHandler.handleHook("onPartExplode");
 }
예제 #6
0
 public void onTimeWarpRateChangedHook()
 {
     KDMXHandler.handleHook("onTimeWarpRateChanged");
 }
예제 #7
0
 public void onVesselOrbitEscapedHook(Vessel data)
 {
     KDMXHandler.handleHook("onVesselOrbitEscaped");
 }
예제 #8
0
 public void onGameUnpauseHook()
 {
     KDMXHandler.handleHook("onGameUnpause");
 }
예제 #9
0
 public void onJointBreakHook(EventReport data)
 {
     KDMXHandler.handleHook("onJointBreak");
 }
예제 #10
0
 public void onCrewOnEvaHook(GameEvents.FromToAction <Part, Part> data)
 {
     KDMXHandler.handleHook("onCrewOnEva");
 }
예제 #11
0
 public void onDominantBodyChangeHook(GameEvents.FromToAction <CelestialBody, CelestialBody> data)
 {
     KDMXHandler.handleHook("onDominantBodyChange");
 }
예제 #12
0
 public void onCrewKilledHook(EventReport data)
 {
     KDMXHandler.handleHook("onCrewKilled");
 }
예제 #13
0
 public void onCrewBoardVesselHook(GameEvents.FromToAction <Part, Part> data)
 {
     KDMXHandler.handleHook("onCrewBoardVessel");
 }
예제 #14
0
 public void onCrashSplashdownHook(EventReport data)
 {
     KDMXHandler.handleHook("onCrashSplashdown");
 }
예제 #15
0
 public void onStageActivateHook(int data)
 {
     KDMXHandler.handleHook("onStageActivate");
 }
예제 #16
0
 public void onLaunchHook(EventReport data)
 {
     KDMXHandler.handleHook("onLaunch");
 }
예제 #17
0
 public void onStageSeparationHook(EventReport data)
 {
     KDMXHandler.handleHook("onStageSeperation");
 }
예제 #18
0
 public void onOverheatHook(EventReport data)
 {
     KDMXHandler.handleHook("onOverheat");
 }
예제 #19
0
 public void onUndockHook(EventReport data)
 {
     KDMXHandler.handleHook("onUndock");
 }
예제 #20
0
 public void onPartCoupleHook(GameEvents.FromToAction <Part, Part> data)
 {
     KDMXHandler.handleHook("onPartCouple");
 }
예제 #21
0
        public void Start()
        {
            print("[KDMX] And now we are starting to take over the entire Kerbalverse!");
            string currentLevel = Application.loadedLevelName;

            print("[KDMX] Current level is " + currentLevel);

            if (currentLevel != "loadingBuffer")
            {
                print("[KDMX] We are not loading!");
                print("[KDMX] Loading Preferences!!");
                LoadPrefs();
                print("[KDMX] Preferences Loaded!");

                print("[KDMX] Adding hooks to GameEvents");
                GameEvents.onCollision.Add(this.onCollisionHook);
                print("[KDMX] Hook added: onCollision");
                GameEvents.onCrash.Add(this.onCrashHook);
                print("[KDMX] Hook added: onCrash");
                GameEvents.onCrashSplashdown.Add(this.onCrashSplashdownHook);
                print("[KDMX] Hook added: onCrashSplashdown");
                GameEvents.onCrewBoardVessel.Add(this.onCrewBoardVesselHook);
                print("[KDMX] Hook added: onCrewBoardVessel");
                GameEvents.onCrewKilled.Add(this.onCrewKilledHook);
                print("[KDMX] Hook added: onCrewKilled");
                GameEvents.onCrewOnEva.Add(this.onCrewOnEvaHook);
                print("[KDMX] Hook added: onCrewEva");
                GameEvents.onDominantBodyChange.Add(this.onDominantBodyChangeHook);
                print("[KDMX] Hook added: onDominantBodyChange");
                GameEvents.onGamePause.Add(this.onGamePauseHook);
                print("[KDMX] Hook added: onGamePause");
                GameEvents.onGameUnpause.Add(this.onGameUnpauseHook);
                print("[KDMX] Hook added: onGameUnpause");
                GameEvents.onJointBreak.Add(this.onJointBreakHook);
                print("[KDMX] Hook added: onJointBreak");
                GameEvents.onLaunch.Add(this.onLaunchHook);
                print("[KDMX] Hook added: onLaunch");
                GameEvents.onOverheat.Add(this.onOverheatHook);
                print("[KDMX] Hook added: onOverheat");
                GameEvents.onPartCouple.Add(this.onPartCoupleHook);
                print("[KDMX] Hook added: onPartCouple");
                GameEvents.onPartExplode.Add(this.onPartExplodeHook);
                print("[KDMX] Hook added: onPartExplode");
                GameEvents.onPartUndock.Add(this.onPartUndockHook);
                print("[KDMX] Hook added: onPartUndock");
                GameEvents.onSameVesselDock.Add(this.onSameVesselDockHook);
                print("[KDMX] Hook added: onSameVesselDock");
                GameEvents.onSameVesselUndock.Add(this.onSameVesselUndockHook);
                print("[KDMX] Hook added: onSameVesselUndock");
                GameEvents.onSplashDamage.Add(this.onSplashDamageHook);
                print("[KDMX] Hook added: onSplashDamage");
                GameEvents.onStageActivate.Add(this.onStageActivateHook);
                print("[KDMX] Hook added: onStageActivate");
                GameEvents.onStageSeparation.Add(this.onStageSeparationHook);
                print("[KDMX] Hook added: onStageSeperation");
                GameEvents.onTimeWarpRateChanged.Add(this.onTimeWarpRateChangedHook);
                print("[KDMX] Hook added: onTimeWarpRateChanged");
                GameEvents.onUndock.Add(this.onUndockHook);
                print("[KDMX] Hook added: onUndock");
                GameEvents.onVesselOrbitClosed.Add(this.onVesselOrbitClosedHook);
                print("[KDMX] Hook added: onVesselOrbitClosed");
                GameEvents.onVesselOrbitEscaped.Add(this.onVesselOrbitEscapedHook);
                print("[KDMX] Hook added: onVesselOrbitEscaped");
                print("[KDMX] Hooks added");

                KDMXHandler.startDMX();
                print("[KDMX] DMX Handler initialized");
            }
            else
            {
                print("[KDMX] The game is still loading, do nothing...");
            }

            windowStyle = new GUIStyle(HighLogic.Skin.window);
        }
예제 #22
0
 /* Event handlers */
 public void onCollisionHook(EventReport data)
 {
     KDMXHandler.handleHook("onCollision");
 }