/// <inheritdoc/> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, cfgNode: node); ConfigAccessor.ReadFieldsFromNode(node, GetType(), this, StdPersistentGroups.PartPersistant); base.OnLoad(node); parsedAttachNode = part.FindAttachNode(attachNodeName); isAutoAttachNode = parsedAttachNode == null; if (isAutoAttachNode) { parsedAttachNode = KASAPI.AttachNodesUtils.ParseNodeFromString( part, attachNodeDef, attachNodeName); if (parsedAttachNode != null) { HostedDebugLog.Fine( this, "Created auto node: {0}", KASAPI.AttachNodesUtils.NodeId(parsedAttachNode)); if (coupleNode != null && (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor)) { // Only pre-add the node in the scenes that assume restoring a vessel state. // We'll drop it in the OnStartFinished if not used. KASAPI.AttachNodesUtils.AddNode(part, coupleNode); } } else { HostedDebugLog.Error(this, "Cannot create auto node from: {0}", attachNodeDef); } } if (parsedAttachNode != null) { // HACK: Handle a KIS issue which causes the nodes to be owned by the prefab part. parsedAttachNode.owner = part; nodeTransform = KASAPI.AttachNodesUtils.GetTransformForNode(part, parsedAttachNode); } }
/// <inheritdoc/> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, cfgNode: node); ConfigAccessor.ReadFieldsFromNode(node, GetType(), this, StdPersistentGroups.PartPersistant); base.OnLoad(node); if (!PartLoader.Instance.IsReady()) { CreatePartModel(); } }
/// <inheritdoc/> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, cfgNode: node); ConfigAccessor.ReadFieldsFromNode(node, GetType(), this, StdPersistentGroups.PartPersistant); base.OnLoad(node); if (!moduleSettingsLoaded) { moduleSettingsLoaded = true; InitModuleSettings(); } }
/// <inheritdoc/> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, node); // For the procedural and simple modes use the hardcoded model names. if (sourceJointConfig.type != PipeEndType.PrefabModel) { sourceJointConfig.modelPath = ProceduralSourceJointObjectName; } if (targetJointConfig.type != PipeEndType.PrefabModel) { targetJointConfig.modelPath = ProceduralTargetJointObjectName; } base.OnLoad(node); }
/// <inheritdoc cref="IPartModule.OnLoad" /> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, cfgNode: node); ConfigAccessor.ReadFieldsFromNode(node, GetType(), this, StdPersistentGroups.PartPersistant); base.OnLoad(node); if (vessel == null && PartLoader.Instance.IsReady()) { HostedDebugLog.Info(this, "EVA construction part loaded"); OnEvaPartLoaded(); } if (!_moduleSettingsLoaded) { _moduleSettingsLoaded = true; InitModuleSettings(); } }
/// <inheritdoc/> public override void OnLoad(ConfigNode node) { ConfigAccessor.ReadPartConfig(this, cfgNode: node); ConfigAccessor.ReadFieldsFromNode(node, GetType(), this, StdPersistentGroups.PartPersistant); base.OnLoad(node); }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); // Load part's config custom fields in the scenes that clone the parts. ConfigAccessor.ReadPartConfig(this, node); }