mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 19:53:48 +00:00
Console Refactor
This commit is contained in:
parent
626de074cc
commit
89b0c7f73b
89 changed files with 1883 additions and 1553 deletions
|
|
@ -27,6 +27,7 @@
|
|||
#include "platform/platform.h"
|
||||
#include "console/simDatablock.h"
|
||||
|
||||
#include "script.h"
|
||||
#include "console/console.h"
|
||||
#include "console/consoleInternal.h"
|
||||
#include "console/engineAPI.h"
|
||||
|
|
@ -34,7 +35,6 @@
|
|||
#include "T3D/gameBase/gameConnection.h"
|
||||
|
||||
#include "core/stream/bitStream.h"
|
||||
#include "console/compiler.h"
|
||||
|
||||
IMPLEMENT_CO_DATABLOCK_V1(SimDataBlock);
|
||||
SimObjectId SimDataBlock::sNextObjectId = DataBlockObjectIdFirst;
|
||||
|
|
@ -252,17 +252,14 @@ void SimDataBlock::performSubstitutions(SimDataBlock* dblock, const SimObject* o
|
|||
|
||||
b[0] = '\0';
|
||||
|
||||
// perform the statement evaluation
|
||||
Compiler::gSyntaxError = false;
|
||||
//Con::errorf("EVAL [%s]", avar("return %s;", buffer));
|
||||
const char *result = Con::evaluate(avar("return %s;", buffer), false, 0);
|
||||
if (Compiler::gSyntaxError)
|
||||
Con::EvalResult evalResult = Con::evaluate(avar("return %s;", buffer), false, 0);
|
||||
if (evalResult.valid)
|
||||
{
|
||||
Con::errorf("Field Substitution Failed: field=\"%s\" substitution=\"%s\" -- syntax error",
|
||||
substitutions[i]->mSlot, substitutions[i]->mValue);
|
||||
Compiler::gSyntaxError = false;
|
||||
return;
|
||||
}
|
||||
const char* result = evalResult.value;
|
||||
|
||||
// output a runtime console error when a substitution produces and empty result.
|
||||
if (result == 0 || result[0] == '\0')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue