Beispiel #1
0
        public Town(MainSaveFile saveFile)
        {
            SaveFile = saveFile;
            var offsets = MainOffsets.GetOffsets(SaveFile.GetRevision());

            // Load Town Data
            TownId = SaveFile.ReadStruct <TownID>(offsets.Offset_TownId);

            // Load Villagers
            for (var i = 0; i < 10; i++)
            {
                Villagers[i] = new Villager(saveFile, i);
            }

            // Load Patterns
            for (var i = 0; i < 50; i++)
            {
                Patterns[i] = new DesignPattern(saveFile, i);
            }

            // Load Buildings
            for (var i = 0; i < 46; i++)
            {
                Buildings[i] = new Building(saveFile, i);
            }

            StalkMarket = new StalkMarket(SaveFile);
        }