diff options
author | David Gay <david@davidgay.org> | 2021-06-16 20:49:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 20:49:59 -0400 |
commit | 6dfaa7453591910e1373d92d8a09ddf384ebe834 (patch) | |
tree | ccec71ec425808ea82a3bfbcd36490f1cdcb666d /app/models/concerns | |
parent | 007896b0057b8aecbf74dddd269b57efe3f6e0e6 (diff) | |
parent | 0d6a82102061ff58b7ba34b09c4be9687c21ab2a (diff) |
Merge pull request #16 from dtgay/0.1.11
0.1.11
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/has_costs_and_requirements.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/concerns/has_costs_and_requirements.rb b/app/models/concerns/has_costs_and_requirements.rb index 34ff0f3..9c4abf8 100644 --- a/app/models/concerns/has_costs_and_requirements.rb +++ b/app/models/concerns/has_costs_and_requirements.rb @@ -19,8 +19,14 @@ module HasCostsAndRequirements case req[:type] when "skill" requirements.push "level #{req[:level]} #{Skill.find_by_gid(req[:gid]).name}" + when "stat" + requirements.push "#{req[:value]} #{req[:gid]}" when "equipment" - requirements.push "equipped #{Item.find_by_gid(req[:gid]).name}" + if req[:tag] + requirements.push "equipped #{req[:tag]}" + else + requirements.push "equipped #{Item.find_by_gid(req[:gid]).name}" + end when "hearth_amenity" requirements.push "level #{req[:level]} #{HearthAmenity.find_by_gid(req[:gid]).name}" else |