public override void Load(BaseNetworkable.LoadInfo info) { base.Load(info); if (info.fromDisk && info.msg.miningQuarry != null) { if (this.fuelStoragePrefab.instance == null || this.hopperPrefab.instance == null) { Debug.Log("Cannot load mining quary because children were null"); return; } this.fuelStoragePrefab.instance.GetComponent <StorageContainer>().inventory.Load(info.msg.miningQuarry.extractor.fuelContents); this.hopperPrefab.instance.GetComponent <StorageContainer>().inventory.Load(info.msg.miningQuarry.extractor.outputContents); this.staticType = (MiningQuarry.QuarryType)info.msg.miningQuarry.staticType; } }
public override void Load(BaseNetworkable.LoadInfo info) { base.Load(info); if (!info.fromDisk || info.msg.miningQuarry == null) { return; } if (Object.op_Equality((Object)this.fuelStoragePrefab.instance, (Object)null) || Object.op_Equality((Object)this.hopperPrefab.instance, (Object)null)) { Debug.Log((object)"Cannot load mining quary because children were null"); } else { ((StorageContainer)((Component)this.fuelStoragePrefab.instance).GetComponent <StorageContainer>()).inventory.Load((ItemContainer)((ResourceExtractor)((MiningQuarry)info.msg.miningQuarry).extractor).fuelContents); ((StorageContainer)((Component)this.hopperPrefab.instance).GetComponent <StorageContainer>()).inventory.Load((ItemContainer)((ResourceExtractor)((MiningQuarry)info.msg.miningQuarry).extractor).outputContents); this.staticType = (MiningQuarry.QuarryType)((MiningQuarry)info.msg.miningQuarry).staticType; } }