Cosmetic: changed ' to " in the most of Error and Warning messages.

This commit is contained in:
MaxED 2016-02-22 08:04:06 +00:00
parent a006a3cbc3
commit 74015b1ba0
40 changed files with 116 additions and 117 deletions

View file

@ -193,7 +193,7 @@ namespace CodeImp.DoomBuilder.Actions
else
{
// Action already exists!
General.ErrorLogger.Add(ErrorType.Warning, "Action '" + name + "' already exists. Action names must be unique.");
General.ErrorLogger.Add(ErrorType.Warning, "Action \"" + name + "\" already exists. Action names must be unique.");
}
}

View file

@ -142,7 +142,7 @@ namespace CodeImp.DoomBuilder.Actions
{
General.Interface.ShowHints(DEFAULT_HINT);
#if DEBUG
Console.WriteLine("WARNING: Unable to get hints for class '" + fullname + "', group '" + groupname + "'");
Console.WriteLine("WARNING: Unable to get hints for class \"" + fullname + "\", group \"" + groupname + "\"");
#endif
return;
}

View file

@ -76,9 +76,9 @@ namespace CodeImp.DoomBuilder.Compilers
// Initialize
this.info = info;
this.errors = new List<CompilerError>();
this.includes = new HashSet<string>(); //mxd
General.WriteLogLine("Creating compiler '" + info.Name + "' on interface '" + this.GetType().Name + "'...");
this.includes = new HashSet<string>(StringComparer.OrdinalIgnoreCase); //mxd
General.WriteLogLine("Creating compiler \"" + info.Name + "\" on interface \"" + this.GetType().Name + "\"...");
// Create temporary directory
tempdir = Directory.CreateDirectory(General.MakeTempDirname());
@ -146,7 +146,7 @@ namespace CodeImp.DoomBuilder.Compilers
string srcfile = Path.Combine(info.Path, f);
if(!File.Exists(srcfile))
{
General.ErrorLogger.Add(ErrorType.Error, "The file '" + f + "' required by the '" + info.Name + "' compiler is missing. According to the compiler configuration in '" + info.FileName + "', the was expected to be found in the following path: " + info.Path);
General.ErrorLogger.Add(ErrorType.Error, "The file \"" + f + "\" required by the \"" + info.Name + "\" compiler is missing. According to the compiler configuration in \"" + info.FileName + "\", it was expected to be found here: \"" + info.Path + "\"");
}
else
{

View file

@ -87,7 +87,7 @@ namespace CodeImp.DoomBuilder.Config
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "'" + argspath + ".arg" + istr + "' references unknown enumeration '" + argdic["enum"] + "'.");
General.ErrorLogger.Add(ErrorType.Warning, "\"" + argspath + ".arg" + istr + "\" references unknown enumeration \"" + argdic["enum"] + "\".");
}
}
}

View file

@ -59,7 +59,7 @@ namespace CodeImp.DoomBuilder.Config
// Constructor
internal CompilerInfo(string filename, string name, string path, Configuration cfg)
{
General.WriteLogLine("Registered compiler configuration '" + name + "' from '" + filename + "'");
General.WriteLogLine("Registered compiler configuration \"" + name + "\" from \"" + filename + "\"");
// Initialize
this.filename = filename;
@ -80,7 +80,7 @@ namespace CodeImp.DoomBuilder.Config
//mxd
string include = de.Value.ToString().Replace(System.IO.Path.AltDirectorySeparatorChar, System.IO.Path.DirectorySeparatorChar);
if(files.Contains(include))
General.ErrorLogger.Add(ErrorType.Warning, "Include file '" + de.Value + "' is double-defined in '" + name + "' compiler configuration");
General.ErrorLogger.Add(ErrorType.Warning, "Include file \"" + de.Value + "\" is double defined in \"" + name + "\" compiler configuration");
else
files.Add(include);
}

View file

@ -76,7 +76,7 @@ namespace CodeImp.DoomBuilder.Config
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "Structure '" + fullpath + "." + name + "' contains invalid entries. The keys must be numeric.");
General.ErrorLogger.Add(ErrorType.Warning, "Structure \"" + fullpath + "." + name + "\" contains invalid entries. The keys must be numeric.");
}
}

View file

@ -55,7 +55,7 @@ namespace CodeImp.DoomBuilder.Config
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "Map lump '" + name + "' in the current game configuration specifies an unknown script configuration '" + scriptconfig + "'. Using plain text instead.");
General.ErrorLogger.Add(ErrorType.Warning, "Map lump \"" + name + "\" in the current game configuration specifies an unknown script configuration \"" + scriptconfig + "\". Using plain text instead.");
this.Script = new ScriptConfiguration();
}
}

View file

@ -55,7 +55,7 @@ namespace CodeImp.DoomBuilder.Config
// Constructor
public NodebuilderInfo(string filename, string name, Configuration cfg)
{
General.WriteLogLine("Registered nodebuilder configuration '" + name + "' from '" + filename + "'");
General.WriteLogLine("Registered nodebuilder configuration \"" + name + "\" from \"" + filename + "\"");
// Initialize
this.name = name;
@ -80,7 +80,7 @@ namespace CodeImp.DoomBuilder.Config
}
// No compiler found?
if(this.compiler == null) throw new Exception("No such compiler defined: '" + compilername + "'");
if(this.compiler == null) throw new Exception("Compiler \"" + compilername + "\" is not defined");
}
// Constructor for "none" nodebuilder

View file

@ -464,7 +464,7 @@ namespace CodeImp.DoomBuilder.Config
cfg.WriteSetting("defaultbrightness", defaultbrightness);
// Save settings configuration
General.WriteLogLine("Saving program configuration to '" + filepathname + "'...");
General.WriteLogLine("Saving program configuration to \"" + filepathname + "\"...");
cfg.SaveConfiguration(filepathname);
}

View file

@ -28,12 +28,20 @@ using ScintillaNET;
namespace CodeImp.DoomBuilder.Config
{
//mxd
internal enum ScriptType
public enum ScriptType
{
UNKNOWN = 0,
ACS = 1,
MODELDEF = 2,
DECORATE = 3,
GLDEFS = 4,
SNDSEQ = 5,
MAPINFO = 6,
VOXELDEF = 7,
TEXTURES = 8,
ANIMDEFS = 9,
REVERBS = 10,
TERRAIN = 11,
}
internal class ScriptConfiguration : IComparable<ScriptConfiguration>
@ -215,7 +223,7 @@ namespace CodeImp.DoomBuilder.Config
string keyword = de.Key.ToString();
if(keywords.ContainsKey(keyword)) //mxd
{
General.ErrorLogger.Add(ErrorType.Warning, "Keyword \"" + keyword + "\" is double-defined in \"" + description + "\" script configuration.");
General.ErrorLogger.Add(ErrorType.Warning, "Keyword \"" + keyword + "\" is double defined in \"" + description + "\" script configuration.");
continue;
}
@ -234,7 +242,7 @@ namespace CodeImp.DoomBuilder.Config
string property = de.Key.ToString();
if(lowerproperties.ContainsValue(property)) //mxd
{
General.ErrorLogger.Add(ErrorType.Warning, "Property \"" + property + "\" is double-defined in \"" + description + "\" script configuration.");
General.ErrorLogger.Add(ErrorType.Warning, "Property \"" + property + "\" is double defined in \"" + description + "\" script configuration.");
continue;
}
@ -252,7 +260,7 @@ namespace CodeImp.DoomBuilder.Config
string constant = de.Key.ToString();
if(lowerconstants.ContainsValue(constant)) //mxd
{
General.ErrorLogger.Add(ErrorType.Warning, "Constant \"" + constant + "\" is double-defined in \"" + description + "\" script configuration.");
General.ErrorLogger.Add(ErrorType.Warning, "Constant \"" + constant + "\" is double defined in \"" + description + "\" script configuration.");
continue;
}
@ -278,7 +286,7 @@ namespace CodeImp.DoomBuilder.Config
string name = Path.GetFileNameWithoutExtension(file);
if(string.IsNullOrEmpty(name))
{
General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet '" + file + "' for '" + description + "' script configuration.");
General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet \"" + file + "\" for \"" + description + "\" script configuration.");
}
else
{
@ -291,7 +299,7 @@ namespace CodeImp.DoomBuilder.Config
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet '" + file + "' for '" + description + "' script configuration: file is empty!");
General.ErrorLogger.Add(ErrorType.Warning, "Failed to load snippet \"" + file + "\" for \"" + description + "\" script configuration: file is empty!");
}
}
}
@ -318,7 +326,7 @@ namespace CodeImp.DoomBuilder.Config
}
// No compiler found?
if(this.compiler == null) throw new Exception("No such compiler defined: '" + compilername + "'");
if(this.compiler == null) throw new Exception("Compiler \"" + compilername + "\" is not defined");
}
}

View file

@ -246,7 +246,7 @@ namespace CodeImp.DoomBuilder.Config
if(child.IsValid && child.things.Count > 0)
{
if(cats.ContainsKey(child.title.ToLowerInvariant()))
General.ErrorLogger.Add(ErrorType.Warning, "Thing Category '" + child.title + "' is double-defined in " + this.title);
General.ErrorLogger.Add(ErrorType.Warning, "Thing Category \"" + child.title + "\" is double defined in " + this.title);
cats[child.title.ToLowerInvariant()] = child;
}
}

View file

@ -47,7 +47,7 @@ namespace CodeImp.DoomBuilder.Config
// Duplicate flags check
if(Flags.ContainsKey(flag))
General.ErrorLogger.Add(ErrorType.Warning, "ThingFlagsCompare flag '" + flag + "' is double-defined in '" + name + "' group");
General.ErrorLogger.Add(ErrorType.Warning, "ThingFlagsCompare flag \"" + flag + "\" is double defined in the \"" + name + "\" group");
Flags[flag] = new ThingFlagsCompare(cfg, name, flag);
}
@ -294,7 +294,7 @@ namespace CodeImp.DoomBuilder.Config
result.Add("Thing is not used by any class.");
break;
default:
result.Add("At least one '" + group.Key + "' flag should be set.");
result.Add("At least one \"" + group.Key + "\" flag should be set.");
break;
}
}

View file

@ -67,7 +67,7 @@ namespace CodeImp.DoomBuilder.Data
if(reader is UnknownImageReader)
{
// Data is in an unknown format!
General.ErrorLogger.Add(ErrorType.Error, "Colormap lump '" + Name + "' data format could not be read. Does this lump contain valid colormap data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Colormap lump \"" + Name + "\" data format could not be read. Does this lump contain valid colormap data at all?");
bitmap = null;
}
else
@ -97,7 +97,7 @@ namespace CodeImp.DoomBuilder.Data
else
{
// Missing a patch lump!
General.ErrorLogger.Add(ErrorType.Error, "Missing colormap lump '" + Name + "'. Did you forget to include required resources?");
General.ErrorLogger.Add(ErrorType.Error, "Missing colormap lump \"" + Name + "\". Did you forget to include required resources?");
loadfailed = true;
}

View file

@ -79,7 +79,7 @@ namespace CodeImp.DoomBuilder.Data
}
}
return name;
return (name ?? string.Empty);
}
// This compares two locations

View file

@ -172,7 +172,7 @@ namespace CodeImp.DoomBuilder.Data
// Not loaded?
if(bitmap == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + filepathname + "' data format could not be read, while loading image '" + this.Name + "'. Is this a valid picture file at all?");
General.ErrorLogger.Add(ErrorType.Error, "Image file \"" + filepathname + "\" data format could not be read, while loading image \"" + this.Name + "\". Is this a valid picture file at all?");
loadfailed = true;
}
else

View file

@ -68,7 +68,7 @@ namespace CodeImp.DoomBuilder.Data
if(reader is UnknownImageReader)
{
// Data is in an unknown format!
General.ErrorLogger.Add(ErrorType.Error, "Flat lump '" + Name + "' data format could not be read. Does this lump contain valid picture data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Flat lump \"" + Name + "\" data format could not be read. Does this lump contain valid picture data at all?");
bitmap = null;
}
else
@ -98,7 +98,7 @@ namespace CodeImp.DoomBuilder.Data
else
{
// Missing a patch lump!
General.ErrorLogger.Add(ErrorType.Error, "Missing flat lump '" + Name + "'. Did you forget to include required resources?");
General.ErrorLogger.Add(ErrorType.Error, "Missing flat lump \"" + Name + "\". Did you forget to include required resources?");
loadfailed = true;
}

View file

@ -252,12 +252,9 @@ namespace CodeImp.DoomBuilder.Data
if(p.flipx || p.flipy)
{
RotateFlipType flip;
if(p.flipx && !p.flipy)
flip = RotateFlipType.RotateNoneFlipX;
else if(!p.flipx && p.flipy)
flip = RotateFlipType.RotateNoneFlipY;
else
flip = RotateFlipType.RotateNoneFlipXY;
if(p.flipx && !p.flipy) flip = RotateFlipType.RotateNoneFlipX;
else if(!p.flipx && p.flipy) flip = RotateFlipType.RotateNoneFlipY;
else flip = RotateFlipType.RotateNoneFlipXY;
patchbmp.RotateFlip(flip);
}
@ -267,15 +264,9 @@ namespace CodeImp.DoomBuilder.Data
RotateFlipType rotate;
switch(p.rotate)
{
case 90:
rotate = RotateFlipType.Rotate90FlipNone;
break;
case 180:
rotate = RotateFlipType.Rotate180FlipNone;
break;
default:
rotate = RotateFlipType.Rotate270FlipNone;
break;
case 90: rotate = RotateFlipType.Rotate90FlipNone; break;
case 180: rotate = RotateFlipType.Rotate180FlipNone; break;
default: rotate = RotateFlipType.Rotate270FlipNone; break;
}
patchbmp.RotateFlip(rotate);
}

View file

@ -277,7 +277,7 @@ namespace CodeImp.DoomBuilder.Data
catch(Exception e)
{
bitmap = oldbitmap;
General.ErrorLogger.Add(ErrorType.Warning, "Cannot lock image '" + name + "' for pixel format conversion. The image may not be displayed correctly.\n" + e.GetType().Name + ": " + e.Message);
General.ErrorLogger.Add(ErrorType.Warning, "Cannot lock image \"" + name + "\" for pixel format conversion. The image may not be displayed correctly.\n" + e.GetType().Name + ": " + e.Message);
}
}
@ -293,7 +293,7 @@ namespace CodeImp.DoomBuilder.Data
}
catch(Exception e)
{
General.ErrorLogger.Add(ErrorType.Warning, "Cannot lock image '" + name + "' for color correction. The image may not be displayed correctly.\n" + e.GetType().Name + ": " + e.Message);
General.ErrorLogger.Add(ErrorType.Warning, "Cannot lock image \"" + name + "\" for color correction. The image may not be displayed correctly.\n" + e.GetType().Name + ": " + e.Message);
}
// Bitmap locked?
@ -348,7 +348,7 @@ namespace CodeImp.DoomBuilder.Data
{
BitmapData bmpdata = null;
try { bmpdata = bitmap.LockBits(new Rectangle(0, 0, bitmap.Size.Width, bitmap.Size.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); }
catch(Exception e) { General.ErrorLogger.Add(ErrorType.Error, "Cannot lock image '" + this.filepathname + "' for glow color calculation. " + e.GetType().Name + ": " + e.Message); }
catch(Exception e) { General.ErrorLogger.Add(ErrorType.Error, "Cannot lock image \"" + this.filepathname + "\" for glow color calculation. " + e.GetType().Name + ": " + e.Message); }
if(bmpdata != null)
{
@ -403,7 +403,7 @@ namespace CodeImp.DoomBuilder.Data
{
BitmapData bmpdata = null;
try { bmpdata = bitmap.LockBits(new Rectangle(0, 0, bitmap.Size.Width, bitmap.Size.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); }
catch(Exception e) { General.ErrorLogger.Add(ErrorType.Error, "Cannot lock image '" + this.filepathname + "' for translucency check. " + e.GetType().Name + ": " + e.Message); }
catch(Exception e) { General.ErrorLogger.Add(ErrorType.Error, "Cannot lock image \"" + this.filepathname + "\" for translucency check. " + e.GetType().Name + ": " + e.Message); }
if(bmpdata != null)
{

View file

@ -140,7 +140,7 @@ namespace CodeImp.DoomBuilder.Data
// Not loaded?
if(bitmap == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Image file '" + filepathname + "' data format could not be read, while loading texture '" + this.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Image file \"" + filepathname + "\" data format could not be read, while loading texture \"" + this.Name + "\"");
loadfailed = true;
}
else

View file

@ -17,8 +17,8 @@
#region ================== Namespaces
using System;
using CodeImp.DoomBuilder.IO;
using System.IO;
using CodeImp.DoomBuilder.IO;
#endregion
@ -32,7 +32,7 @@ namespace CodeImp.DoomBuilder.Data
#region ================== Variables
private string lumpname;
private readonly string lumpname;
#endregion
@ -93,7 +93,7 @@ namespace CodeImp.DoomBuilder.Data
// Not loaded?
if(bitmap == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Image lump '" + lumpname + "' data format could not be read, while loading texture '" + this.Name + "'. Does this lump contain valid picture data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Image lump \"" + lumpname + "\" data format could not be read, while loading texture \"" + this.Name + "\". Does this lump contain valid picture data at all?");
loadfailed = true;
}
else
@ -108,7 +108,7 @@ namespace CodeImp.DoomBuilder.Data
}
else
{
General.ErrorLogger.Add(ErrorType.Error, "Image lump '" + lumpname + "' could not be found, while loading texture '" + this.Name + "'. Did you forget to include required resources?");
General.ErrorLogger.Add(ErrorType.Error, "Image lump \"" + lumpname + "\" could not be found, while loading texture \"" + this.Name + "\". Did you forget to include required resources?");
loadfailed = true;
}

View file

@ -93,7 +93,7 @@ namespace CodeImp.DoomBuilder.Data
if(reader is UnknownImageReader)
{
// Data is in an unknown format!
General.ErrorLogger.Add(ErrorType.Error, "Sprite lump '" + Name + "' data format could not be read. Does this lump contain valid picture data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Sprite lump \"" + Name + "\" data format could not be read. Does this lump contain valid picture data at all?");
bitmap = null;
}
else
@ -130,7 +130,7 @@ namespace CodeImp.DoomBuilder.Data
else
{
// Missing a patch lump!
General.ErrorLogger.Add(ErrorType.Error, "Missing sprite lump '" + Name + "'. Forgot to include required resources?");
General.ErrorLogger.Add(ErrorType.Error, "Missing sprite lump \"" + Name + "\". Forgot to include required resources?");
}
// Pass on to base

View file

@ -90,7 +90,7 @@ namespace CodeImp.DoomBuilder.Data
catch(Exception e)
{
// Unable to make bitmap
General.ErrorLogger.Add(ErrorType.Error, "Unable to load texture image '" + this.Name + "'. " + e.GetType().Name + ": " + e.Message);
General.ErrorLogger.Add(ErrorType.Error, "Unable to load texture image \"" + this.Name + "\". " + e.GetType().Name + ": " + e.Message);
loadfailed = true;
}
@ -124,7 +124,7 @@ namespace CodeImp.DoomBuilder.Data
if(reader is UnknownImageReader)
{
// Data is in an unknown format!
General.ErrorLogger.Add(ErrorType.Error, "Patch lump '" + p.lumpname + "' data format could not be read, while loading texture '" + this.Name + "'. Does this lump contain valid picture data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Patch lump \"" + p.lumpname + "\" data format could not be read, while loading texture \"" + this.Name + "\". Does this lump contain valid picture data at all?");
loadfailed = true;
missingpatches++; //mxd
}
@ -138,7 +138,7 @@ namespace CodeImp.DoomBuilder.Data
catch(InvalidDataException)
{
// Data cannot be read!
General.ErrorLogger.Add(ErrorType.Error, "Patch lump '" + p.lumpname + "' data format could not be read, while loading texture '" + this.Name + "'. Does this lump contain valid picture data at all?");
General.ErrorLogger.Add(ErrorType.Error, "Patch lump \"" + p.lumpname + "\" data format could not be read, while loading texture \"" + this.Name + "\". Does this lump contain valid picture data at all?");
loadfailed = true;
missingpatches++; //mxd
}
@ -150,7 +150,7 @@ namespace CodeImp.DoomBuilder.Data
else
{
// Missing a patch lump!
General.ErrorLogger.Add(ErrorType.Error, "Missing patch lump '" + p.lumpname + "' while loading texture '" + this.Name + "'. Did you forget to include required resources?");
General.ErrorLogger.Add(ErrorType.Error, "Missing patch lump \"" + p.lumpname + "\" while loading texture \"" + this.Name + "\". Did you forget to include required resources?");
loadfailed = true;
missingpatches++; //mxd
}

View file

@ -272,7 +272,7 @@ namespace CodeImp.DoomBuilder.Editing
//Integrity check
if(!IsValid())
General.ErrorLogger.Add(ErrorType.Warning, "Things filter '" + name + "' has invalid properties. Configure the things filter to fix this!");
General.ErrorLogger.Add(ErrorType.Warning, "Things filter \"" + name + "\" has invalid properties. Configure the things filter to fix this!");
}
//mxd

View file

@ -130,7 +130,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
// Get OS name
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT Caption FROM Win32_OperatingSystem");
foreach(ManagementObject mo in searcher.Get())
foreach(ManagementBaseObject mo in searcher.Get())
{
result += "OS: " + mo["Caption"] + Environment.NewLine;
break;
@ -138,7 +138,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Windows
// Get GPU name
searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
foreach(ManagementObject mo in searcher.Get())
foreach(ManagementBaseObject mo in searcher.Get())
{
PropertyData bpp = mo.Properties["CurrentBitsPerPixel"];
PropertyData description = mo.Properties["Description"];

View file

@ -102,7 +102,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
MemoryStream ms = LoadFile(containers, mde.ModelNames[i], true);
if(ms == null)
{
General.ErrorLogger.Add(ErrorType.Error, "Error while loading '" + mde.ModelNames[i] + "': unable to find file.");
General.ErrorLogger.Add(ErrorType.Error, "Error while loading \"" + mde.ModelNames[i] + "\": unable to find file.");
continue;
}
@ -112,7 +112,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
case ".md3":
if(!string.IsNullOrEmpty(mde.FrameNames[i]))
{
General.ErrorLogger.Add(ErrorType.Error, "Error while loading '" + mde.ModelNames[i] + "': frame names are not supported for MD3 models!");
General.ErrorLogger.Add(ErrorType.Error, "Error while loading \"" + mde.ModelNames[i] + "\": frame names are not supported for MD3 models!");
continue;
}
result = ReadMD3Model(ref bbs, useSkins, ms, device, mde.FrameIndices[i]);
@ -131,7 +131,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
//got errors?
if(!String.IsNullOrEmpty(result.Errors))
{
General.ErrorLogger.Add(ErrorType.Error, "Error while loading '" + mde.ModelNames[i] + "': " + result.Errors);
General.ErrorLogger.Add(ErrorType.Error, "Error while loading \"" + mde.ModelNames[i] + "\": " + result.Errors);
}
else
{
@ -164,7 +164,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
if(Array.IndexOf(ModelData.SUPPORTED_TEXTURE_EXTENSIONS, ext) == -1)
{
mde.Model.Textures.Add(General.Map.Data.UnknownTexture3D.Texture);
errors.Add("image format '" + ext + "' is not supported!");
errors.Add("image format \"" + ext + "\" is not supported!");
continue;
}
@ -177,7 +177,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
if(t == null)
{
mde.Model.Textures.Add(General.Map.Data.UnknownTexture3D.Texture);
errors.Add("unable to load skin '" + result.Skins[m] + "'");
errors.Add("unable to load skin \"" + result.Skins[m] + "\"");
continue;
}
@ -191,7 +191,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
if(t == null)
{
mde.Model.Textures.Add(General.Map.Data.UnknownTexture3D.Texture);
errors.Add("unable to load texture '" + mde.TextureNames[i] + "'");
errors.Add("unable to load texture \"" + mde.TextureNames[i] + "\"");
}
else
{
@ -203,7 +203,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
if(errors.Count > 0)
{
foreach(string e in errors)
General.ErrorLogger.Add(ErrorType.Error, "Error while loading '" + mde.ModelNames[i] + "': " + e);
General.ErrorLogger.Add(ErrorType.Error, "Error while loading \"" + mde.ModelNames[i] + "\": " + e);
}
}
}
@ -242,7 +242,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
string magic = ReadString(br, 4);
if(magic != "IDP3")
{
result.Errors = "unknown header: expected 'IDP3', but got '" + magic + "'";
result.Errors = "unknown header: expected \"IDP3\", but got \"" + magic + "\"";
return result;
}
@ -341,7 +341,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
long start = br.BaseStream.Position;
string magic = ReadString(br, 4);
if(magic != "IDP3") return "error while reading surface. Unknown header: expected 'IDP3', but got '" + magic + "'";
if(magic != "IDP3") return "error while reading surface. Unknown header: expected \"IDP3\", but got \"" + magic + "\"";
string name = ReadString(br, 64);
int flags = br.ReadInt32();
@ -432,8 +432,8 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
{
string magic = ReadString(br, 4);
if(magic != "IDP2") //magic number: "IDP2"
{
result.Errors = "unknown header: expected 'IDP2', but got '" + magic + "'";
{
result.Errors = "unknown header: expected \"IDP2\", but got \"" + magic + "\"";
return result;
}
@ -521,7 +521,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.MD3
// No dice? Bail out!
if(!framefound)
{
result.Errors = "unable to find frame '" + framename + "'!";
result.Errors = "unable to find frame \"" + framename + "\"!";
return result;
}
}

View file

@ -176,8 +176,8 @@ namespace CodeImp.DoomBuilder
foreach(Process process in result.Processes)
{
result.Error += Path.GetFileName(process.MainModule.FileName)
+ " ('" + process.MainModule.FileName
+ "', started at " + process.StartTime + ")"
+ " (\"" + process.MainModule.FileName
+ "\", started at " + process.StartTime + ")"
+ Environment.NewLine + Environment.NewLine;
}
}

View file

@ -318,7 +318,7 @@ namespace CodeImp.DoomBuilder
ConfigurationInfo cfginfo = new ConfigurationInfo(cfg, fullfilename);
// Add to lists
General.WriteLogLine("Registered game configuration '" + cfginfo.Name + "' from '" + fullfilename + "'");
General.WriteLogLine("Registered game configuration \"" + cfginfo.Name + "\" from \"" + fullfilename + "\"");
configs.Add(cfginfo);
}
}
@ -369,7 +369,7 @@ namespace CodeImp.DoomBuilder
catch(Exception e)
{
// Unable to load configuration
errorlogger.Add(ErrorType.Error, "Unable to load the nodebuilder configuration '" + de.Key + "' from \"" + Path.GetFileName(filepath) + "\". Error: " + e.Message);
errorlogger.Add(ErrorType.Error, "Unable to load the nodebuilder configuration \"" + de.Key + "\" from \"" + Path.GetFileName(filepath) + "\". Error: " + e.Message);
}
}
}
@ -677,7 +677,7 @@ namespace CodeImp.DoomBuilder
// Show any errors if preferred
if(errorlogger.IsErrorAdded)
{
mainwindow.DisplayStatus(StatusType.Warning, "There were errors during program statup!");
mainwindow.DisplayStatus(StatusType.Warning, "There were errors during program startup!");
if(!delaymainwindow && General.Settings.ShowErrorsWindow) mainwindow.ShowErrors();
}
@ -707,7 +707,7 @@ namespace CodeImp.DoomBuilder
if((DateTime.Now - File.GetLastWriteTime(backup)).TotalDays > 30)
{
File.Delete(backup);
WriteLogLine("Removed '" + backup + "' map backup.");
WriteLogLine("Removed \"" + backup + "\" map backup.");
}
}
}
@ -859,7 +859,7 @@ namespace CodeImp.DoomBuilder
catch(Exception) { }
// Warn the user?
if(!portablemode) ShowWarningMessage("Failed to enable portable mode.\nMake sure you have write premission for '" + apppath + "' directory.", MessageBoxButtons.OK);
if(!portablemode) ShowWarningMessage("Failed to enable portable mode.\nMake sure you have write premission for \"" + apppath + "\" directory.", MessageBoxButtons.OK);
}
// Resource?
else if(string.Compare(curarg, "-RESOURCE", true) == 0)
@ -1219,8 +1219,8 @@ namespace CodeImp.DoomBuilder
if(changemapwindow.ShowDialog(mainwindow) != DialogResult.OK) return;
// Display status
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map '" + changemapwindow.Options.CurrentName + "'...");
WriteLogLine("Switching to map '" + changemapwindow.Options.CurrentName + "'...");
mainwindow.DisplayStatus(StatusType.Busy, "Switching to map \"" + changemapwindow.Options.CurrentName + "\"...");
WriteLogLine("Switching to map \"" + changemapwindow.Options.CurrentName + "\"...");
Cursor.Current = Cursors.WaitCursor;

View file

@ -233,7 +233,7 @@ namespace CodeImp.DoomBuilder
{
if(process != null)
{
General.ShowWarningMessage("Game engine is already running." + Environment.NewLine + "Please close '" + process.MainModule.FileName + "' first.", MessageBoxButtons.OK);
General.ShowWarningMessage("Game engine is already running." + Environment.NewLine + "Please close \"" + process.MainModule.FileName + "\" first.", MessageBoxButtons.OK);
return true;
}

View file

@ -45,7 +45,7 @@ namespace CodeImp.DoomBuilder
string updaterpath = Path.Combine(General.AppPath, "Updater.exe");
if(!File.Exists(updaterpath))
{
errordesc = "Update check failed: '" + updaterpath + "' does not exist!";
errordesc = "Update check failed: \"" + updaterpath + "\" does not exist!";
e.Cancel = true;
return;
}
@ -53,7 +53,7 @@ namespace CodeImp.DoomBuilder
string inipath = Path.Combine(General.AppPath, "Updater.ini");
if(!File.Exists(inipath))
{
errordesc = "Update check failed: '" + inipath + "' does not exist!";
errordesc = "Update check failed: \"" + inipath + "\" does not exist!";
e.Cancel = true;
return;
}

View file

@ -21,7 +21,7 @@ namespace CodeImp.DoomBuilder.Geometry
case Mode.EASE_IN_SINE: return EaseInSine(val1, val2, delta);
case Mode.EASE_OUT_SINE: return EaseOutSine(val1, val2, delta);
case Mode.EASE_IN_OUT_SINE: return EaseInOutSine(val1, val2, delta);
default: throw new NotImplementedException("InterpolationTools.Interpolate: '" + mode + "' mode is not supported!");
default: throw new NotImplementedException("InterpolationTools.Interpolate: \"" + mode + "\" mode is not supported!");
}
}

View file

@ -1832,7 +1832,7 @@ namespace CodeImp.DoomBuilder.Geometry
return GetSidedefBottomOffsetY(side, offset, scaleY, fromNormalized);
default:
throw new NotSupportedException("Tools.GetSidedefOffsetY: '" + part + "' geometry type is not supported!");
throw new NotSupportedException("Tools.GetSidedefOffsetY: \"" + part + "\" geometry type is not supported!");
}
}

View file

@ -804,7 +804,8 @@ namespace CodeImp.DoomBuilder.IO
case "true": return true;
case "false": return false;
case "null": return null;
default: RaiseError(file, line, ERROR_KEYWORDUNKNOWN + "\nUnrecognized token: '" + val.Trim().ToLowerInvariant() + "'"); return null;
default: RaiseError(file, line, ERROR_KEYWORDUNKNOWN + "\nUnrecognized token: \"" + val.Trim().ToLowerInvariant() + "\"");
return null;
}
}
}
@ -860,7 +861,7 @@ namespace CodeImp.DoomBuilder.IO
}
else
{
RaiseError(file, line, "Include missing structure '" + args[1] + "' in file '" + includefile + "'");
RaiseError(file, line, "Include missing structure \"" + args[1] + "\" in file \"" + includefile + "\"");
return;
}
}
@ -885,7 +886,7 @@ namespace CodeImp.DoomBuilder.IO
}
catch(Exception e)
{
RaiseError(file, line, "Unable to include file '" + includefile + "'. " + e.GetType().Name + ": " + e.Message);
RaiseError(file, line, "Unable to include file \"" + includefile + "\". " + e.GetType().Name + ": " + e.Message);
return;
}
@ -915,7 +916,7 @@ namespace CodeImp.DoomBuilder.IO
}
else
{
RaiseError(file, line, "Include missing structure '" + args[1] + "' in file '" + includefile + "'");
RaiseError(file, line, "Include missing structure \"" + args[1] + "\" in file \"" + includefile + "\"");
return;
}
}

View file

@ -60,7 +60,7 @@ namespace CodeImp.DoomBuilder.IO
// Will throw and exception when it is not
public void ValidateType(Type t)
{
if(value.GetType() != t) throw new Exception("The value of entry '" + key + "' is of incompatible type (expected " + t.Name + ")");
if(value.GetType() != t) throw new Exception("The value of entry \"" + key + "\" is of incompatible type (expected " + t.Name + ")");
}
//mxd

View file

@ -33,9 +33,8 @@ namespace CodeImp.DoomBuilder.Windows
// Variables
private int selectedeffect;
private ComboBox[] options;
private Label[] optionlbls;
private ListViewItem[] allItems; //mxd
private readonly ComboBox[] options;
private readonly ListViewItem[] allitems; //mxd
private readonly bool addanyeffect;
// Properties
@ -52,13 +51,13 @@ namespace CodeImp.DoomBuilder.Windows
// Make array references for controls
options = new[] { option0, option1, option2, option3, option4, option5, option6, option7 };
optionlbls = new[] { option0label, option1label, option2label, option3label, option4label,
option5label, option6label, option7label };
Label[] optionlbls = { option0label, option1label, option2label, option3label,
option4label, option5label, option6label, option7label };
// Go for all predefined effects
bool selected = CreateEffects(effect); //mxd
allItems = new ListViewItem[effects.Items.Count]; //mxd
effects.Items.CopyTo(allItems, 0); //mxd
allitems = new ListViewItem[effects.Items.Count]; //mxd
effects.Items.CopyTo(allitems, 0); //mxd
// Using generalized effects?
if(General.Map.Config.GeneralizedEffects)
@ -160,7 +159,7 @@ namespace CodeImp.DoomBuilder.Windows
{
List<ListViewItem> filteredItems = new List<ListViewItem>();
foreach(ListViewItem i in allItems)
foreach(ListViewItem i in allitems)
{
SectorEffectInfo si = i.Tag as SectorEffectInfo;
if(si.Title.ToLowerInvariant().IndexOf(p) != -1)

View file

@ -1095,7 +1095,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(excludedLines.Count == thingsCount)
{
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing ¹" + t.Index + " (" + tti.Title + ") to any linedef in a map!");
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align " + tti.Title + " (index " + t.Index + ") to any linedef!");
aligned = true;
}
}

View file

@ -18,10 +18,10 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Map;
using System.Drawing;
using System.Windows.Forms;
using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Map;
#endregion
@ -138,7 +138,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
//mxd
private static bool BitsMatch(int effect, List<int> expectedbits)
private static bool BitsMatch(int effect, IEnumerable<int> expectedbits)
{
if(!General.Map.Config.GeneralizedEffects) return false;

View file

@ -90,7 +90,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
ImageData id = General.Map.Data.GetTextureImage(s);
if(id.Width == 0 || id.Height == 0)
{
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: texture '" + s + "' has invalid size (" + id.Width + "x" + id.Height + ")!");
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: texture \"" + s + "\" has invalid size (" + id.Width + "x" + id.Height + ")!");
continue;
}
@ -100,7 +100,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: texture '" + s + "' does not exist!");
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: texture \"" + s + "\" does not exist!");
}
}
}
@ -115,7 +115,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
ImageData id = General.Map.Data.GetFlatImage(s);
if(id.Width == 0 || id.Height == 0)
{
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: flat '" + s + "' has invalid size (" + id.Width + "x" + id.Height + ")!");
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: flat \"" + s + "\" has invalid size (" + id.Width + "x" + id.Height + ")!");
continue;
}
@ -132,7 +132,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.IO
}
else
{
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: flat '" + s + "' does not exist!");
General.ErrorLogger.Add(ErrorType.Warning, "OBJ Exporter: flat \"" + s + "\" does not exist!");
}
}
}

View file

@ -330,16 +330,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
catch(TargetInvocationException ex)
{
// Error!
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance '" + t.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\"");
General.WriteLogLine(ex.InnerException.GetType().Name + ": " + ex.InnerException.Message);
throw ex;
throw;
}
catch(Exception ex)
{
// Error!
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance '" + t.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\"");
General.WriteLogLine(ex.GetType().Name + ": " + ex.Message);
throw ex;
throw;
}
// Add to list

View file

@ -76,14 +76,14 @@ namespace CodeImp.DoomBuilder.BuilderModes
catch(TargetInvocationException ex)
{
// Error!
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance '" + t.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\"");
General.WriteLogLine(ex.InnerException.GetType().Name + ": " + ex.InnerException.Message);
throw;
}
catch(Exception ex)
{
// Error!
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance '" + t.Name + "'");
General.ErrorLogger.Add(ErrorType.Error, "Failed to create class instance \"" + t.Name + "\"");
General.WriteLogLine(ex.GetType().Name + ": " + ex.Message);
throw;
}

View file

@ -3405,7 +3405,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
if(excludedLines.Count == thingsCount)
{
ThingTypeInfo tti = General.Map.Data.GetThingInfo(t.Type);
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align Thing ¹" + t.Index + " (" + tti.Title + ") to any linedef in a map!");
General.ErrorLogger.Add(ErrorType.Warning, "Unable to align " + tti.Title + " (index " + t.Index + ") to any linedef!");
aligned = true;
}
}