Exemple #1
0
 public SettlementData(SettlementData oldSettlementData, List <Resource> newResources)
 {
     planet          = oldSettlementData.planet;
     cosmicPortData  = oldSettlementData.cosmicPortData;
     manufactoryData = oldSettlementData.manufactoryData;
     starLabsData    = oldSettlementData.starLabsData;
     resources       = newResources;
 }
Exemple #2
0
 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;
 }
Exemple #3
0
    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);
    }
Exemple #4
0
    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;
        }
    }
Exemple #5
0
    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);
    }