Skip to content
Snippets Groups Projects
Commit bc2a74d1 authored by biwa's avatar biwa
Browse files

Find and Replace Mode: fixed a problem where linedef activation flags could...

Find and Replace Mode: fixed a problem where linedef activation flags could not be found or replaced. Fixes #667
parent c1d0428c
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using CodeImp.DoomBuilder.Config; using CodeImp.DoomBuilder.Config;
using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Map;
...@@ -83,7 +84,7 @@ namespace CodeImp.DoomBuilder.BuilderModes ...@@ -83,7 +84,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
f = f.Substring(1, f.Length - 1); f = f.Substring(1, f.Length - 1);
} }
if(General.Map.Config.LinedefFlags.ContainsKey(f)) findflagslist.Add(f, setflag); if(General.Map.Config.LinedefFlags.ContainsKey(f) || General.Map.Config.LinedefActivates.Any(la => la.Key == f)) findflagslist.Add(f, setflag);
} }
if(findflagslist.Count == 0) if(findflagslist.Count == 0)
{ {
...@@ -106,7 +107,7 @@ namespace CodeImp.DoomBuilder.BuilderModes ...@@ -106,7 +107,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
f = f.Substring(1, f.Length - 1); f = f.Substring(1, f.Length - 1);
} }
if(!General.Map.Config.LinedefFlags.ContainsKey(f)) if(!General.Map.Config.LinedefFlags.ContainsKey(f) && !General.Map.Config.LinedefActivates.Any(la => la.Key == f))
{ {
MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show("Invalid replace value \"" + f + "\" for this search type!", "Find and Replace", MessageBoxButtons.OK, MessageBoxIcon.Error);
return objs.ToArray(); return objs.ToArray();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment