mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-31 12:50:52 +00:00
Added, "Find Thing Action and Arguments" search mode: "Any action" (-1) can now be used as a search input.
Fixed, "Find Linedef Action and Arguments" and "Find Sector Effect" search modes: in some cases action/effect was checked incorrectly when performing a search.
This commit is contained in:
parent
27f497bf5e
commit
a006a3cbc3
3 changed files with 14 additions and 9 deletions
|
@ -173,8 +173,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all linedefs
|
||||
foreach(Linedef l in list)
|
||||
{
|
||||
// Action matches?
|
||||
if((action == -1 && l.Action < 1) || l.Action != action && !BitsMatch(l.Action, expectedbits)) continue;
|
||||
// Action matches? -1 means any action (mxd)
|
||||
if((action == -1 && l.Action == 0) || (action > -1 && (l.Action != action && !BitsMatch(l.Action, expectedbits)))) continue;
|
||||
|
||||
bool match = true;
|
||||
string argtext = "";
|
||||
|
|
|
@ -101,8 +101,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all sectors
|
||||
foreach(Sector s in list)
|
||||
{
|
||||
// Effect matches?
|
||||
if((effect == -1 && s.Effect > 0) || s.Effect == effect || BitsMatch(s.Effect, expectedbits))
|
||||
// Effect matches? -1 means any effect (mxd)
|
||||
if((effect == -1 && s.Effect > 0) || (effect > -1 && (s.Effect == effect || BitsMatch(s.Effect, expectedbits))))
|
||||
{
|
||||
// Replace
|
||||
if(replace) s.Effect = replaceeffect;
|
||||
|
|
|
@ -60,16 +60,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
return General.Map.FormatInterface.HasThingAction;
|
||||
}
|
||||
|
||||
|
||||
// This is called when the browse button is pressed
|
||||
public override string Browse(string initialvalue)
|
||||
{
|
||||
int action;
|
||||
int.TryParse(initialvalue, out action);
|
||||
action = General.Interface.BrowseLinedefActions(BuilderPlug.Me.FindReplaceForm, action);
|
||||
return action.ToString();
|
||||
return General.Interface.BrowseLinedefActions(BuilderPlug.Me.FindReplaceForm, action, true).ToString();
|
||||
}
|
||||
|
||||
// This is called when the browse replace button is pressed
|
||||
public override string BrowseReplace(string initialvalue)
|
||||
{
|
||||
int action;
|
||||
int.TryParse(initialvalue, out action);
|
||||
return General.Interface.BrowseLinedefActions(BuilderPlug.Me.FindReplaceForm, action).ToString();
|
||||
}
|
||||
|
||||
// This is called to perform a search (and replace)
|
||||
// Returns a list of items to show in the results list
|
||||
|
@ -172,8 +177,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
// Go for all things
|
||||
foreach(Thing t in list)
|
||||
{
|
||||
// Action matches?
|
||||
if(t.Action != action) continue;
|
||||
// Action matches? -1 means any action (mxd)
|
||||
if((action == -1 && t.Action == 0) || (action > -1 && t.Action != action)) continue;
|
||||
|
||||
bool match = true;
|
||||
string argtext = "";
|
||||
|
|
Loading…
Reference in a new issue