CLSSpace AddPartToNewSpace(CLSPart p) { CLSSpace newSpace = new CLSSpace(this); listSpaces.Add(newSpace); newSpace.AddPart(p); return(newSpace); }
CLSSpace AddPartToSpace(CLSPart p, CLSSpace space) { //Debug.Log("AddPartToSpace " + ((Part)p).name); if (null != space) { space.AddPart(p); } else { Debug.LogError("Can't add part " + ((Part)p).partInfo.title + " to null space"); } return(space); }
CLSSpace AddPartToSpace(CLSPart p, CLSSpace space) { //Debug.Log($"[CLS]: AddPartToSpace {((Part)p).name}"); if (null != space) { space.AddPart(p); } else { Debug.LogError($"Can't add part {((Part)p).partInfo.title} to null space"); } return(space); }
CLSSpace AddPartToSpace(CLSPart p, CLSSpace space) { Log.dbg("AddPartToSpace {0}", ((Part)p).name); if (null != space) { space.AddPart(p); } else { Log.error("Can't add part {0} to null space", ((Part)p).partInfo.title); } return(space); }
public void MergeSpaces(ICLSSpace space1, ICLSSpace space2) { if (space1 == space2) { return; } if (listSpaces.Contains(space1) && listSpaces.Contains(space2)) { CLSSpace space1Real = space1 as CLSSpace; List <ICLSPart> partsToAdd = space2.Parts; for (int i = 0; i < partsToAdd.Count; i++) { space1Real.AddPart(partsToAdd[i] as CLSPart); } listSpaces.Remove(space2); // Probably should not fire in this method. // CLSAddon.onCLSVesselChange.Fire(space1Real.Parts[0].Part.vessel); } }
CLSSpace AddPartToNewSpace(CLSPart p) { CLSSpace newSpace = new CLSSpace(this); this.listSpaces.Add(newSpace); newSpace.AddPart(p); return newSpace; }
CLSSpace AddPartToSpace(CLSPart p, CLSSpace space) { //Debug.Log("AddPartToSpace " + ((Part)p).name); if (null != space) { space.AddPart(p); } else { Debug.LogError("Can't add part " + ((Part)p).partInfo.title +" to null space"); } return space; }