Welcome, Guest. Please login or register.
Kingdoms of Ahln
Pages: [1]
  Print  
Author Topic: Request change to verbage of paginator 'more'  (Read 166 times)
Joseph
Wanderer
*
Posts: 13


View Profile
« on: December 05, 2011, 11:05:18 am »

I am not sure if this problem is caused by fmud or something else because can't find the problem in the defined help method
Code:
     if topic.include? 'topics' or topic == ''
        player.output('Help topics available:', true)
        topics = []
        Dir.glob("#{path}*.help").sort.each do |filename|
          topics << filename[/#{path}(.*)\.help/, 1].upcase
        end

        player.output(topics)
        return
      end
but when using the 'help' or 'help topics' command in game only the first of three pages is displayed, without an obvious way of calling the other two pages.

Quote
---MORE (1/3)---
« Last Edit: December 05, 2011, 01:58:12 pm by Joseph » Logged
Joseph
Wanderer
*
Posts: 13


View Profile
« Reply #1 on: December 05, 2011, 01:41:26 pm »

Ok the answer was found here
Code:
 #Next page of paginated output
  def more
    if @paginator and @paginator.more?
      self.print(@paginator.more, false)
      if not @paginator.more?
        @paginator = nil
      end
    else
      @paginator = nil
      self.puts "There is no more."
    end
  end

I guess I should change my request for the paginator message to be a bit more helpful.  Ill find that definition in time and see what it looks like.

Code:
 def more
    @current += 1
    return "There is no more.\r\n" if @current > @pages
    page = @my_p.page(@current)
    if more?
      page.items.join("\r\n") << "\r\n---MORE (#{@current}/#{@pages})---\r\n"
    else
      page.items.join("\r\n") << "\r\n"
    end
  end

maybe something along the lines of..
Code:
 def more
    @current += 1
    return "There is no more.\r\n" if @current > @pages
    page = @my_p.page(@current)
    if more?
      page.items.join("\r\n") << "\r\n---Type MORE for next page (#{@current}/#{@pages})---\r\n"
    else
      page.items.join("\r\n") << "\r\n"
    end
  end

The reason for suggesting this change is that many people will try to do things like it did and repeatedly enter 'help' 'help' 'help' to get the next page or 'help more' which does not have a help topic :-p  Just making the verbiage of the output a little more verbose would go a long way to help people not look as stupid as I feel.
« Last Edit: December 05, 2011, 02:00:49 pm by Joseph » Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #2 on: December 05, 2011, 11:35:56 pm »

Hi Joseph,

I apologize for not seeing this earlier. I think those are great suggestions and I'll get to them tomorrow morning. No need to feel stupid! We all have assumptions about these kinds of things, and they don't always match up with each other.

Thanks!
Logged
Justin
Administrator
Citizen
*****
Posts: 189



View Profile
« Reply #3 on: December 19, 2011, 07:20:44 pm »

Okay, I've made this change. Thanks again!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2006-2009, Simple Machines
Terra97 design by Bloc