Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 3:37:40 AM (14 years ago)
Author:
landauf
Message:

merged consolecommands3 branch back to trunk.

note: the console command interface has changed completely, but the documentation is not yet up to date. just copy an existing command and change it to your needs, it's pretty self-explanatory. also the include files related to console commands are now located in core/command/. in the game it should work exactly like before, except for some changes in the auto-completion.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/input/Button.cc

    r6536 r7284  
    3939#include "util/StringUtils.h"
    4040#include "util/Debug.h"
    41 #include "core/ConsoleCommand.h"
    42 #include "core/CommandEvaluation.h"
    43 #include "core/CommandExecutor.h"
     41#include "core/command/ConsoleCommand.h"
     42#include "core/command/CommandEvaluation.h"
     43#include "core/command/CommandExecutor.h"
    4444#include "core/ConfigFileManager.h"
    4545
     
    117117        // separate the commands
    118118        SubString commandStrings(bindingString_, "|", SubString::WhiteSpaces, false,
    119             '\\', false, '"', false, '(', ')', false, '\0');
     119            '\\', false, '"', false, '{', '}', false, '\0');
    120120
    121121        for (unsigned int iCommand = 0; iCommand < commandStrings.size(); iCommand++)
     
    124124            {
    125125                SubString tokens(commandStrings[iCommand], " ", SubString::WhiteSpaces, false,
    126                     '\\', false, '"', false, '(', ')', false, '\0');
     126                    '\\', false, '"', false, '{', '}', false, '\0');
    127127
    128128                KeybindMode::Value mode = KeybindMode::None;
     
    175175
    176176                // evaluate the command
    177                 const CommandEvaluation& eval = CommandExecutor::evaluate(commandStr);
    178                 if (!eval.isValid())
     177                CommandEvaluation eval = CommandExecutor::evaluate(commandStr);
     178                if (!eval.isValid() || eval.evaluateParams(true))
    179179                {
    180180                    parseError("Command evaluation of \"" + commandStr + "\"failed.", true);
Note: See TracChangeset for help on using the changeset viewer.