Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
36 lines (21 sloc) 515 Bytes
---
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