diff options
author | David Gay <david@davidgay.org> | 2021-06-16 18:16:57 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-16 18:17:04 -0400 |
commit | b5234514e2c8d8a1e798726991892bf80eec90ae (patch) | |
tree | 3024f35983df5d2aaf371045dc3ccb6d19a18b04 /app/models/concerns | |
parent | 0f6b68f115d2d16c7ef73d80570b1b85a1368a43 (diff) |
Activity equipment item tag requirements, and apply to / adjust all relevant activities
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/has_costs_and_requirements.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/concerns/has_costs_and_requirements.rb b/app/models/concerns/has_costs_and_requirements.rb index 9f859f5..9c4abf8 100644 --- a/app/models/concerns/has_costs_and_requirements.rb +++ b/app/models/concerns/has_costs_and_requirements.rb @@ -22,7 +22,11 @@ module HasCostsAndRequirements 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 |