private static void handleDefaultGroupsForPart(Part part, ModuleDCKAG defaultActionGroupModule) { foreach (PartModule module in part.Modules) { if (module.moduleName == defaultActionGroupModule.moduleSource) { handleDefaultGroupsForPartModule(part, module, defaultActionGroupModule); } } }
private static void handleDefaultGroupsForAnimationModule( Part part, ModuleAnimateGeneric animationModule, ModuleDCKAG defaultActionGroupModule) { if (animationModule.actionGUIName == defaultActionGroupModule.actionGuiName) { foreach (BaseAction action in animationModule.Actions) { action.actionGroup |= defaultActionGroupModule.defaultActionGroup; action.defaultActionGroup |= defaultActionGroupModule.defaultActionGroup; } } }
private static void handleDefaultGroupsForPartModule( Part part, PartModule module, ModuleDCKAG defaultActionGroupModule) { ModuleAnimateGeneric animationModule = module as ModuleAnimateGeneric; if (animationModule != null) { handleDefaultGroupsForAnimationModule(part, animationModule, defaultActionGroupModule); return; } foreach (BaseAction action in module.Actions) { if (action.guiName == defaultActionGroupModule.actionGuiName) { action.actionGroup |= defaultActionGroupModule.defaultActionGroup; action.defaultActionGroup |= defaultActionGroupModule.defaultActionGroup; } } }