diff --git a/Source/Core/Config/ArgumentInfo.cs b/Source/Core/Config/ArgumentInfo.cs index 093b24ec..f3f361cb 100755 --- a/Source/Core/Config/ArgumentInfo.cs +++ b/Source/Core/Config/ArgumentInfo.cs @@ -237,7 +237,7 @@ namespace CodeImp.DoomBuilder.Config //mxd. Constructor for an argument info defined in DECORATE internal ArgumentInfo(string actorname, string argtitle, string tooltip, string renderstyle, string rendercolor, - string minrange, string minrangecolor, string maxrange, string maxrangecolor, + string minrange, string minrangecolor, string maxrange, string maxrangecolor, string targetclasses, int type, int defaultvalue, string enumstr, IDictionary enums) { this.used = true; @@ -306,6 +306,17 @@ namespace CodeImp.DoomBuilder.Config } } + //Check for TargetClass + this.targetclasses = new HashSet(StringComparer.InvariantCultureIgnoreCase); + if(type == (int)UniversalType.ThingTag) + { + if(!string.IsNullOrEmpty(targetclasses)) + { + foreach(string tclass in targetclasses.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries)) + this.targetclasses.Add(tclass.Trim()); + } + } + // Get argument type if(System.Enum.IsDefined(typeof(UniversalType), type)) { diff --git a/Source/Core/Config/ThingTypeInfo.cs b/Source/Core/Config/ThingTypeInfo.cs index a70a9b72..ea955e42 100755 --- a/Source/Core/Config/ThingTypeInfo.cs +++ b/Source/Core/Config/ThingTypeInfo.cs @@ -479,6 +479,7 @@ namespace CodeImp.DoomBuilder.Config string argtitle = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i)); string argtooltip = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "tooltip").Replace("\\n", Environment.NewLine)); int argtype = actor.GetPropertyValueInt("$arg" + i + "type", 0); + string targetclasses = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "targetclasses")); int defaultvalue = actor.GetPropertyValueInt("$arg" + i + "default", 0); string argenum = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "enum")); string argrenderstyle = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "renderstyle")); @@ -497,7 +498,7 @@ namespace CodeImp.DoomBuilder.Config } args[i] = new ArgumentInfo(title, argtitle, argtooltip, argrenderstyle, argrendercolor, - minrange, minrangecolor, maxrange, maxrangecolor, + minrange, minrangecolor, maxrange, maxrangecolor, targetclasses, argtype, defaultvalue, argenum, General.Map.Config.Enums); }