cmd_wear.rb

znmud-0.0.1/cmd/zombie/cmd_wear.rb · 570 B

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

Download the archive   « Back to the archive contents

#
# file::    cmd_wear.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")

  # The wear command
  def cmd_wear(args)
	case args
	when nil, ""
		sendto _("Wear what?")
	else
		objs = find_inv(args)
		if objs.size > 0
			objs.each do |o|
				add_event(o.id, id, :wear)
			end
		else
			sendto _("You are not carrying %{args}" % {:args => args})
		end
	end
  end

end

Site Stats

Snippets: 1791
Codebases: 571