Exemple #1
0
 internal static CommandSet Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                new IniArbitraryFieldParserProvider <CommandSet>(
                    (x, name) => x.Buttons[int.Parse(name)] = parser.ParseAssetReference())));
 }
Exemple #2
0
 internal static WaterSet Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.TimeOfDay = IniParser.ParseEnum <TimeOfDay>(new IniToken(IniTokenType.Identifier, default(IniTokenPosition))
     {
         StringValue = name
     }),
                FieldParseTable));
 }
Exemple #3
0
        internal static AudioEvent Parse(IniParser parser)
        {
            var audioEvent = parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable);

            // HACK for Generals: In order to know which sounds to localise, we need to check if the event was loaded from Voice.ini.
            // Most localised sounds have the Voice audio type flag, but many don't, so we need to make sure the flag is set.
            if (parser.CurrentPosition.File.EndsWith("Voice.ini"))
            {
                audioEvent.Type?.Set(AudioTypeFlags.Voice, true);
            }

            return(audioEvent);
        }
Exemple #4
0
 internal static SpecialPower Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #5
0
 internal static Locomotor Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
 internal static ExperienceLevel Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #7
0
 internal static RoadTemplate Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #8
0
 internal static ParticleSystemDefinition Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #9
0
 internal static AudioEvent Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #10
0
 internal static BannerType Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #11
0
 internal static Rank Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Level = name,
                FieldParseTable));
 }
Exemple #12
0
 internal static WindowTransition Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #13
0
 internal static ControlBarResizer Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
 internal static MultiplayerColor Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #15
0
 internal static StreamedSound Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #16
0
 internal static MappedImage Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #17
0
 internal static AttackPriority Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #18
0
 internal static DynamicGameLod Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Level = (DynamicGameLodLevel)Enum.Parse(typeof(DynamicGameLodLevel), name),
                FieldParseTable));
 }
Exemple #19
0
 internal static ShellMenuScheme Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
 internal static LargeGroupAudioMap Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #21
0
 internal static MusicTrack Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #22
0
 internal static AudioLod Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Level = (AudioLodType)Enum.Parse(typeof(AudioLodType), name),
                FieldParseTable));
 }
Exemple #23
0
 internal static CommandMap Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #24
0
 internal static TerrainTexture Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #25
0
 internal static WebpageUrl Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
 internal static LivingWorldRegionCampaignRegion Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #27
0
 internal static WaterSet Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.TimeOfDay = IniParser.ParseEnum <TimeOfDay>(new IniToken(name, default(IniTokenPosition))),
                FieldParseTable));
 }
 internal static LivingWorldObject Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
Exemple #29
0
 internal static EmotionNugget Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }
 internal static FactionVictoryData Parse(IniParser parser)
 {
     return(parser.ParseTopLevelNamedBlock(
                (x, name) => x.Name = name,
                FieldParseTable));
 }