# File lib/command.rb, line 37
  def self.load
    @log.info "Loading commands..."

    # first load the commands for objects
    ocmdtable = TernaryTrie.new
    if options['object_interface'] && !options['object_interface'].empty?
      options['object_interface'].each do |i|
        cmds = YAML::load_file("cmd/#{i}.yaml")
        cmds.each do |c|
          Kernel::load("cmd/#{i}/#{c.cmd}.rb")
          ocmdtable.insert(c.name, c)
        end
        GameObject.send(:include,ObjCmd)
      end
    else
      @log.warn "No command interfaces for GameObject"
    end

    # now load the commands for characters
    cmdtable = TernaryTrie.new
    if options['character_interface'] && !options['character_interface'].empty?
      options['character_interface'].each do |i|
        cmds = YAML::load_file("cmd/#{i}.yaml")
        cmds.each do |c|
          Kernel::load("cmd/#{i}/#{c.cmd}.rb")
          cmdtable.insert(c.name, c)
        end
        Character.send(:include,Cmd)
      end
    else
      @log.error "No command interfaces for Character"
    end

    @log.info "Done."
    return cmdtable, ocmdtable
  rescue Exception
    @log.error $!
  end