From 6d1717336b56ff79bb6cd45223922ca6841b917e Mon Sep 17 00:00:00 2001
From: ZZYZX <zzyzx@virtual>
Date: Sat, 25 Feb 2017 10:41:03 +0200
Subject: [PATCH] Added: custom arg0str things with //$ArgNAllowStr and
 //$ArgNStr (title for string version)

---
 Source/Core/Config/ArgumentInfo.cs  | 4 +++-
 Source/Core/Config/ThingTypeInfo.cs | 7 +++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Source/Core/Config/ArgumentInfo.cs b/Source/Core/Config/ArgumentInfo.cs
index 0460afb4a..8c302765e 100755
--- a/Source/Core/Config/ArgumentInfo.cs
+++ b/Source/Core/Config/ArgumentInfo.cs
@@ -244,13 +244,15 @@ 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 targetclasses,
-			int type, int defaultvalue, string enumstr, IDictionary<string, EnumList> enums)
+			int type, int defaultvalue, string enumstr, IDictionary<string, EnumList> enums, bool str, string argtitlestr)
 		{
 			this.used = true;
 			this.title = argtitle;
 			this.tooltip = tooltip;
 			this.defaultvalue = defaultvalue;
 			this.flagslist = new EnumList(); //mxd
+            this.str = str;
+            this.titlestr = argtitlestr;
 
 			// Get rendering hint settings
 			switch(renderstyle.ToLowerInvariant())
diff --git a/Source/Core/Config/ThingTypeInfo.cs b/Source/Core/Config/ThingTypeInfo.cs
index ea955e421..f3ac11c6d 100755
--- a/Source/Core/Config/ThingTypeInfo.cs
+++ b/Source/Core/Config/ThingTypeInfo.cs
@@ -484,7 +484,10 @@ namespace CodeImp.DoomBuilder.Config
 				string argenum = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "enum"));
 				string argrenderstyle = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "renderstyle"));
 				string argrendercolor, minrange, maxrange, minrangecolor, maxrangecolor;
-				if(!string.IsNullOrEmpty(argrenderstyle))
+                bool argstr = actor.HasProperty("$arg" + i + "allowstr");
+                string argtitlestr = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "str"));
+                if (string.IsNullOrEmpty(argtitlestr)) argtitlestr = argtitle;
+				if (!string.IsNullOrEmpty(argrenderstyle))
 				{
 					argrendercolor = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "rendercolor"));
 					minrange = ZDTextParser.StripQuotes(actor.GetPropertyAllValues("$arg" + i + "minrange"));
@@ -499,7 +502,7 @@ namespace CodeImp.DoomBuilder.Config
 				
 				args[i] = new ArgumentInfo(title, argtitle, argtooltip, argrenderstyle, argrendercolor, 
 					minrange, minrangecolor, maxrange, maxrangecolor, targetclasses,
-					argtype, defaultvalue, argenum, General.Map.Config.Enums);
+					argtype, defaultvalue, argenum, General.Map.Config.Enums, argstr, argtitlestr);
 			}
 
 			//mxd. Some SLADE compatibility
-- 
GitLab