public void pickupEVAFuelLine() { if (!checkEVAVessel) { ScreenMessages.PostScreenMessage("Current Vessel is not an EVA Kerbal...", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkProfession) { ScreenMessages.PostScreenMessage("The Kerbal must be an " + useProfession + " to activate the transfer line.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkLevel) { ScreenMessages.PostScreenMessage("The Kerbal must be above level " + minLevel + " to activate the transfer line.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!setEVAPosition()) { return; } Events["pickupEVAFuelLine"].active = false; Events["dropEVAFuelLine"].active = true; EVAAttachState = CompoundPart.AttachState.Attaching; compoundPart.attachState = CompoundPart.AttachState.Detached; this.startCap.gameObject.SetActive(true); }
public CompoundPartGeoUpdater(CompoundPart part, GeometryPartModule geoModule) { this.part = part; this.geoModule = geoModule; lastAttachState = part.attachState; lastTarget = part.target; }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); if (!HighLogic.LoadedSceneIsFlight) { return; } if (!node.HasValue("TargetPartID")) { severStrut(); loaded = true; return; } try { targetID = uint.Parse(node.GetValue("TargetPartID")); } catch (Exception e) { print("[EVA Refuel] Exception in assigning target part ID:\n" + e); } EVAAttachState = CompoundPart.AttachState.Attached; StartCoroutine(loadConnections()); }
public void pickupEVAStrut() { if (!checkEVAVessel) { ScreenMessages.PostScreenMessage("Current Vessel is not an EVA Kerbal...", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkProfession) { ScreenMessages.PostScreenMessage("The Kerbal must have the " + useSkill + " to attach the EVA strut.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkLevel) { ScreenMessages.PostScreenMessage("The Kerbal must be above level " + minLevel + " to attach the EVA strut.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!setEVAPosition()) { return; } Events["pickupEVAStrut"].active = false; Events["dropEVAStrut"].active = true; EVAAttachState = CompoundPart.AttachState.Attaching; compoundPart.attachState = CompoundPart.AttachState.Detached; waitTimer = 0; }
private void severFuelLine() { Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = true; Events["cutEVAFuelLine"].active = false; Events["openEVAFuelTransfer"].active = false; Events["closeEVAFuelTransfer"].active = false; Events["cutEVAFuelLine"].unfocusedRange = 4; Events["openEVAFuelTransfer"].unfocusedRange = 5; Events["closeEVAFuelTransfer"].unfocusedRange = 5; if (evaWindow != null) { evaWindow.severConnection(); } OnTargetLost(); targetVessel = null; compoundPart.target = null; compoundPart.direction = Vector3.zero; compoundPart.targetPosition = Vector3.zero; compoundPart.targetRotation = Quaternion.identity; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Detached; }
private void attachFuelLine() { targetVessel = compoundPart.target.vessel; targetVesselID = targetVessel.id; targetID = compoundPart.target.craftID; if (evaWindow == null) { evaWindow = gameObject.AddComponent <EVATransfer_Window>(); evaWindow.setup(transferLF, transferLOX, transferMono, transferXen, transferEC, transferOre, transferAll, this); } evaWindow.activateVessels(vessel, targetVessel); Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = false; Events["cutEVAFuelLine"].active = true; Events["openEVAFuelTransfer"].active = true; Events["closeEVAFuelTransfer"].active = false; OnTargetSet(compoundPart.target); connectionDistance = (endCap.transform.position - startCap.transform.position).magnitude; Events["cutEVAFuelLine"].unfocusedRange = connectionDistance + 10; Events["openEVAFuelTransfer"].unfocusedRange = connectionDistance + 10; Events["closeEVAFuelTransfer"].unfocusedRange = connectionDistance + 10; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Attached; }
public CompoundPartGeoUpdater(CompoundPart part, GeometryPartModule geoModule) { this.part = part; this.geoModule = geoModule; lastAttachState = part.attachState; lastTarget = part.target; }
public void FlightGeometryUpdate() { if (lastAttachState != part.attachState || lastTarget != part.target || !part.vessel.parts.Contains(part.target)) { geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; } }
public void EditorGeometryUpdate() { if (lastAttachState != part.attachState || lastTarget != part.target || !EditorLogic.SortedShipList.Contains(part.target)) { geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; } }
public void EditorGeometryUpdate() { if (lastAttachState != part.attachState || lastTarget != part.target || !EditorLogic.SortedShipList.Contains(part.target)) { geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; } }
public void FlightGeometryUpdate() { if (lastAttachState != part.attachState || lastTarget != part.target || !part.vessel.parts.Contains(part.target)) { geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; } }
public void EditorGeometryUpdate() { if (lastAttachState == part.attachState && lastTarget == part.target && EditorLogic.SortedShipList.Contains(part.target)) { return; } geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; }
public void FlightGeometryUpdate() { if (lastAttachState == part.attachState && lastTarget == part.target && part.vessel.parts.Contains(part.target)) { return; } geoModule.RebuildAllMeshData(); lastAttachState = part.attachState; lastTarget = part.target; }
public void dropEVAStrut() { Events["dropEVAStrut"].active = false; Events["pickupEVAStrut"].active = true; Events["cutEVAStrut"].active = false; Events["cutEVAStrut"].unfocusedRange = 4; EVAAttachState = CompoundPart.AttachState.Detached; compoundPart.attachState = CompoundPart.AttachState.Detached; OnTargetLost(); }
public void dropEVAFuelLine() { Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = true; Events["cutEVAFuelLine"].active = false; Events["openEVAFuelTransfer"].active = false; Events["closeEVAFuelTransfer"].active = false; Events["cutEVAFuelLine"].unfocusedRange = 4; Events["openEVAFuelTransfer"].unfocusedRange = 5; Events["closeEVAFuelTransfer"].unfocusedRange = 5; EVAAttachState = CompoundPart.AttachState.Detached; compoundPart.attachState = CompoundPart.AttachState.Detached; OnTargetLost(); }
private void attachStrut() { targetID = compoundPart.target.flightID; Events["dropEVAStrut"].active = false; Events["pickupEVAStrut"].active = false; Events["cutEVAStrut"].active = true; OnTargetSet(compoundPart.target); connectionDistance = (targetAnchor.position - compoundTransform.position).magnitude; Events["cutEVAStrut"].unfocusedRange = connectionDistance + 10; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Attached; }
private void severStrut() { Events["dropEVAStrut"].active = false; Events["pickupEVAStrut"].active = true; Events["cutEVAStrut"].active = false; Events["cutEVAStrut"].unfocusedRange = 4; OnTargetLost(); compoundPart.target = null; compoundPart.direction = Vector3.zero; compoundPart.targetPosition = Vector3.zero; compoundPart.targetRotation = Quaternion.identity; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Detached; }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); if (!HighLogic.LoadedSceneIsFlight) { return; } if (!node.HasValue("TargetVesselID") || !node.HasValue("TargetPartID")) { loaded = true; severFuelLine(); return; } try { targetVesselID = new Guid(node.GetValue("TargetVesselID")); } catch (Exception e) { print("[EVA Refuel] Exception in assigning vessel ID:\n" + e); } try { targetID = uint.Parse(node.GetValue("TargetPartID")); } catch (Exception e) { print("[EVA Refuel] Exception in assigning target part ID:\n" + e); } EVAAttachState = CompoundPart.AttachState.Attached; loaded = false; }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); if (!HighLogic.LoadedSceneIsFlight) return; if (!node.HasValue("TargetVesselID") || !node.HasValue("TargetPartID")) { loaded = true; severFuelLine(); return; } try { targetVesselID = new Guid(node.GetValue("TargetVesselID")); } catch (Exception e) { print("[EVA Refuel] Exception in assigning vessel ID:\n" + e); } try { targetID = uint.Parse(node.GetValue("TargetPartID")); } catch (Exception e) { print("[EVA Refuel] Exception in assigning target part ID:\n" + e); } EVAAttachState = CompoundPart.AttachState.Attached; loaded = false; }
public void dropEVAFuelLine() { Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = true; Events["cutEVAFuelLine"].active = false; Events["openEVAFuelTransfer"].active = false; Events["closeEVAFuelTransfer"].active = false; Events["cutEVAFuelLine"].unfocusedRange = 4; Events["openEVAFuelTransfer"].unfocusedRange = 5; Events["closeEVAFuelTransfer"].unfocusedRange = 5; EVAAttachState = CompoundPart.AttachState.Detached; compoundPart.attachState = CompoundPart.AttachState.Detached; OnTargetLost(); }
private void attachFuelLine() { targetVessel = compoundPart.target.vessel; targetVesselID = targetVessel.id; targetID = compoundPart.target.craftID; if (evaWindow == null) { evaWindow = gameObject.AddComponent<EVATransfer_Window>(); evaWindow.setup(transferLF, transferLOX, transferMono, transferXen, transferEC, transferOre, transferAll, this); } evaWindow.activateVessels(sourceVessel, targetVessel); Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = false; Events["cutEVAFuelLine"].active = true; Events["openEVAFuelTransfer"].active = true; Events["closeEVAFuelTransfer"].active = false; OnTargetSet(compoundPart.target); connectionDistance = (endCap.transform.position - startCap.transform.position).magnitude; Events["cutEVAFuelLine"].unfocusedRange = connectionDistance + 10; Events["openEVAFuelTransfer"].unfocusedRange = connectionDistance + 10; Events["closeEVAFuelTransfer"].unfocusedRange = connectionDistance + 10; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Attached; }
public void pickupEVAFuelLine() { if (!checkEVAVessel) { ScreenMessages.PostScreenMessage("Current Vessel is not an EVA Kerbal...", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkProfession) { ScreenMessages.PostScreenMessage("The Kerbal must be an " + useProfession + " to activate the transfer line.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!checkLevel) { ScreenMessages.PostScreenMessage("The Kerbal must be above level " + minLevel + "to activate the transfer line.", 6f, ScreenMessageStyle.UPPER_CENTER); return; } if (!setEVAPosition()) return; Events["pickupEVAFuelLine"].active = false; Events["dropEVAFuelLine"].active = true; EVAAttachState = CompoundPart.AttachState.Attaching; compoundPart.attachState = CompoundPart.AttachState.Detached; this.startCap.gameObject.SetActive(true); }
private void severFuelLine() { Events["dropEVAFuelLine"].active = false; Events["pickupEVAFuelLine"].active = true; Events["cutEVAFuelLine"].active = false; Events["openEVAFuelTransfer"].active = false; Events["closeEVAFuelTransfer"].active = false; Events["cutEVAFuelLine"].unfocusedRange = 4; Events["openEVAFuelTransfer"].unfocusedRange = 5; Events["closeEVAFuelTransfer"].unfocusedRange = 5; if (evaWindow != null) { evaWindow.severConnection(); } OnTargetLost(); targetVessel = null; compoundPart.target = null; compoundPart.direction = Vector3.zero; compoundPart.targetPosition = Vector3.zero; compoundPart.targetRotation = Quaternion.identity; compoundPart.attachState = CompoundPart.AttachState.Detached; EVAAttachState = CompoundPart.AttachState.Detached; }