public override MyObjectBuilder_CubeBlock GetObjectBuilderCubeBlock(bool copy = false) { MyObjectBuilder_CubeBlock objectBuilderCubeBlock = base.GetObjectBuilderCubeBlock(copy); MyObjectBuilder_AttachableTopBlockBase base2 = objectBuilderCubeBlock as MyObjectBuilder_AttachableTopBlockBase; if (base2 != null) { base2.ParentEntityId = (this.m_parentBlock != null) ? this.m_parentBlock.EntityId : 0L; base2.YieldLastComponent = base.SlimBlock.YieldLastComponent; } return(objectBuilderCubeBlock); }
public override void Init(MyObjectBuilder_CubeBlock builder, MyCubeGrid cubeGrid) { base.Init(builder, cubeGrid); MyObjectBuilder_AttachableTopBlockBase base2 = builder as MyObjectBuilder_AttachableTopBlockBase; if (base2 != null) { if (!base2.YieldLastComponent) { base.SlimBlock.DisableLastComponentYield(); } if (base2.ParentEntityId != 0) { VRage.Game.Entity.MyEntity entity; Sandbox.Game.Entities.MyEntities.TryGetEntityById(base2.ParentEntityId, out entity, false); MyMechanicalConnectionBlockBase base3 = entity as MyMechanicalConnectionBlockBase; if (base3 != null) { base3.MarkForReattach(); } } } this.LoadDummies(); }