From 893b269d9a6bb7ce0aacf5f3bac19087be87b217 Mon Sep 17 00:00:00 2001 From: MaxED Date: Tue, 23 Feb 2016 18:28:28 +0000 Subject: [PATCH] DECORATE: added "//$IgnoreRenderstyle" special comment. Updated ZDoom_DECORATE.cfg. Updated documentation ("DECORATE keys" page). --- Build/Scripting/ZDoom_DECORATE.cfg | 37 +++++++++++++++++++++++++++++ Help/gc_decoratekeys.html | 5 ++++ Source/Core/Config/ThingTypeInfo.cs | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Build/Scripting/ZDoom_DECORATE.cfg b/Build/Scripting/ZDoom_DECORATE.cfg index 7b770c2..660499b 100644 --- a/Build/Scripting/ZDoom_DECORATE.cfg +++ b/Build/Scripting/ZDoom_DECORATE.cfg @@ -23,6 +23,43 @@ scripttype = 3; //0 = unknown script, 1 = acc, 2 = modeldef, 3 = decorate keywords { +//Editor special comments +//These are handled in a different fascion: key is replaced with the value and the caret is placed at [EP] position + $Angled = "$Angled"; + $NotAngled = "$NotAngled"; + $Category = "//$Category \"[EP]\""; + $Sprite = "//$Sprite \"[EP]\""; + $IgnoreRenderstyle = "//$IgnoreRenderstyle"; + $Title = "//$Title \"[EP]\""; + $Arg0 = "//$Arg0 \"[EP]\""; + $Arg1 = "//$Arg1 \"[EP]\""; + $Arg2 = "//$Arg2 \"[EP]\""; + $Arg3 = "//$Arg3 \"[EP]\""; + $Arg4 = "//$Arg4 \"[EP]\""; + $Arg0Default = "//$Arg0Default "; + $Arg1Default = "//$Arg1Default "; + $Arg2Default = "//$Arg2Default "; + $Arg3Default = "//$Arg3Default "; + $Arg4Default = "//$Arg4Default "; + $Arg0Tooltip = "//$Arg0Tooltip \"[EP]\""; + $Arg1Tooltip = "//$Arg1Tooltip \"[EP]\""; + $Arg2Tooltip = "//$Arg2Tooltip \"[EP]\""; + $Arg3Tooltip = "//$Arg3Tooltip \"[EP]\""; + $Arg4Tooltip = "//$Arg4Tooltip \"[EP]\""; + $Arg0Type = "//$Arg0Type "; + $Arg1Type = "//$Arg1Type "; + $Arg2Type = "//$Arg2Type "; + $Arg3Type = "//$Arg3Type "; + $Arg4Type = "//$Arg4Type "; + $Arg0Enum = "//$Arg0Enum "; + $Arg1Enum = "//$Arg1Enum "; + $Arg2Enum = "//$Arg2Enum "; + $Arg3Enum = "//$Arg3Enum "; + $Arg4Enum = "//$Arg4Enum "; + $Color = "//$Color "; + $Obsolete = "//$Obsolete \"[EP]\""; + $GZDB_SKIP = "//$GZDB_SKIP"; +//Preprocessor directives #Include = "#Include"; //Monster AI A_AlertMonsters = "A_AlertMonsters[(float maxrange = 0.0[, int flags = 0])]"; diff --git a/Help/gc_decoratekeys.html b/Help/gc_decoratekeys.html index 3cc1d5f..af27c1f 100644 --- a/Help/gc_decoratekeys.html +++ b/Help/gc_decoratekeys.html @@ -31,6 +31,9 @@ //$Title <title>
Specifies which name to give to the actor. By default, a custom actor not identified in a configuration file will use the Tag property, and if not present, will default to the class name.

+ //$IgnoreRenderstyle - GZDB only.
+ "RenderStyle" DECORATE property will be ignored by the editor. Helpful when you want to see the sprite of an invivsible actor in Visual mode.
+
//$ArgN <name> - GZDB only.
Allows to override default argument names for this actor.

@@ -87,6 +90,7 @@ Actor ChexShield : ResistanceRune replaces ResistanceRune 5104 { //$Category "Pickups/Chex Powerups" //$Sprite ARMXA0 + //$IgnoreRenderstyle //$Title "Chex Shield" //$Color 12 //$NotAngled @@ -115,6 +119,7 @@ Actor ChexShield : ResistanceRune replaces ResistanceRune 5104 Height 44 Radius 26 + RenderStyle None Inventory.PickupMessage "Picked up the energized Chex armor!" States diff --git a/Source/Core/Config/ThingTypeInfo.cs b/Source/Core/Config/ThingTypeInfo.cs index a15f4bd..b1499fc 100644 --- a/Source/Core/Config/ThingTypeInfo.cs +++ b/Source/Core/Config/ThingTypeInfo.cs @@ -591,7 +591,8 @@ namespace CodeImp.DoomBuilder.Config if(actor.HasPropertyWithValue("height")) height = actor.GetPropertyValueInt("height", 0); //mxd. Renderstyle - if(actor.HasPropertyWithValue("renderstyle")) renderstyle = actor.GetPropertyValueString("renderstyle", 0).ToLower(); + if(actor.HasPropertyWithValue("renderstyle") && !actor.HasProperty("$ignorerenderstyle")) + renderstyle = actor.GetPropertyValueString("renderstyle", 0).ToLower(); //mxd. Alpha if(actor.HasPropertyWithValue("alpha"))