void OnToggleTeam(MissileFire wm, BDArmorySettings.BDATeams team) { if(!weaponManager || !wm) return; if(team != BDATargetManager.BoolToTeam(weaponManager.team)) { if(wm.vesselRadarData) { UnlinkVRD(wm.vesselRadarData); } } else if(wm.vessel == vessel) { UnlinkAllExternalRadars(); } RemoveDisconnectedRadars(); }
void OnToggleTeam(MissileFire mf, BDArmorySettings.BDATeams team) { if(mf.vessel == vessel || (commandLeader && commandLeader.vessel == mf.vessel)) { ReleaseCommand(); } }
void OnToggleTeam(MissileFire mf, BDArmorySettings.BDATeams team) { RefreshFriendlies(); RefreshWingmen(); }
void RemoveTarget(TargetInfo target, BDArmorySettings.BDATeams team) { TargetDatabase[team].Remove(target); }
public static BDArmorySettings.BDATeams OtherTeam(BDArmorySettings.BDATeams team) { return team == BDArmorySettings.BDATeams.A ? BDArmorySettings.BDATeams.B : BDArmorySettings.BDATeams.A; }
void Start() { Instance = this; //settings SetupSettingsSize(); LoadConfig(); //wmgr tolbar toolbarWindowRect = new Rect(Screen.width-toolWindowWidth-4, 150, toolWindowWidth, toolWindowHeight); physRangeTimer = Time.time; GAME_UI_ENABLED = true; fireKeyGui = BDInputSettingsFields.WEAP_FIRE_KEY.inputString; //setup gui styles centerLabel = new GUIStyle(); centerLabel.alignment = TextAnchor.UpperCenter; centerLabel.normal.textColor = Color.white; centerLabelRed = new GUIStyle(); centerLabelRed.alignment = TextAnchor.UpperCenter; centerLabelRed.normal.textColor = Color.red; centerLabelOrange = new GUIStyle(); centerLabelOrange.alignment = TextAnchor.UpperCenter; centerLabelOrange.normal.textColor = XKCDColors.BloodOrange; centerLabelBlue = new GUIStyle(); centerLabelBlue.alignment = TextAnchor.UpperCenter; centerLabelBlue.normal.textColor = XKCDColors.AquaBlue; leftLabel = new GUIStyle(); leftLabel.alignment = TextAnchor.UpperLeft; leftLabel.normal.textColor = Color.white; leftLabelRed = new GUIStyle(); leftLabelRed.alignment = TextAnchor.UpperLeft; leftLabelRed.normal.textColor = Color.red; rightLabelRed = new GUIStyle(); rightLabelRed.alignment = TextAnchor.UpperRight; rightLabelRed.normal.textColor = Color.red; leftLabelGray = new GUIStyle(); leftLabelGray.alignment = TextAnchor.UpperLeft; leftLabelGray.normal.textColor = Color.gray; rippleSliderStyle = new GUIStyle(HighLogic.Skin.horizontalSlider); rippleThumbStyle = new GUIStyle(HighLogic.Skin.horizontalSliderThumb); rippleSliderStyle.fixedHeight = rippleThumbStyle.fixedHeight = 0; kspTitleLabel = new GUIStyle(); kspTitleLabel.normal.textColor = HighLogic.Skin.window.normal.textColor; kspTitleLabel.font = HighLogic.Skin.window.font; kspTitleLabel.fontSize = HighLogic.Skin.window.fontSize; kspTitleLabel.fontStyle = HighLogic.Skin.window.fontStyle; kspTitleLabel.alignment = TextAnchor.UpperCenter; // if(HighLogic.LoadedSceneIsFlight) { ApplyPhysRange(); SaveVolumeSettings(); GameEvents.onHideUI.Add(HideGameUI); GameEvents.onShowUI.Add(ShowGameUI); GameEvents.onVesselGoOffRails.Add(OnVesselGoOffRails); GameEvents.OnGameSettingsApplied.Add(SaveVolumeSettings); GameEvents.onVesselCreate.Add(ApplyNewVesselRanges); /* foreach(var cam in FlightCamera.fetch.cameras) { cam.gameObject.AddComponent<CameraBulletRenderer>(); } */ gpsWindowRect = new Rect(0, 0, toolbarWindowRect.width-10, 0); GameEvents.onVesselChange.Add(VesselChange); } }
void MissileFireOnToggleTeam(MissileFire wm, BDArmorySettings.BDATeams team) { if(showGUI) { UpdateList(); } }