public async Task LoadStuff()
        {
            UI.InitialiseOptionLoaderDict();
            AvailablePerks = AvailablePerks ?? FileReading.LoadJSON <AvailablePerks>("Data/Perks/Perks.txt");
            LoadLottery();
            LoadActivity();
            CheckEvents();

            await AMI.Neitsillia.Areas.Nests.Nest.LoadNests();

            AMI.Handlers.TaskHandler.Initiate();
            AMI.Neitsillia.NPCSystems.PopulationHandler.Start();
        }
Beispiel #2
0
        internal static Campaign Load(string name)
        {
            if (File.Exists(name))
            {
                return(FileReading.LoadJSON <Campaign>(name));
            }

            foreach (FileInfo file in new DirectoryInfo(
                         cmpgPath).GetFiles())
            {
                if (file.Name == name)
                {
                    return(FileReading.LoadJSON <Campaign>(file.FullName));
                }
            }
            return(null);
        }
        //Lottery
        void LoadLottery()
        {
            if (lottery != null)
            {
                return;
            }

            if (File.Exists(Lottery.savePath))
            {
                lottery = FileReading.LoadJSON <Lottery>(Lottery.savePath);
            }
            else
            {
                lottery = new Lottery(1, 1.00);
            }

            Task lotteryDueTime = new Task(async() => await LotteryThread());

            lotteryDueTime.Start();
        }
Beispiel #4
0
 public static GuildSettings LoadJSONGuild(string guildID)
 {
     return(FileReading.LoadJSON <GuildSettings>(savePath + guildID));
 }