diff --git a/Help/e_findreplace.html b/Help/e_findreplace.html
index 4de7a31..b260d4b 100644
--- a/Help/e_findreplace.html
+++ b/Help/e_findreplace.html
@@ -18,7 +18,7 @@
- Looking for something? This is the mode you want to use to quickly find specific elements in your map. This mode is accessible from any classic mode using F3 and shows a dialog window that you can use to find items. Select the type of search you want to perform at the top of the dialog window. Then enter the value you are looking for. Depending on the type of search, you can click the browse button to select from a browser. Check the Replace checkbox if you want to replace the value of the found elements with another value. Click the Find / Replace button to perform the search.
+ Looking for something? This is the mode you want to use to quickly find specific elements in your map. This mode is accessible from any classic mode using F3 and shows a dialog window that you can use to find items. Select the type of search you want to perform at the top of the dialog window. Then enter the value you are looking for. Depending on the type of search, you can click the browse button to select from a browser, or use comparison operators (>, >=, <, <= or !/!=) for more advanced numeric searching. Check the Replace checkbox if you want to replace the value of the found elements with another value. Click the Find / Replace button to perform the search.
The results will be displayed in a list that opens. Click on one of the results to zoom in on that particular element. You can also focus the main window and scroll or zoom the map to see the selected elements. Click the Edit Selection button to edit the selected elements.
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs
index 82f8660..69d13f9 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindLinedefTags.cs
@@ -76,8 +76,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -85,8 +85,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -108,8 +106,9 @@ namespace CodeImp.DoomBuilder.BuilderModes
(l.Tags[i] > tag && comparer.ToString() == ">") ||
(l.Tags[i] < tag && comparer.ToString() == "<") ||
(l.Tags[i] >= tag && comparer.ToString() == ">=") ||
- (l.Tags[i] <= tag && comparer.ToString() == "<="))
- index = l.Tags[i];
+ (l.Tags[i] <= tag && comparer.ToString() == "<=") ||
+ (l.Tags[i] != tag && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
+ index = l.Tags[i];
if (index != -1)
{
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorBrightness.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorBrightness.cs
index 1437fdd..50f177c 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSectorBrightness.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorBrightness.cs
@@ -36,8 +36,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -45,8 +45,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -66,7 +64,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
(s.Brightness > brightness && comparer.ToString() == ">") ||
(s.Brightness < brightness && comparer.ToString() == "<") ||
(s.Brightness >= brightness && comparer.ToString() == ">=") ||
- (s.Brightness <= brightness && comparer.ToString() == "<="))
+ (s.Brightness <= brightness && comparer.ToString() == "<=") ||
+ (s.Brightness != brightness && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
{
// Replace
if(replace) s.Brightness = replacebrightness;
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs
index 9e0465e..aa04221 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorCeilingHeight.cs
@@ -34,8 +34,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -43,8 +43,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -64,7 +62,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
(s.CeilHeight > height && comparer.ToString() == ">") ||
(s.CeilHeight < height && comparer.ToString() == "<") ||
(s.CeilHeight >= height && comparer.ToString() == ">=") ||
- (s.CeilHeight <= height && comparer.ToString() == "<="))
+ (s.CeilHeight <= height && comparer.ToString() == "<=") ||
+ (s.CeilHeight != height && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
{
// Replace
if(replace) s.CeilHeight = replaceheight;
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs
index 4393eb4..a516d21 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorFloorHeight.cs
@@ -34,8 +34,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -43,8 +43,6 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -64,7 +62,8 @@ namespace CodeImp.DoomBuilder.BuilderModes.FindReplace
(s.FloorHeight > height && comparer.ToString() == ">") ||
(s.FloorHeight < height && comparer.ToString() == "<") ||
(s.FloorHeight >= height && comparer.ToString() == ">=") ||
- (s.FloorHeight <= height && comparer.ToString() == "<="))
+ (s.FloorHeight <= height && comparer.ToString() == "<=") ||
+ (s.FloorHeight != height && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
{
// Replace
if(replace) s.FloorHeight = replaceheight;
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs b/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs
index f06b6a6..ceed982 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindSectorTags.cs
@@ -70,8 +70,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -79,8 +79,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -102,7 +100,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
(s.Tags[i] > tag && comparer.ToString() == ">") ||
(s.Tags[i] < tag && comparer.ToString() == "<") ||
(s.Tags[i] >= tag && comparer.ToString() == ">=") ||
- (s.Tags[i] <= tag && comparer.ToString() == "<="))
+ (s.Tags[i] <= tag && comparer.ToString() == "<=") ||
+ (s.Tags[i] != tag && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
index = s.Tags[i];
if (index != -1)
{
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs b/Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs
index 1420da1..5f560e2 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindThingAngle.cs
@@ -83,8 +83,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -92,8 +92,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -113,7 +111,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
(t.AngleDoom > angle && comparer.ToString() == ">") ||
(t.AngleDoom < angle && comparer.ToString() == "<") ||
(t.AngleDoom >= angle && comparer.ToString() == ">=") ||
- (t.AngleDoom <= angle && comparer.ToString() == "<="))
+ (t.AngleDoom <= angle && comparer.ToString() == "<=") ||
+ (t.AngleDoom != angle && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
{
// Replace
if(replace) t.Rotate(replaceangle);
diff --git a/Source/Plugins/BuilderModes/FindReplace/FindThingType.cs b/Source/Plugins/BuilderModes/FindReplace/FindThingType.cs
index 2c2cdda..f4d4e6a 100644
--- a/Source/Plugins/BuilderModes/FindReplace/FindThingType.cs
+++ b/Source/Plugins/BuilderModes/FindReplace/FindThingType.cs
@@ -85,8 +85,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
// Check for comparison operators
- string comparer;
- if (value[0].ToString() == ">" || value[0].ToString() == "<")
+ string comparer = "";
+ if (value[0].ToString() == ">" || value[0].ToString() == "<" || value[0].ToString() == "!")
{
comparer = value.Substring(0, 1);
if (value.Length > 1)
@@ -94,8 +94,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
comparer = value.Substring(0, 2);
value = value.Remove(0, comparer.Length);
}
- else
- comparer = "";
if (value.Length == 0)
return objs.ToArray();
@@ -115,7 +113,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
(t.SRB2Type > findtype && comparer.ToString() == ">") ||
(t.SRB2Type < findtype && comparer.ToString() == "<") ||
(t.SRB2Type >= findtype && comparer.ToString() == ">=") ||
- (t.SRB2Type <= findtype && comparer.ToString() == "<="))
+ (t.SRB2Type <= findtype && comparer.ToString() == "<=") ||
+ (t.SRB2Type != findtype && (comparer.ToString() == "!" || comparer.ToString() == "!=")))
{
// Replace
if(replace)