Replace sandbox wrapper scripts.
This commit is contained in:
committed by
abcdefg30
parent
e8dd85419f
commit
445b736885
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
context.FatalError(ex.Message);
|
||||
context.FatalError(ex);
|
||||
}
|
||||
|
||||
Dispose();
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (LuaException e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -399,7 +399,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Context.FatalError(e.Message);
|
||||
Context.FatalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
public class LuaScript : ITick, IWorldLoaded, INotifyActorDisposing
|
||||
{
|
||||
readonly LuaScriptInfo info;
|
||||
ScriptContext context;
|
||||
public ScriptContext Context;
|
||||
bool disposed;
|
||||
|
||||
public LuaScript(LuaScriptInfo info)
|
||||
@@ -40,13 +40,13 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
void IWorldLoaded.WorldLoaded(World world, WorldRenderer worldRenderer)
|
||||
{
|
||||
var scripts = info.Scripts ?? Enumerable.Empty<string>();
|
||||
context = new ScriptContext(world, worldRenderer, scripts);
|
||||
context.WorldLoaded();
|
||||
Context = new ScriptContext(world, worldRenderer, scripts);
|
||||
Context.WorldLoaded();
|
||||
}
|
||||
|
||||
void ITick.Tick(Actor self)
|
||||
{
|
||||
context.Tick();
|
||||
Context.Tick();
|
||||
}
|
||||
|
||||
void INotifyActorDisposing.Disposing(Actor self)
|
||||
@@ -54,11 +54,11 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
if (disposed)
|
||||
return;
|
||||
|
||||
context?.Dispose();
|
||||
Context?.Dispose();
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
|
||||
public bool FatalErrorOccurred => context.FatalErrorOccurred;
|
||||
public bool FatalErrorOccurred => Context.FatalErrorOccurred;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -211,7 +211,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -253,7 +253,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -274,7 +274,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -296,7 +296,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -319,7 +319,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -338,7 +338,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -361,7 +361,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -385,7 +385,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -408,7 +408,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -431,7 +431,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -446,7 +446,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -467,7 +467,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -488,7 +488,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
f.Context.FatalError(ex.Message);
|
||||
f.Context.FatalError(ex);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user