mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-06-02 09:51:47 +00:00
Restructured configuration parsing code and added a file include system. Use in structure where to include a file like this: include(file [, structurepath] );
This commit is contained in:
parent
2988bfeff9
commit
afd255bd68
4 changed files with 667 additions and 568 deletions
|
@ -273,11 +273,11 @@ namespace CodeImp.DoomBuilder.Config
|
|||
|
||||
// Load it
|
||||
cfg = new Configuration(cfgfilepathname, true);
|
||||
if(cfg.ErrorResult != 0)
|
||||
if(cfg.ErrorResult)
|
||||
{
|
||||
// Error in configuration
|
||||
// Ask user for a new copy
|
||||
result = General.ShowErrorMessage("Error in program configuration near line " + cfg.ErrorLine + ": " + cfg.ErrorDescription, MessageBoxButtons.YesNoCancel);
|
||||
result = General.ShowErrorMessage("Error in program configuration near line " + cfg.ErrorLine + ": " + cfg.ErrorDescription + "\n\nWould you like to overwrite your settings with a new configuration to restore the default settings?", MessageBoxButtons.YesNoCancel);
|
||||
if(result == DialogResult.Yes)
|
||||
{
|
||||
// Remove old configuration and make a new copy
|
||||
|
@ -288,7 +288,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
|
||||
// Load it
|
||||
cfg = new Configuration(cfgfilepathname, true);
|
||||
if(cfg.ErrorResult != 0)
|
||||
if(cfg.ErrorResult)
|
||||
{
|
||||
// Error in configuration
|
||||
General.WriteLogLine("Error in program configuration near line " + cfg.ErrorLine + ": " + cfg.ErrorDescription);
|
||||
|
@ -315,7 +315,7 @@ namespace CodeImp.DoomBuilder.Config
|
|||
|
||||
// Load it
|
||||
cfg = new Configuration(cfgfilepathname, true);
|
||||
if(cfg.ErrorResult != 0)
|
||||
if(cfg.ErrorResult)
|
||||
{
|
||||
// Error in configuration
|
||||
General.WriteLogLine("Error in program configuration near line " + cfg.ErrorLine + ": " + cfg.ErrorDescription);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue