Example #1
0
    public void GenerateTempFlag(Block block, string flagInformations, int cyclesRemaining)
    {
        string[] flagElements = flagInformations.Split(new char[] { '_' }, System.StringSplitOptions.RemoveEmptyEntries);
        foreach (Flag.IFlag flags in block.activeFlags)
        {
            if (flags.GetFlagType() == System.Type.GetType(flagElements[0]))
            {
                return;
            }
        }
        TempFlag newTempFlag = new TempFlag();

        newTempFlag.cyclesRemaining  = cyclesRemaining;
        newTempFlag.flagInformations = flagInformations;
        newTempFlag.flagType         = System.Type.GetType(flagElements[0]);
        //Generates the flag
        GameManager.instance.flagReader.ReadFlag(block, flagInformations);
        block.tempFlags.Add(newTempFlag);
    }
        public void ValidFileRegisterTests(ResourceType resource, TempFlag tempflag, SublistFlag sublistflag)
        {
            var request = FileHelper.FileRegisterRequest((int)RecordsCreator.Data[$"{resource.ToPrivateApiResource()}1"].Id, (int)resource, PrepareFiles.Data.First().Value, (int)tempflag, (int)sublistflag);

            PerformTest(request, System.Net.HttpStatusCode.OK);
        }