Renamed misleading script.trace log message classes, and simplified the legacy script subset.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5410 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
15502b9bf4
commit
b3b2005bc6
@ -16,8 +16,7 @@
|
||||
"General Errors", $error,
|
||||
"Script Errors", $scriptError,
|
||||
"Script Debug", $scriptDebug,
|
||||
"JavaScript Run Trace", "script.trace.javaScript",
|
||||
"Legacy Script Run Trace", "script.trace.legacy",
|
||||
"Script Entry Points", $reportScriptEntry,
|
||||
"Shader Debug", $shaderDebugOn,
|
||||
"Troubleshooting Dumps", $troubleShootingDump,
|
||||
"Entity State", $entityState,
|
||||
|
@ -300,15 +300,10 @@
|
||||
|
||||
script.plist.run.badTarget = $error;
|
||||
|
||||
/*
|
||||
"Trace" events for legacy and JavaScript scripts. These indicate when
|
||||
a JavaScript method or legacy script is called by the game, and should
|
||||
not be confused with the JavaScript trace facility (part of the Debug OXP).
|
||||
*/
|
||||
script.trace.legacy = no;
|
||||
script.trace.legacy.runWorld = inherit;
|
||||
script.trace.legacy.plist.run = inherit;
|
||||
script.trace.javaScript = no;
|
||||
// These messages are logged whenever Oolite calls a JS script method or runs a legacy script, respectively.
|
||||
$reportScriptEntry = no;
|
||||
script.javaScript.call = $reportScriptEntry;
|
||||
script.legacy.run = $reportScriptEntry;
|
||||
|
||||
script.deprecated.scriptActionOnTarget = $scriptError; // Warning not to use scriptActionOnTarget:
|
||||
|
||||
|
@ -323,10 +323,6 @@ static BOOL sRunningScript = NO;
|
||||
|
||||
[self setScriptTarget:self];
|
||||
|
||||
OOLogPushIndent();
|
||||
OOLog(@"script.trace.legacy.runWorld", @"----- Running world script with state %@", [self status_string]);
|
||||
OOLogIndentIf(@"script.trace.legacy.runWorld");
|
||||
|
||||
/* World scripts can potentially be invoked recursively, through
|
||||
scriptActionOnTarget: and possibly other mechanisms. This is bad, but
|
||||
that's the way it is. Legacy world scripts rely on only seeing certain
|
||||
@ -355,14 +351,6 @@ static BOOL sRunningScript = NO;
|
||||
{
|
||||
status = RecursiveRemapStatus(status);
|
||||
[self setStatus:status];
|
||||
if (RecursiveRemapStatus(status) != restoreStatus)
|
||||
{
|
||||
OOLog(@"script.trace.legacy.runWorld.recurse.lying", @"----- Running world script recursively and temporarily changing player status from %@ to %@.", OOStringFromEntityStatus(restoreStatus), OOStringFromEntityStatus(status));
|
||||
}
|
||||
else
|
||||
{
|
||||
OOLog(@"script.trace.legacy.runWorld.recurse", @"----- Running world script recursively.");
|
||||
}
|
||||
}
|
||||
sRunningScript = YES;
|
||||
|
||||
@ -377,8 +365,6 @@ static BOOL sRunningScript = NO;
|
||||
// Restore anti-recursion measures.
|
||||
sRunningScript = wasRunningScript;
|
||||
if (status != restoreStatus) [self setStatus:restoreStatus];
|
||||
|
||||
OOLogPopIndent();
|
||||
}
|
||||
|
||||
|
||||
|
@ -392,8 +392,8 @@ static JSFunctionSpec sScriptMethods[] =
|
||||
JS_ClearPendingException(context);
|
||||
}
|
||||
|
||||
OOLog(@"script.trace.javaScript", @"Calling [%@].%@()", [self name], OOStringFromJSID(methodID));
|
||||
OOLogIndentIf(@"script.trace.javaScript");
|
||||
OOLog(@"script.javaScript.call", @"Calling [%@].%@()", [self name], OOStringFromJSID(methodID));
|
||||
OOLogIndentIf(@"script.javaScript.call");
|
||||
#endif
|
||||
|
||||
// Push self on stack of running scripts.
|
||||
@ -419,7 +419,7 @@ static JSFunctionSpec sScriptMethods[] =
|
||||
sRunningStack = stackElement.back;
|
||||
|
||||
#ifndef NDEBUG
|
||||
OOLogOutdentIf(@"script.trace.javaScript");
|
||||
OOLogOutdentIf(@"script.javaScript.call");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -107,14 +107,14 @@ static NSString * const kCacheName = @"sanitized legacy scripts";
|
||||
return;
|
||||
}
|
||||
|
||||
OOLog(@"script.trace.legacy.plist.run", @"Running script %@", [self displayName]);
|
||||
OOLogIndentIf(@"script.trace.legacy.plist.run");
|
||||
OOLog(@"script.legacy.run", @"Running script %@", [self displayName]);
|
||||
OOLogIndentIf(@"script.legacy.run");
|
||||
|
||||
[PLAYER runScriptActions:_script
|
||||
withContextName:[self name]
|
||||
forTarget:(ShipEntity *)target];
|
||||
|
||||
OOLogOutdentIf(@"script.trace.legacy.plist.run");
|
||||
OOLogOutdentIf(@"script.legacy.run");
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user