diff --git a/app/models/item/dyeworks.rb b/app/models/item/dyeworks.rb index fe971234..d79602bb 100644 --- a/app/models/item/dyeworks.rb +++ b/app/models/item/dyeworks.rb @@ -4,6 +4,12 @@ class Item dyeworks_base_item.present? end + # Whether this is a Dyeworks item whose base item can currently be purchased + # in the NC Mall, then dyed via Dyeworks. (Owls tracks this last part!) + def dyeworks_buyable? + dyeworks_base_buyable? && dyeworks_dyeable? + end + # Whether this is a Dyeworks item whose base item can currently be purchased # in the NC Mall. It may or may not currently be *dyeable* in the NC Mall, # because Dyeworks eligibility is often a limited-time event. @@ -11,6 +17,12 @@ class Item dyeworks_base_item.present? && dyeworks_base_item.currently_in_mall? end + # Whether this is a Dyeworks item that can be dyed in the NC Mall ~right now, + # either at any time or as a limited-time event. (Owls tracks this, not us!) + def dyeworks_dyeable? + dyeworks_permanent? || dyeworks_limited? + end + # Whether this is one of the few Dyeworks items that can be dyed in the NC # Mall at any time, rather than as part of a limited-time event. (Owls tracks # this, not us!) @@ -28,18 +40,6 @@ class Item nc_trade_value.value_text.match?(DYEWORKS_LIMITED_PATTERN) end - # Whether this is a Dyeworks item that can be dyed in the NC Mall ~right now, - # either at any time or as a limited-time event. (Owls tracks this, not us!) - def dyeworks_dyeable? - dyeworks_permanent? || dyeworks_limited? - end - - # Whether this is a Dyeworks item whose base item can currently be purchased - # in the NC Mall, then dyed via Dyeworks. (Owls tracks this last part!) - def dyeworks_buyable? - dyeworks_base_buyable? && dyeworks_dyeable? - end - DYEWORKS_NAME_PATTERN = %r{ ^( # Most Dyeworks items have a colon in the name.