cmd_list.rb

znmud-0.0.1/cmd/zombie/cmd_list.rb · 547 B

From the archive znmud-minimal-0.0.1.tar.gz

Download the archive   « Back to the archive contents

#
# file::    cmd_list.rb

# This source code copyright (C) 2009 Craig Smith
# All rights reserved.
#
# Released under the terms of the TeensyMUD Public License
# See LICENSE file for additional information.
#

module Cmd

  bindtextdomain("cmd")

  # Lists items available from a merchant
  def cmd_list(args)
	found = false
	get_object(location).people(id).each do |p|
		if p.is_a? Merchant
			add_event(id, p.id, :list)
			found = true
		end
	end
	sendto _("Nodoby here is selling anything.") if not found
  end

end

Site Stats

Snippets: 1791
Codebases: 571