public SettlementData(SettlementData oldSettlementData, List <Resource> newResources) { planet = oldSettlementData.planet; cosmicPortData = oldSettlementData.cosmicPortData; manufactoryData = oldSettlementData.manufactoryData; starLabsData = oldSettlementData.starLabsData; resources = newResources; }
public SettlementData(Planet planet, CosmicPortData cosmicPortData, ManufactoryData manufactoryData, StarLabsData starLabsData, StudiesSaveData studiesSaveData, ProductionData productionData, List <Resource> resources) { this.planet = planet; this.cosmicPortData = cosmicPortData; this.manufactoryData = manufactoryData; this.starLabsData = starLabsData; this.studiesSaveData = studiesSaveData; this.productionData = productionData; this.resources = resources; }
private void ReserveDock(List <Dock> docksToSave) { //TODO: remove return when done testing return; int cosmicPortLevel = Settlement.Instance.CosmicPort.LevelModule.Level; var newDocksData = new List <DockData>(docksToSave.Count); docksToSave.ForEach(d => newDocksData.Add(new DockData(d))); var cosmicPortData = new CosmicPortData(cosmicPortLevel, newDocksData); PlayerDataManager.Instance.PlayerData.SaveCosmicPortData(selectedDestination, cosmicPortData); }
public void SaveCosmicPortData(Planet planet, CosmicPortData cosmicPortData) { switch (planet) { case Planet.Earth: earthData.cosmicPortData = cosmicPortData; break; case Planet.Moon: moonData.cosmicPortData = cosmicPortData; break; case Planet.Mars: marsData.cosmicPortData = cosmicPortData; break; } }
private void ChangeOtherCosmicPortDocksData() { List <Dock> destinationDocks = PlayerDataManager.Instance.GetDocksByPlanet(destination); foreach (var dock in destinationDocks) { if (dock.DockID != destinationDock.DockID) { continue; } dock.ReceiveShip(ship); } int cosmicPortLevel = Settlement.Instance.CosmicPort.LevelModule.Level; var newDocksData = new List <DockData>(destinationDocks.Count); destinationDocks.ForEach(d => newDocksData.Add(new DockData(d))); var cosmicPortData = new CosmicPortData(cosmicPortLevel, newDocksData); PlayerDataManager.Instance.PlayerData.SaveCosmicPortData(destination, cosmicPortData); }