diff --git a/Build/Compilers/ZDoom/zspecial.acs b/Build/Compilers/ZDoom/zspecial.acs index f5fa83f8b606c49417f1ee992d586755a4c46811..f159cd1cda9f885d7f07d052d68c242e13a69cc0 100644 --- a/Build/Compilers/ZDoom/zspecial.acs +++ b/Build/Compilers/ZDoom/zspecial.acs @@ -336,6 +336,7 @@ special -90:GetActorRoll(1), -91:QuakeEx(8,12), -92:Warp(6,11), + -93:GetMaxInventory(2), // Zandronum's -100:ResetMap(0), diff --git a/Build/Scripting/ZDoom_ACS.cfg b/Build/Scripting/ZDoom_ACS.cfg index 9e64300159fb5eb72d8bc9c6801c0efa99da5835..c67aea90d6aca660f9da598ee9b7bb4f591e649f 100644 --- a/Build/Scripting/ZDoom_ACS.cfg +++ b/Build/Scripting/ZDoom_ACS.cfg @@ -213,6 +213,7 @@ keywords GetLineRowOffset = "int GetLineRowOffset(void)"; GetLineUDMFFixed = "fixed GetLineUDMFFixed(int lineid, str key)"; GetLineUDMFInt = "int GetLineUDMFInt(int lineid, str key)"; + GetMaxInventory = "int GetMaxInventory(int tid, str inventory)"; GetPlayerInfo = "int GetPlayerInfo(int playernumber, int playerinfo)"; GetPlayerInput = "int GetPlayerInput(int player, int input)"; GetPolyobjX = "fixed GetPolyobjX(int polyid)"; @@ -406,7 +407,7 @@ keywords Spawn = "int Spawn(str classname, fixed x, fixed y, fixed z[, int tid[, int angle]])\nSpawns an actor at the given X, Y and Z coordinates.\nOptionally a TID and a byte angle can be specified."; SpawnForced = "int SpawnForced(str classname, fixed x, fixed y, fixed z[, int tid[, int angle]])\nForces the actor to spawn, even in conditions where the spawning would normally fail.\nThe return value is the number of things spawned."; SpawnDecal = "int SpawnDecal(int tid, str decalname, int flags[, fixed angle = 0.0[, fixed zoffset = 0.0[, fixed distance = 64.0]]])\nCreates a decal on a wall by tracing a line from the actor with the\nspecified tid until hitting said wall, on which the decal is then created.\nIf tid is 0, the tracing is done from the activator of the script.\ndecalname: The name of the decal to create, as defined in DECALDEF.\nflags: use SDF_ flags\nThe return value of the function is the number of decals spawned."; - SpawnProjectile = "void SpawnProjectile(int tid, string type, int angle, int speed, int vspeed, int gravity, int newtid)"; + SpawnProjectile = "void SpawnProjectile(int tid, str type, int angle, int speed, int vspeed, int gravity, int newtid)"; SpawnSpot = "int SpawnSpot(str classname, int spottid[, int tid[, int angle]])\nRequires a MapSpot at the location where you want the Actor to spawn.\nThe return value is the number of things spawned."; SpawnSpotFacing = "int SpawnSpotFacing(str classname, int spottid[, int tid])\nRequires a MapSpot at the location where you want the Actor to spawn.\nThe thing will assume the angle of the mapspot it is spawned to.\nThe return value is the number of things spawned."; SpawnSpotFacingForced = "int SpawnSpotFacingForced(str classname, int spottid[, int tid])\nRequires a MapSpot at the location where you want the Actor to spawn.\nForces the actor to spawn, even in conditions where the spawning would normally fail.\nThe thing will assume the angle of the mapspot it is spawned to.\nThe return value is the number of things spawned."; @@ -422,7 +423,7 @@ keywords StopSound = "void StopSound(int tid, int channel)\nStops the sound currently playing on the specified channel for the actor with matching tid"; str = "str expression"; StrCmp = "int StrCmp(str string1, str string2[, int maxcomparenum])\nCompares the two strings passed in arguments string1 and string2 character by character.\nIf maxcomparenum is specified, it only compares up to maxcomparenum characters of each string."; - StrCpy = "bool StrCpy(a:destination, string source[, int source_index])\nCopy a source string to a destination array as a series of characters.\nOptionally, the copy can start from a given index in the source string.\nReturns TRUE if the entire string (or substring) was successfully copied to the array;\nFALSE if the copy ran out of room or if a negative source_index was given."; + StrCpy = "bool StrCpy(a:destination, str source[, int source_index])\nCopy a source string to a destination array as a series of characters.\nOptionally, the copy can start from a given index in the source string.\nReturns TRUE if the entire string (or substring) was successfully copied to the array;\nFALSE if the copy ran out of room or if a negative source_index was given."; StrIcmp = "int StrCmp(str string1, str string2[, int maxcomparenum])\nStrIcmp is case-insensitive version of StrCmp"; StrLeft = "str StrLeft(str string, int length)\nCreates a new string containing the length first characters of string.\nIf string does not exist, an empty string is returned.\nIf string is shorter than length characters, the entire string is returned."; StrLen = "int StrLen(str string)"; diff --git a/Source/Core/Config/NodebuilderInfo.cs b/Source/Core/Config/NodebuilderInfo.cs index ce1b7fc49556312e402339ddaffda9004c8ac9f5..ea6dc749826fc90de91674475c0b05647752082f 100644 --- a/Source/Core/Config/NodebuilderInfo.cs +++ b/Source/Core/Config/NodebuilderInfo.cs @@ -32,11 +32,11 @@ namespace CodeImp.DoomBuilder.Config #region ================== Variables - private string name; - private string title; - private CompilerInfo compiler; - private string parameters; - private bool specialoutputfile; + private readonly string name; + private readonly string title; + private readonly CompilerInfo compiler; + private readonly string parameters; + private readonly bool specialoutputfile; #endregion @@ -55,15 +55,13 @@ namespace CodeImp.DoomBuilder.Config // Constructor public NodebuilderInfo(string filename, string name, Configuration cfg) { - string compilername; - General.WriteLogLine("Registered nodebuilder configuration '" + name + "' from '" + filename + "'"); // Initialize this.name = name; this.compiler = null; this.title = cfg.ReadSetting("nodebuilders." + name + ".title", "<untitled configuration>"); - compilername = cfg.ReadSetting("nodebuilders." + name + ".compiler", ""); + string compilername = cfg.ReadSetting("nodebuilders." + name + ".compiler", ""); this.parameters = cfg.ReadSetting("nodebuilders." + name + ".parameters", ""); // Check for special output filename @@ -104,7 +102,7 @@ namespace CodeImp.DoomBuilder.Config public int CompareTo(NodebuilderInfo other) { // Compare - return name.CompareTo(other.name); + return String.Compare(name, other.name, StringComparison.Ordinal); } // String representation diff --git a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs index 77708ee676a26e43a1053439d659d3f158ad54c6..a91700016d0fcb49cfdde3bdce76f23651091fe0 100644 --- a/Source/Plugins/BuilderModes/VisualModes/SectorData.cs +++ b/Source/Plugins/BuilderModes/VisualModes/SectorData.cs @@ -327,6 +327,12 @@ namespace CodeImp.DoomBuilder.BuilderModes SectorLevel l = lightlevels[i]; SectorLevel pl = lightlevels[i + 1]; + // Glow levels should not affect light transfer + if(l.type == SectorLevelType.Glow) continue; + + // Glow levels don't cast light + if(pl.type == SectorLevelType.Glow && lightlevels.Count > i + 2) pl = lightlevels[i + 2]; + if(l.lighttype == LightLevelType.TYPE1) { stored = pl;