public void onSplashDamageHook(EventReport data) { KDMXHandler.handleHook("onSplashDamage"); }
public void onPartUndockHook(Part data) { KDMXHandler.handleHook("onPartUndock"); }
public void onSameVesselUndockHook(GameEvents.FromToAction <ModuleDockingNode, ModuleDockingNode> data) { KDMXHandler.handleHook("onSameVesselUndock"); }
public void onCrashHook(EventReport data) { KDMXHandler.handleHook("onCrash"); }
public void onPartExplodeHook(GameEvents.ExplosionReaction data) { KDMXHandler.handleHook("onPartExplode"); }
public void onTimeWarpRateChangedHook() { KDMXHandler.handleHook("onTimeWarpRateChanged"); }
public void onVesselOrbitEscapedHook(Vessel data) { KDMXHandler.handleHook("onVesselOrbitEscaped"); }
public void onGameUnpauseHook() { KDMXHandler.handleHook("onGameUnpause"); }
public void onJointBreakHook(EventReport data) { KDMXHandler.handleHook("onJointBreak"); }
public void onCrewOnEvaHook(GameEvents.FromToAction <Part, Part> data) { KDMXHandler.handleHook("onCrewOnEva"); }
public void onDominantBodyChangeHook(GameEvents.FromToAction <CelestialBody, CelestialBody> data) { KDMXHandler.handleHook("onDominantBodyChange"); }
public void onCrewKilledHook(EventReport data) { KDMXHandler.handleHook("onCrewKilled"); }
public void onCrewBoardVesselHook(GameEvents.FromToAction <Part, Part> data) { KDMXHandler.handleHook("onCrewBoardVessel"); }
public void onCrashSplashdownHook(EventReport data) { KDMXHandler.handleHook("onCrashSplashdown"); }
public void onStageActivateHook(int data) { KDMXHandler.handleHook("onStageActivate"); }
public void onLaunchHook(EventReport data) { KDMXHandler.handleHook("onLaunch"); }
public void onStageSeparationHook(EventReport data) { KDMXHandler.handleHook("onStageSeperation"); }
public void onOverheatHook(EventReport data) { KDMXHandler.handleHook("onOverheat"); }
public void onUndockHook(EventReport data) { KDMXHandler.handleHook("onUndock"); }
public void onPartCoupleHook(GameEvents.FromToAction <Part, Part> data) { KDMXHandler.handleHook("onPartCouple"); }
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); }
/* Event handlers */ public void onCollisionHook(EventReport data) { KDMXHandler.handleHook("onCollision"); }