module Standardized
Attributes
itemized[W]
@return [Boolean]
locale_description[RW]
An optional description to use when itemizing entities in room descriptions. The locale_description
will be used instead of adding the entity's name to a list.
@return [String, nil]
portable[W]
@return [Boolean]
Public Instance Methods
attached=(bool)
click to toggle source
@param bool [Boolean]
# File lib/gamefic-standard/modules/standardized.rb, line 35 def attached= bool @attached = if parent.nil? # @todo Log attachment failure false else bool end end
attached?()
click to toggle source
@return [Boolean]
# File lib/gamefic-standard/modules/standardized.rb, line 30 def attached? @attached ||= false end
itemized?()
click to toggle source
Itemized entities are automatically listed in room descriptions.
@return [Boolean]
# File lib/gamefic-standard/modules/standardized.rb, line 18 def itemized? @itemized end
parent=(new_parent)
click to toggle source
Calls superclass method
# File lib/gamefic-standard/modules/standardized.rb, line 44 def parent= new_parent self.attached = false unless new_parent == parent super end
portable?()
click to toggle source
Portable entities can be taken with TAKE actions.
@return [Boolean]
# File lib/gamefic-standard/modules/standardized.rb, line 25 def portable? @portable end
room()
click to toggle source
The entity's parent room (i.e., the closest ascendant that is a Room
).
@return [Room]
# File lib/gamefic-standard/modules/standardized.rb, line 52 def room p = parent until p.is_a?(Room) or p.nil? p = p.parent end p end