public CryoResourceItem(CryoResourceItem source) { name = source.name; boiloffRate = source.boiloffRate; outputResource = source.outputResource; outputRate = source.outputRate; setupOutput(); }
public CryoResourceItem(CryoResourceItem source) { name = source.name; id = source.id; abbreviation = source.abbreviation; boiloffRate = source.boiloffRate; outputResource = source.outputResource; outputRate = source.outputRate; outputRatio = source.outputRatio; hasOutput = source.hasOutput; density = source.density; volume = source.volume; heatOfVaporization = source.heatOfVaporization; specificHeatCapacity = source.specificHeatCapacity; tempBoil = source.tempBoil; }
public override void OnLoad(ConfigNode node) { if (part.partInfo == null || part.partInfo.partPrefab == null) { cryoResources.Clear(); ConfigNode[] cryoResourceNodes = node.GetNodes(CryoResourceItem.itemName); //Debug.Log("[ModuleBdbBoiloff] Found " + cryoResourceNodes.Count() + " " + CryoResourceItem.itemName + " nodes"); foreach (ConfigNode cryoResourceNode in cryoResourceNodes) { CryoResourceItem newItem = new CryoResourceItem(cryoResourceNode); Debug.Log("[ModuleBdbBoiloff] Adding " + newItem.name + ", " + newItem.boiloffRate); if (PartResourceLibrary.Instance.GetDefinition(newItem.name) != null) { cryoResources.Add(newItem); } else { Debug.Log("[ModuleBdbBoiloff] Resource " + newItem.name + " not found"); } } } else { if (part.partInfo.partPrefab.Modules.Contains("ModuleBdbBoiloff")) { ModuleBdbBoiloff prefab = (ModuleBdbBoiloff)part.partInfo.partPrefab.Modules["ModuleBdbBoiloff"]; //Debug.Log("[ModuleBdbBoiloff] Loading " + prefab.cryoResources.Count() + " resources from prefab part."); foreach (CryoResourceItem item in prefab.cryoResources) { CryoResourceItem newItem = new CryoResourceItem(item); cryoResources.Add(newItem); } } else { Debug.Log("[ModuleBdbBoiloff] ModuleCryoResource not found on prefab part."); } } }
public CryoResourceItem(CryoResourceItem source) { name = source.name; boiloffRate = source.boiloffRate; }
public override void OnLoad(ConfigNode node) { if (part.partInfo == null || part.partInfo.partPrefab == null) { cryoResources.Clear(); ConfigNode[] cryoResourceNodes = node.GetNodes(CryoResourceItem.itemName); Debug.Log("[ModuleBdbBoiloff] Found " + cryoResourceNodes.Count() + " " + CryoResourceItem.itemName + " nodes"); foreach (ConfigNode cryoResourceNode in cryoResourceNodes) { CryoResourceItem newItem = new CryoResourceItem(cryoResourceNode); Debug.Log("[ModuleBdbBoiloff] Adding " + newItem.name + ", " + newItem.boiloffRate); if (PartResourceLibrary.Instance.GetDefinition(newItem.name) != null) { cryoResources.Add(newItem); } else { Debug.Log("[ModuleBdbBoiloff] Resource " + newItem.name + " not found"); } } } else { if (part.partInfo.partPrefab.Modules.Contains("ModuleBdbBoiloff")) { ModuleBdbBoiloff prefab = (ModuleBdbBoiloff)part.partInfo.partPrefab.Modules["ModuleBdbBoiloff"]; Debug.Log("[ModuleBdbBoiloff] Loading " + prefab.cryoResources.Count() + " resources from prefab part."); foreach (CryoResourceItem item in prefab.cryoResources) { CryoResourceItem newItem = new CryoResourceItem(item); cryoResources.Add(newItem); } } else { Debug.Log("[ModuleBdbBoiloff] ModuleCryoResource not found on prefab part."); } } }