Sha256: a9b9ddaba5f43ffcf7489298a9db6fa64785b45e3f9456a2336c74d0546e7cb5

Contents?: true

Size: 610 Bytes

Versions: 8

Compression:

Stored size: 610 Bytes

Contents

respond :wear, Query::Reachable.new(Clothing) do |actor, clothing|
  if actor.auto_takes?(clothing)
    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
end

xlate "put on :clothing", "wear :clothing"
xlate "put :clothing on", "wear :clothing"
xlate "don :clothing", "wear :clothing"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gamefic-sdk-1.5.0 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.4.1 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.4.0 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.3.1 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.3.0 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.2.0 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.1.0 scripts/clothing/actions/wear.plot.rb
gamefic-sdk-1.0.1 scripts/clothing/actions/wear.plot.rb