mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Recognize -- comments in Lua files.
Only log a warning when a Thing sprite can't be found, instead of aborting the whole Lua/SOC reader.
This commit is contained in:
parent
58b0ec16e1
commit
e7306d016d
2 changed files with 4 additions and 4 deletions
|
@ -133,7 +133,7 @@ namespace CodeImp.DoomBuilder.SRB2
|
|||
sprite = token;
|
||||
break;
|
||||
}
|
||||
ReportError("The sprite \"" + token + "\" assigned by the \"$sprite\" property does not exist");
|
||||
LogWarning("The sprite \"" + token + "\" assigned by the \"$sprite\" property does not exist");
|
||||
return false;
|
||||
case "doomednum":
|
||||
if (!ReadParameter(out token, out finished)) return false;
|
||||
|
@ -258,11 +258,11 @@ namespace CodeImp.DoomBuilder.SRB2
|
|||
c = (char)datareader.ReadByte();
|
||||
|
||||
// Check if this is comment
|
||||
if (c == '/')
|
||||
if (c == '/' || c == '-')
|
||||
{
|
||||
if (datastream.Position == datastream.Length) return false;
|
||||
char c2 = (char)datareader.ReadByte();
|
||||
if (c2 == '/')
|
||||
if (c2 == c)
|
||||
{
|
||||
// Check if not a special comment with a token
|
||||
if (datastream.Position == datastream.Length) return false;
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace CodeImp.DoomBuilder.SRB2
|
|||
sprite = spritename;
|
||||
continue;
|
||||
}
|
||||
ReportError("The sprite \"" + spritename + "\" assigned by the \"$sprite\" property does not exist");
|
||||
LogWarning("The sprite \"" + spritename + "\" assigned by the \"$sprite\" property does not exist");
|
||||
}
|
||||
if (line.StartsWith("#$Name "))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue