mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-02-07 08:21:10 +00:00
Add support for !/!= in searches for sector brightness/height/tag, linedef tag and thing type/angle, and update the documentation.
This commit is contained in:
parent
0c8effe3a3
commit
1f962e46e9
8 changed files with 30 additions and 37 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
<div id="contents">
|
||||
<p>
|
||||
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 <b>F3</b> 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 <b>Replace</b> checkbox if you want to replace the value of the found elements with another value. Click the Find / Replace button to perform the search.<br />
|
||||
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 <b>F3</b> 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 (<b>></b>, <b>>=</b>, <b><</b>, <b><=</b> or <b>!</b>/<b>!=</b>) for more advanced numeric searching. Check the <b>Replace</b> checkbox if you want to replace the value of the found elements with another value. Click the Find / Replace button to perform the search.<br />
|
||||
<br />
|
||||
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 <b>Edit Selection</b> button to edit the selected elements.
|
||||
</p>
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue