Example #1
0
 public void Read(GenericStructure gs)
 {
     ID = gs.PropertyInteger("ID");
     Name = gs["Name"];
     EngineID = gs.PropertyInteger("EngineID");
     Path = gs["Path"];
     Bsp = gs["Bsp"];
     Csg = gs["Csg"];
     Vis = gs["Vis"];
     Rad = gs["Rad"];
 }
Example #2
0
 public static CompileTool Parse(GenericStructure gs)
 {
     var tool = new CompileTool
     {
         Name = gs["Name"] ?? "",
         Description = gs["Description"] ?? "",
         Order = gs.PropertyInteger("Order")
     };
     var parameters = gs.GetChildren("Parameter");
     tool.Parameters.AddRange(parameters.Select(CompileParameter.Parse));
     return tool;
 }
Example #3
0
        public void Read(GenericStructure gs)
        {
            ID = gs.PropertyInteger("ID");
            Name = gs["Name"];
            Specification = gs["Specification"];
            Engine = (Engine)Enum.Parse(typeof(Engine), gs["EngineID"]);
            DontRedirectOutput = gs.PropertyBoolean("DontRedirectOutput");
            Path = gs["Path"];
            Bsp = gs["Bsp"];
            Csg = gs["Csg"];
            Vis = gs["Vis"];
            Rad = gs["Rad"];
            IncludePathInEnvironment = gs.PropertyBoolean("IncludePathInEnvironment", true);

            WorkingDirectory = gs.PropertyEnum("WorkingDirectory", CompileWorkingDirectory.TemporaryDirectory);
            AfterCopyBsp = gs.PropertyBoolean("AfterCopyBsp");
            AfterRunGame = gs.PropertyBoolean("AfterRunGame");
            AfterAskBeforeRun = gs.PropertyBoolean("AfterAskBeforeRun");

            CopyBsp = gs.PropertyBoolean("CopyBsp");
            CopyRes = gs.PropertyBoolean("CopyRes");
            CopyLin = gs.PropertyBoolean("CopyLin");
            CopyMap = gs.PropertyBoolean("CopyMap");
            CopyPts = gs.PropertyBoolean("CopyPts");
            CopyLog = gs.PropertyBoolean("CopyLog");
            CopyErr = gs.PropertyBoolean("CopyErr");

            foreach (var prof in gs.GetChildren("Profile"))
            {
                var bp = new BuildProfile();
                bp.Read(prof);
                Profiles.Add(bp);
            }
        }
Example #4
0
        public void Read(GenericStructure gs)
        {
            ID = gs.PropertyInteger("ID");
            Name = gs["Name"];
            Engine = (Engine) Enum.Parse(typeof(Engine), gs["EngineID"]);
            BuildID = gs.PropertyInteger("BuildID");
            SteamInstall = gs.PropertyBoolean("SteamInstall");
            WonGameDir = gs["WonGameDir"];
            SteamGameDir = gs["SteamGameDir"];
            ModDir = gs["ModDir"];
            BaseDir = gs["BaseDir"];
            Executable = gs["Executable"];
            ExecutableParameters = gs["ExecutableParameters"];
            MapDir = gs["MapDir"];
            Autosave = gs.PropertyBoolean("Autosave");
            UseCustomAutosaveDir = gs.PropertyBoolean("UseCustomAutosaveDir");
            AutosaveDir = gs["AutosaveDir"];
            AutosaveTime = gs.PropertyInteger("AutosaveTime");
            AutosaveLimit = gs.PropertyInteger("AutosaveLimit");
            AutosaveOnlyOnChanged = gs.PropertyBoolean("AutosaveOnlyOnChanged");
            DefaultPointEntity = gs["DefaultPointEntity"];
            DefaultBrushEntity = gs["DefaultBrushEntity"];
            DefaultTextureScale = gs.PropertyDecimal("DefaultTextureScale");
            DefaultLightmapScale = gs.PropertyDecimal("DefaultLightmapScale");
            OverrideMapSize = gs.PropertyBoolean("OverrideMapSize");
            OverrideMapSizeLow = gs.PropertyInteger("OverrideMapSizeLow");
            OverrideMapSizeHigh = gs.PropertyInteger("OverrideMapSizeHigh");

            var wads = gs.Children.FirstOrDefault(x => x.Name == "Wads");
            if (wads != null)
            {
                foreach (var key in wads.GetPropertyKeys())
                {
                    Wads.Add(new Wad { Path = wads[key] });
                }
            }

            var fgds = gs.Children.FirstOrDefault(x => x.Name == "Fgds");
            if (fgds != null)
            {
                foreach (var key in fgds.GetPropertyKeys())
                {
                    Fgds.Add(new Fgd { Path = fgds[key] });
                }
            }
        }
Example #5
0
File: Game.cs Project: silky/sledge
        public void Read(GenericStructure gs)
        {
            ID = gs.PropertyInteger("ID");
            Name = gs["Name"];
            Engine = (Engine) Enum.Parse(typeof(Engine), gs["EngineID"]);
            BuildID = gs.PropertyInteger("BuildID");
            SteamInstall = gs.PropertyBoolean("SteamInstall");
            WonGameDir = gs["WonGameDir"];
            SteamGameDir = gs["SteamGameDir"];
            ModDir = gs["ModDir"];
            UseHDModels = gs.PropertyBoolean("UseHDModels", true);
            BaseDir = gs["BaseDir"];
            Executable = gs["Executable"];
            ExecutableParameters = gs["ExecutableParameters"];
            MapDir = gs["MapDir"];
            Autosave = gs.PropertyBoolean("Autosave");
            UseCustomAutosaveDir = gs.PropertyBoolean("UseCustomAutosaveDir");
            AutosaveDir = gs["AutosaveDir"];
            AutosaveTime = gs.PropertyInteger("AutosaveTime");
            AutosaveLimit = gs.PropertyInteger("AutosaveLimit");
            AutosaveOnlyOnChanged = gs.PropertyBoolean("AutosaveOnlyOnChanged", true);
            AutosaveTriggerFileSave = gs.PropertyBoolean("AutosaveTriggerFileChange", true);
            DefaultPointEntity = gs["DefaultPointEntity"];
            DefaultBrushEntity = gs["DefaultBrushEntity"];
            DefaultTextureScale = gs.PropertyDecimal("DefaultTextureScale");
            DefaultLightmapScale = gs.PropertyDecimal("DefaultLightmapScale");
            IncludeFgdDirectoriesInEnvironment = gs.PropertyBoolean("IncludeFgdDirectoriesInEnvironment", true);
            OverrideMapSize = gs.PropertyBoolean("OverrideMapSize");
            OverrideMapSizeLow = gs.PropertyInteger("OverrideMapSizeLow");
            OverrideMapSizeHigh = gs.PropertyInteger("OverrideMapSizeHigh");

            var additional = gs.Children.FirstOrDefault(x => x.Name == "AdditionalPackages");
            if (additional != null)
            {
                foreach (var key in additional.GetPropertyKeys())
                {
                    AdditionalPackages.Add(additional[key]);
                }
            }

            PackageBlacklist = (gs["PackageBlacklist"] ?? "").Replace(";", "\r\n");
            PackageWhitelist = (gs["PackageWhitelist"] ?? "").Replace(";", "\r\n");

            var fgds = gs.Children.FirstOrDefault(x => x.Name == "Fgds");
            if (fgds != null)
            {
                foreach (var key in fgds.GetPropertyKeys())
                {
                    Fgds.Add(new Fgd { Path = fgds[key] });
                }
            }
        }