mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-26 05:40:53 +00:00
DECORATE: fixed parsing error when whole "States" block is on one line.
Fixed: Incorrect articles were sometimes used in Draw Geometry/Curve/Rectangle/Ellipse info messages.
This commit is contained in:
parent
50c004bb2c
commit
83ee9aed4d
4 changed files with 12 additions and 3 deletions
|
@ -139,6 +139,15 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
{
|
{
|
||||||
parser.SkipWhitespace(false);
|
parser.SkipWhitespace(false);
|
||||||
t = parser.ReadToken();
|
t = parser.ReadToken();
|
||||||
|
|
||||||
|
//mxd. Because stuff like this is also valid: "Actor Oneliner { States { Spawn: WOOT A 1 A_FadeOut(0.1) Loop }}"
|
||||||
|
if(t == "}") {
|
||||||
|
// Rewind so that this scope end can be read again
|
||||||
|
parser.DataStream.Seek(-1, SeekOrigin.Current);
|
||||||
|
|
||||||
|
// Done here
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
|
||||||
"outstanding", "mysterious", "amusing", "charming", "fantastic", "jolly" };
|
"outstanding", "mysterious", "amusing", "charming", "fantastic", "jolly" };
|
||||||
string word = adjectives[points.Count % adjectives.Length];
|
string word = adjectives[points.Count % adjectives.Length];
|
||||||
word = (points.Count > adjectives.Length) ? "very " + word : word;
|
word = (points.Count > adjectives.Length) ? "very " + word : word;
|
||||||
string a = ((word[0] == 'a') || (word[0] == 'e') || (word[0] == 'o')) ? "an " : "a ";
|
string a = ((word[0] == 'a') || (word[0] == 'e') || (word[0] == 'o') || (word[0] == 'u')) ? "an " : "a ";
|
||||||
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " curve.");
|
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " curve.");
|
||||||
|
|
||||||
List<DrawnVertex> verts = new List<DrawnVertex>();
|
List<DrawnVertex> verts = new List<DrawnVertex>();
|
||||||
|
|
|
@ -472,7 +472,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
"outstanding", "mysterious", "amusing", "charming", "fantastic", "jolly" };
|
"outstanding", "mysterious", "amusing", "charming", "fantastic", "jolly" };
|
||||||
string word = adjectives[points.Count % adjectives.Length];
|
string word = adjectives[points.Count % adjectives.Length];
|
||||||
word = (points.Count > adjectives.Length) ? "very " + word : word;
|
word = (points.Count > adjectives.Length) ? "very " + word : word;
|
||||||
string a = ((word[0] == 'a') || (word[0] == 'e') || (word[0] == 'o')) ? "an " : "a ";
|
string a = ((word[0] == 'a') || (word[0] == 'e') || (word[0] == 'o') || (word[0] == 'u')) ? "an " : "a ";
|
||||||
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " drawing.");
|
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " drawing.");
|
||||||
|
|
||||||
// Make the drawing
|
// Make the drawing
|
||||||
|
|
|
@ -258,7 +258,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.ClassicModes
|
||||||
// Make an analysis and show info
|
// Make an analysis and show info
|
||||||
string[] adjectives = new string[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :)
|
string[] adjectives = new string[] { "gloomy", "sad", "unhappy", "lonely", "troubled", "depressed", "heartsick", "glum", "pessimistic", "bitter", "downcast" }; // aaand my english vocabulary ends here :)
|
||||||
string word = adjectives[new Random().Next(adjectives.Length - 1)];
|
string word = adjectives[new Random().Next(adjectives.Length - 1)];
|
||||||
string a = ((word[0] == 'a') || (word[0] == 'e') || (word[0] == 'o')) ? "an " : "a ";
|
string a = (word[0] == 'u' ? "an " : "a ");
|
||||||
|
|
||||||
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " " + shapeName+".");
|
General.Interface.DisplayStatus(StatusType.Action, "Created " + a + word + " " + shapeName+".");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue