support pea chia cape in infinite closet
This commit is contained in:
parent
eb0ad25c93
commit
ddec043209
2 changed files with 5 additions and 2 deletions
|
@ -12,7 +12,8 @@ class Item < ActiveRecord::Base
|
|||
|
||||
NCRarities = [0, 500]
|
||||
PAINTBRUSH_SET_DESCRIPTION = 'This item is part of a deluxe paint brush set!'
|
||||
SPECIAL_COLOR_DESCRIPTION_REGEX = /This item is only wearable by Neopets painted ([a-zA-Z]+)\./
|
||||
SPECIAL_COLOR_DESCRIPTION_REGEX =
|
||||
/This item is only wearable by Neopets painted ([a-zA-Z]+)\.|WARNING: This [a-zA-Z]+ can be worn by ([a-zA-Z]+) [a-zA-Z]+ ONLY!/
|
||||
|
||||
SPECIAL_PAINTBRUSH_COLORS_PATH = Rails.root.join('config', 'colors_with_unique_bodies.txt')
|
||||
SPECIAL_PAINTBRUSH_COLORS = File.read(SPECIAL_PAINTBRUSH_COLORS_PATH).split("\n").map { |name| Color.find_by_name(name) }
|
||||
|
@ -102,7 +103,8 @@ class Item < ActiveRecord::Base
|
|||
|
||||
match = description.match(SPECIAL_COLOR_DESCRIPTION_REGEX)
|
||||
if match
|
||||
return Color.find_by_name(match[1].downcase)
|
||||
color = match[1] || match[2]
|
||||
return Color.find_by_name(color.downcase)
|
||||
end
|
||||
end
|
||||
public
|
||||
|
|
|
@ -54,6 +54,7 @@ chia:
|
|||
yellow: oqs3kzmf
|
||||
baby: kvm8jr9k
|
||||
mutant: mnf38rsr
|
||||
pea: mn53trx7
|
||||
chomby:
|
||||
blue: h3qctoxg
|
||||
green: 552mzx7r
|
||||
|
|
Loading…
Reference in a new issue