# # file:: cmd_dig.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 dig command def cmd_dig(args) can_dig = false with_what = _("bare hands") if get_object(location).has_attribute? :inside sendto _("You can not dig inside.") return end @body.wielding?.each do |oid| if get_object(oid).has_attribute? :shovel with_what = get_object(oid).shortname can_dig = true end end can_dig = true if world.can_build? id if can_dig sendto _("You begin digging with your %{obj}." % {:obj => with_what}) sendroom _("%{name} begins degging with %{pos} %{obj}." % {:name => name, :obj => with_what, :pos => pos_pronoun}) add_event(id,location,:dig) else sendto _("You have nothing to dig with.") end end end