Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b84a109b74
Fetching contributors…

Cannot retrieve contributors at this time

file 35 lines (21 sloc) 0.515 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
---
syntax:
- "wear <prop>"
- "put on <prop>"

logic: |

  output = ''

  if not @player.wearing.index(prop.id)

    if prop.traits && prop.traits['wearable']

      if prop.location != 'player'

        prop.location = 'player'
        output << "(You take #{prop.noun}.)\n"
      end

      @player.wearing << prop.id

      output << "You put on #{prop.noun}.\n"

    else

      output << "You can't wear #{prop.noun}.\n"
    end

  else

    output << "You're already wearing #{prop.noun}.\n"

  end

  output
Something went wrong with that request. Please try again.