Sha256: 1fa032658f0a85d1ad968213a0b090699d2a0b48ba0eeab39240fda0b0accf29
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
Gamefic.script do respond :wear, Use.available(Clothing) do |actor, clothing| if clothing.parent != actor actor.tell "You don't have #{the clothing}." end if clothing.attached? actor.tell "You're already wearing #{the clothing}." else already = actor.children.that_are(clothing.class).that_are(:attached?) if already.length == 0 clothing.attached = true actor.tell "You put on #{the clothing}." else actor.tell "You're already wearing #{an already[0]}." end end end xlate "put on :clothing", "wear :clothing" xlate "put :clothing on", "wear :clothing" xlate "don :clothing", "wear :clothing" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gamefic-standard-2.0.0 | lib/gamefic-standard/clothing/actions/wear.rb |