znmud-0.0.1/benchmark/
znmud-0.0.1/cmd/
znmud-0.0.1/cmd/emotes/
znmud-0.0.1/cmd/objects/
znmud-0.0.1/cmd/tiny/
znmud-0.0.1/doc/
znmud-0.0.1/farts/
znmud-0.0.1/lib/
znmud-0.0.1/lib/combat/
znmud-0.0.1/lib/core/bodytypes/
znmud-0.0.1/lib/engine/
znmud-0.0.1/lib/farts/
znmud-0.0.1/logs/
#
# file::    battery.rb
# Author:   Craig Smith

# 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.
#

$:.unshift "lib" if !$:.include? "lib"

require 'core/gameobject'
require 'storage/properties'

# This is the base container class
#
class Battery < GameObject
  # Create a new Liquid object
  # [+name+]    The displayed name of the Liquid.
  # [+return+]  A handle to the new Liquid.
  def initialize(name, owner, location=nil)
    super(name, owner, location)
  end

  def reset
	if has_val? :max_charge
		add_val(:current_charge, has_val?(:max_charge))
	else
		# Battery w/ no charge is technically a bug but we'll call
		# it a dead battery
		add_val(:max_charge, 0)
		add_val(:current_charge, 0)
	end
  end

end