public void RemoveComponent(BuildingPart bp)
        {
            var v3        = new SerializedVector3(bp.Location - Origo.Position.ToVector3());
            var q         = new SerializedQuaternion(bp.buildingBlock.transform.rotation);
            var component = new StructureComponent(bp, v3, q);

            if (StructureComponents.ContainsKey(component.ToString()))
            {
                StructureComponents.Remove(component.ToString());
            }
        }
 public void AddComponent(BuildingPart bp)
 {
     if (Origo == null)
     {
         Origo = new Origo(new SerializedVector3(bp.Location), new SerializedQuaternion(bp.buildingBlock.transform.rotation));
     }
     var v3 = new SerializedVector3(bp.Location - Origo.Position.ToVector3());
     var q = new SerializedQuaternion(bp.buildingBlock.transform.rotation);
     var component = new StructureComponent(bp, v3, q);
     if (component == null)
     {
         Pluton.Logger.LogDebug("[StructureRecorder] BuildingPart component is null!");
         return;
     }
     if (!StructureComponents.ContainsKey(component.ToString()))
     {
         StructureComponents.Add(component.ToString(), component);
     }
     else
     {
         StructureComponents[component.ToString()] = component;
     }
 }
        public void AddComponent(BuildingPart bp)
        {
            if (Origo == null)
            {
                Origo = new Origo(new SerializedVector3(bp.Location), new SerializedQuaternion(bp.buildingBlock.transform.rotation));
            }
            var v3        = new SerializedVector3(bp.Location - Origo.Position.ToVector3());
            var q         = new SerializedQuaternion(bp.buildingBlock.transform.rotation);
            var component = new StructureComponent(bp, v3, q);

            if (component == null)
            {
                Pluton.Logger.LogDebug("[StructureRecorder] BuildingPart component is null!");
                return;
            }
            if (!StructureComponents.ContainsKey(component.ToString()))
            {
                StructureComponents.Add(component.ToString(), component);
            }
            else
            {
                StructureComponents[component.ToString()] = component;
            }
        }
 public void RemoveComponent(BuildingPart bp)
 {
     var v3 = new SerializedVector3(bp.Location - Origo.Position.ToVector3());
     var q = new SerializedQuaternion(bp.buildingBlock.transform.rotation);
     var component = new StructureComponent(bp, v3, q);
     if (StructureComponents.ContainsKey(component.ToString()))
     {
         StructureComponents.Remove(component.ToString());
     }
 }