mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Merge pull request #779 from JeffProgrammer/make_console_sane_again
Make the Console Sane Again
This commit is contained in:
commit
22db2d4291
1 changed files with 1 additions and 16 deletions
|
|
@ -53,25 +53,10 @@ function ConsoleEntry::eval()
|
||||||
$Con::warnVoidAssignment = false;
|
$Con::warnVoidAssignment = false;
|
||||||
|
|
||||||
echo("==>" @ %text);
|
echo("==>" @ %text);
|
||||||
if( !startsWith(%text, "function ")
|
eval(%text);
|
||||||
&& !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);
|
|
||||||
$Con::warnVoidAssignment = %oldWarnVoidAssignment;
|
$Con::warnVoidAssignment = %oldWarnVoidAssignment;
|
||||||
|
|
||||||
ConsoleEntry.setValue("");
|
ConsoleEntry.setValue("");
|
||||||
|
|
||||||
// Echo result.
|
|
||||||
if(%result !$= "")
|
|
||||||
echo(%result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ToggleConsole(%make)
|
function ToggleConsole(%make)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue