Sha256: 8ae019722ee55f32ae1097205646ddd84763d45d4016b9a73c2eeec82b1933a9
Contents?: true
Size: 419 Bytes
Versions: 1
Compression:
Stored size: 419 Bytes
Contents
# @gamefic.script standard/edible module Edibility attr_writer :edible def edible? @edible ||= false end end class Thing include Edibility end Gamefic.script do respond :eat, Use.available do |actor, item| actor.tell "You can't eat #{the item}." end respond :eat, Use.available(:edible?) do |actor, item| actor.tell "You eat #{the item}." destroy item end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gamefic-standard-2.2.0 | lib/gamefic-standard/edible.rb |