module Cmd

  # gets a specific object from the room you are in.
  def cmd_get(args)
    found_object = false
    get_object(location).objects.each do |obj|
      if (obj.name.is_match?(args) || args.is_prefix?(obj.name))
        found_object = true
        add_event(id,obj.id,:get)
        break
      end
    end
    
    if !found_object
      sendto "You cannot find that object."
    end
  end
  
end