Exemple #1
0
 protected CmdTrigger(StringStream text, BaseCommand <C> selectedCmd, C args)
 {
     m_text           = text;
     this.selectedCmd = selectedCmd;
     Args             = args;
 }
Exemple #2
0
 public void DisplayCmd(CmdTrigger <C> trigger, BaseCommand <C> cmd)
 {
     DisplayCmd(trigger, cmd, false, true);
 }
Exemple #3
0
 public bool MayDisplay(CmdTrigger <C> trigger, BaseCommand <C> cmd, bool ignoreRestrictions)
 {
     return(cmd.Enabled &&
            (ignoreRestrictions ||
             (cmd.RootCmd.MayTrigger(trigger, cmd, true) && TriggerValidator(trigger, cmd, true))));
 }
Exemple #4
0
 /// <summary>
 /// Lets the given CmdTrigger trigger the given Command.
 /// </summary>
 /// <param name="trigger"></param>
 /// <param name="cmd"></param>
 /// <param name="silentFail">Will not reply if it failed due to target restrictions or privileges etc</param>
 /// <returns></returns>
 public virtual object Eval(CmdTrigger <C> trigger, BaseCommand <C> cmd)
 {
     return(Eval(trigger, cmd, false));
 }
Exemple #5
0
 public bool Trigger(CmdTrigger <C> trigger, BaseCommand <C> cmd)
 {
     return(Execute(trigger, cmd, false));
 }
Exemple #6
0
 /// <summary>
 /// Determines whether the given command may ever be used in this Context, depending
 /// on the trigger's parameters that the triggerer cannot currently change and
 /// are not already checked globally by the TriggerValidator.
 /// </summary>
 public virtual bool MayTrigger(CmdTrigger <C> trigger, BaseCommand <C> cmd, bool silent)
 {
     return(true);
 }