示例#1
0
    public override void SetSavableData(CosmicPortData data)
    {
        // Set Levels
        print("Level is " + data.institutionLevel);
        int institutionLevel = data.institutionLevel;

        if (institutionLevel == 0)
        {
            institutionLevel = 1;
        }

        LevelModule.SetLevel(institutionLevel);

        // Set Docks
        AllDocks = new List <Dock>(data.docksData.Count);
        data.docksData.ForEach(d => AllDocks.Add(new Dock(d)));
    }
示例#2
0
    public override void SetSavableData(ManufactoryData data)
    {
        // Set Levels
        LevelModule.SetLevel(data.institutionLevel);

        // Set ManufactorTasks
        ManufactoryTasks = new List <ManufactoryTask>(data.tasksData.Count);
        data.tasksData.ForEach(d => ManufactoryTasks.Add(new ManufactoryTask(d)));

        // Set ShipsInStorage
        ShipsInStorage = new List <Ship>(data.shipsInStorageData);

        foreach (var storageItem in ShipsInStorage)
        {
            if (storageItem.shipType == ShipsDSID.Skyhook)
            {
                SkyhooksInStorage++;
            }
        }
    }