private void LoadModuleState(ConfigNode node) { if (node.HasValue("progress")) { float.TryParse(node.GetValue("progress"), out progress); } if (node.HasValue("lastUpdateTime")) { double.TryParse(node.GetValue("lastUpdateTime"), out lastUpdateTime); } if (node.HasValue("KACAlarmID")) { KACAlarmID = node.GetValue("KACAlarmID"); } foreach (ConfigNode cn in node.nodes) { if (cn.name == "ProcessedItem") { _processedItem = new WorkshopItem(); _processedItem.Load(cn); } if (cn.name == "ProcessedBlueprint") { _processedBlueprint = new Blueprint(); _processedBlueprint.Load(cn); } if (cn.name == "Queue") { _queue.Load(cn); } } }
private void LoadModuleState(ConfigNode node) { foreach (ConfigNode cn in node.nodes) { if (cn.name == "ProcessedItem") { _processedItem = new WorkshopItem(); _processedItem.Load(cn); } if (cn.name == "ProcessedBlueprint") { _processedBlueprint = new Blueprint(); _processedBlueprint.Load(cn); } if (cn.name == "Queue") { _queue.Load(cn); } } }