mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-28 11:03:49 +00:00
Make the Console Sane Again
This commit is contained in:
parent
35de012ee7
commit
c6263829c9
1 changed files with 1 additions and 16 deletions
|
|
@ -53,25 +53,10 @@ function ConsoleEntry::eval()
|
|||
$Con::warnVoidAssignment = false;
|
||||
|
||||
echo("==>" @ %text);
|
||||
if( !startsWith(%text, "function ")
|
||||
&& !startsWith(%text, "datablock ")
|
||||
&& !startsWith(%text, "foreach(")
|
||||
&& !startsWith(%text, "foreach$(")
|
||||
&& !startsWith(%text, "if(")
|
||||
&& !startsWith(%text, "while(")
|
||||
&& !startsWith(%text, "for(")
|
||||
&& !startsWith(%text, "switch(")
|
||||
&& !startsWith(%text, "switch$("))
|
||||
%result = eval("return" SPC %text);
|
||||
else
|
||||
eval(%text);
|
||||
eval(%text);
|
||||
$Con::warnVoidAssignment = %oldWarnVoidAssignment;
|
||||
|
||||
ConsoleEntry.setValue("");
|
||||
|
||||
// Echo result.
|
||||
if(%result !$= "")
|
||||
echo(%result);
|
||||
}
|
||||
|
||||
function ToggleConsole(%make)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue