mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #779 from JeffProgrammer/make_console_sane_again
Make the Console Sane Again
This commit is contained in:
commit
22db2d4291
|
|
@ -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…
Reference in a new issue