mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 23:11:03 +00:00
Do not clear all custom objects if one or more SOC/Lua scripts throws an error
Fix SOC errors being displayed as Lua errors
This commit is contained in:
parent
9948645e77
commit
f26492fa65
3 changed files with 9 additions and 8 deletions
|
@ -1874,7 +1874,6 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if (lua.HasError)
|
||||
{
|
||||
lua.LogError();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1882,8 +1881,8 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//mxd. Add to text resources collection
|
||||
currentreader = null;
|
||||
|
||||
if (lua.HasError)
|
||||
lua.ClearActors();
|
||||
//if (lua.HasError)
|
||||
// lua.ClearActors();
|
||||
}
|
||||
|
||||
// sphere: This loads things and level headers from SRB2 SOC files.
|
||||
|
@ -1907,7 +1906,6 @@ namespace CodeImp.DoomBuilder.Data
|
|||
if (soc.HasError)
|
||||
{
|
||||
soc.LogError();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1915,8 +1913,8 @@ namespace CodeImp.DoomBuilder.Data
|
|||
//mxd. Add to text resources collection
|
||||
currentreader = null;
|
||||
|
||||
if (soc.HasError)
|
||||
soc.ClearActors();
|
||||
//if (soc.HasError)
|
||||
// soc.ClearActors();
|
||||
}
|
||||
|
||||
// [ZZ] this retrieves ZDoom actor structure by class name.
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
|
||||
if (string.IsNullOrEmpty(objname))
|
||||
{
|
||||
parser.ReportError("Lua object structure has no object name or map thing number");
|
||||
parser.ReportError("SOC object structure has no object name or map thing number");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
parser.SkipWhitespace(false, true);
|
||||
token = parser.ReadToken();
|
||||
|
||||
General.WriteLogLine(tokenname);
|
||||
General.WriteLogLine(token);
|
||||
|
||||
// SOC definitions are terminated by an empty line. Blegh.
|
||||
if (tokenname == "\n")
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
#region ================== Variables
|
||||
|
||||
//mxd. Script type
|
||||
internal override ScriptType ScriptType { get { return ScriptType.LUA; } }
|
||||
internal override ScriptType ScriptType { get { return ScriptType.SOC; } }
|
||||
|
||||
// SRB2 mobjs
|
||||
private Dictionary<int, ActorStructure> mobjs;
|
||||
|
|
Loading…
Reference in a new issue